SPVM::N...hodCall(3)
πΈ Name πΈ
SPVM::Native::MethodCall β Method Call π
okay so bestie, this is the SPVM::Native::MethodCall page (manual-name shorthand: SPVM::N...hodCall(3)), filed under User Contributed Perl Documentation, and it is literally about Method Call. yes, methods calling methods, main character energy, no cap.
β¨ Description β¨
The Native::MethodCall class of SPVM has methods to call methods. That's the whole vibe: it's your little group-chat for invoking methods, and honestly? obsessed. π«Ά
π¦ Usage π¦
Here's the use case, bestie β copy-paste energy but make it yours:
use Native::MethodCall;
my $class_method_call = Native::MethodCall->new_class_method("Point", "new");
my $point = (Point)$class_method_call->call([(object)1, 2]);
say $point->x;
say $point->y;
π Class Methods π
These are the class-method girlies. All signatures are exactly as written, periodt.
π new_class_method_with_env_stack π
static method new_class_method_with_env_stack : Native::MethodCall ($env : Native::Env, $stack : Native::Stack, $basic_type_name : string, $method_name : string);
Creates a class method call given the runtime environment $env, the runtime stack $stack, the basic type name $basic_type_name and the method name $method_name, and returns it.
If $env is not given, $env is set to the current runtime environment.
If $stack is not given, $stack is set to the current runtime environment.
π new_instance_method_static_with_env_stack π
static method new_instance_method_static_with_env_stack : Native::MethodCall ($env : Native::Env, $stack : Native::Stack, $basic_type_name : string, $method_name : string);
Creates an instance method call given the runtime environment $env, the runtime stack $stack, the basic type name $basic_type_name and the method name $method_name, and returns it.
If $env is not given, $env is set to the current runtime environment.
If $stack is not given, $stack is set to the current runtime environment.
π new_instance_method_with_env_stack π
static method new_instance_method_with_env_stack : Native::MethodCall ($env : Native::Env, $stack : Native::Stack, $instance : object, $method_name : string);
Creates an instance method call given the runtime environment $env, the runtime stack $stack, the instance $instance and the method name $method_name, and returns it.
If $env is not given, $env is set to the current runtime environment.
If $stack is not given, $stack is set to the current runtime environment.
π new_class_method π
static method new_class_method : Native::MethodCall ($basic_type_name : string, $method_name : string);
Calls the new_class_method_with_env_stack method given $env to undef and $stack to undef, and returns its return value.
Creates a class method call given the basic type name $basic_type_name and the method name $method_name and returns it.
π§ new_instance_method_static π§
static method new_instance_method_static : Native::MethodCall ($basic_type_name : string, $method_name : string);
Calls the new_instance_method_static_with_env_stack method given $env to undef and $stack to undef, and returns its return value.
π new_instance_method π
static method new_instance_method : Native::MethodCall ($instance : object, $method_name : string);
Calls the new_instance_method_with_env_stack method given $env to undef and $stack to undef, and returns its return value.
π₯ call_class_method π₯
static method call_class_method : void ($basic_type_name : string, $method_name : string, $args : object[] = undef, $error_id_ref : int[] = undef);
Calls a class method given the basic type name $basic_type_name, the method name $method_name, and the arguments $args.
β call_instance_method_static β
static method call_instance_method_static : object ($basic_type_name : string, $method_name : string, $args : object[] = undef, $error_id_ref : int[] = undef);
Calls an instance method given the basic type name $basic_type_name, the method name $method_name, and the arguments $args.
π¦ call_instance_method π¦
static method call_instance_method : object ($method_name : string, $args : object[] = undef, $error_id_ref : int[] = undef);
Calls an instance method given the method name $method_name, and the arguments $args. The first argument in $args must be an instance.
π new_proto_with_method_name π
static method new_proto_with_method_name : object ($proto : object, $method_name : string, $args : object[] = undef, $error_id_ref : int[] = undef)
Calls the call_class_method method given the class name of $proto, the method name $method_name, $args, and $error_id_ref, and its return value.
Exceptions:
β οΈ The prototype object $proto must be defined. Otherwise an exception is thrown.
Exceptions thrown by the call_class_method method could be thrown.
πΈ new_proto πΈ
static method new_proto : object ($proto : object, $args : object[] = undef, $error_id_ref : int[] = undef);
Same as the new_proto_with_method_name method, but $method_name is set to "new".
π Instance Methods π
π call π
method call : object ($args : object[] = undef, $error_id_ref : int[] = undef);
Calls a method with arguments and returns the return value.
π©· get_exception π©·
method get_exception : string ();
Gets the exception on the runtime environment and runtime stack owned by this instance.
π set_exception π
method set_exception : void ($exception : string);
Sets the exception on the runtime environment and runtime stack owned by this instance to the string $exception.
π Arguments π
Each argument must be an object type. The following conversion is performed.
# Numeric types
Byte -> byte
Short -> short
Int -> int
Long -> long
Float -> float
Double -> double
# Multi-Numeric types
byte[] -> multi-numeric byte
short[] -> multi-numeric short
int[] -> multi-numeric int
long[] -> multi-numeric long
float[] -> multi-numeric float
double[] -> multi-numeric double
# Numeric reference types
byte[] -> byte*
short[] -> short*
int[] -> int*
long[] -> long*
float[] -> float*
double[] -> double*
# Multi-Numeric reference types
byte[] -> multi-numeric byte reference
short[] -> multi-numeric short reference
int[] -> multi-numeric int reference
long[] -> multi-numeric long reference
float[] -> multi-numeric float reference
double[] -> multi-numeric double reference
π¨ If the type of an argument cannot be assigned, an exception is thrown. no cap, it's giving rejected.
π Return Value π
If the type of the return value is a numeric type, it is converted to a numeric object.
byte -> Byte
short -> Short
int -> Int
long -> Long
float -> Float
double -> Double
If the type of the return value is a multi-numeric type, it is converted to a numeric array.
multi-numeric byte type -> byte[]
multi-numeric short type -> short[]
multi-numeric int type -> int[]
multi-numeric long type -> long[]
multi-numeric float type -> float[]
multi-numeric double type -> double[]
π«Ά Copyright & License π«Ά
Copyright (c) 2023 Yuki Kimoto
MIT License
okay bestie, that's the whole page β from perl v5.42.2, dated 2026-02-03, with manual-name shorthand SPVM::N...hodCall(3). mwah πβ¨
π¦ where this page comes from
- alpine 3.24: spvm-doc 0.990125-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms