Name
SPVM::Env - Execution Environment
Description
SPVM::Env
is the Env
class in the SPVM language.
The instance is an execution environemnt. It has the Native APIs and the data of class variables.
An instance of the Env
class is build by the build_env method in the Runtime class.
A call stack is build by the build_stack method in this class.
Usage
use Env;
my $env = $runtime->build_env;
my $stack = $env->build_stack;
Pointer
The Env
class is a pointer class.
Its insntace has a pointer to an object of the SPVM_ENV type.
Fields
runtime
has runtime : ro Runtime;
A runtime. The field type is the Runtime class.
Instance Methods
set_command_info
method set_command_info : void ($program_name : string, $argv : string[]);
Sets command line information.
call_init_blocks
method call_init_blocks : void ();
Calls all INIT blocks.
build_stack
method build_stack : Stack ();
Builds a call stack and returns it.
The return type is the Stack class.
DESTROY
method DESTROY : void ();
The destructor.
See Also
Runtime
The build_runtime method in the Runtime class builds an executable environement.
Stack
The instance of the Stack class is build by the "build_stack" method in this class.
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License