Name
SPVM::Native::Runtime - Native::Runtime
Description
SPVM::Native::Runtime
is the Native::Runtime
class in the SPVM language.
The instance has the runtime information such as operation codes, classes, methods, fields, class variables, constant strings.
This class provides only the minimal methods to get the information of classes and methods.
An instance of the Native::Runtime
class is build by the get_runtime method in the Native::Compiler class.
Usage
use Native::Runtime;
my $runtime = $compiler->get_runtime;
my $stack = $env->new_stack;
Pointer
The Native::Runtime
class is a pointer class.
Its insntace has a pointer to a runtime object.
Instance Methods
get_basic_types_length
method get_basic_types_length : int ();
Returns the length of the all basic types in the runtime.
get_basic_type_by_id
method get_basic_type_by_id : Native::BasicType ($id : int);
Returns a Native::BasicType object by a basic type ID.
Exceptions:
If The basic type cannot be found, an exception is throen.
get_basic_type_by_name
method get_basic_type_by_name : Native::BasicType ($name : string);
Returns a Native::BasicType object by a basic type name.
Exceptions:
If The basic type cannot be found, an exception is throen.
build_precompile_class_source
method build_precompile_class_source : string ($basic_type : Native::BasicType);
Builds the C source code of the class that contains precompile
methods and returns it.
build_precompile_method_source
method method build_precompile_method_source : string ($method : Native::Method);
Builds the C source code of a precompile
method and returns it.
get_compiler
method get_compiler : Native::Compiler ();
Gets the compiler that built this runtime.
new_env
static method new_env : Native::Env ();
Creates a new Native::Env ojbect, and returns it.
See Also
Native::Compiler
The get_runtime method in the Native::Compiler class builds a rutnime.
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License