# Copyright (c) 2023 Yuki Kimoto
# MIT License
class Native::Env : pointer {
use Native::Compiler;
use Native::Runtime;
use Native::Stack;
# Fields
has compiler : ro Native::Compiler;
has runtime : ro Native::Runtime;
has no_destroy : byte;
# Class Methods
native static method new : Native::Env ($compiler : Native::Compiler = undef);
# Instance Methods
native method set_command_info_program_name : void ($stack : Native::Stack, $program_name : string);
native method set_command_info_argv : void ($stack : Native::Stack, $argv : string[]);
native method set_command_info_base_time : void ($stack : Native::Stack, $base_time : long);
native method call_init_methods : void ($stack : Native::Stack);
native method destroy_class_vars : void ($stack : Native::Stack);
native method new_stack : Native::Stack ();
native method get_exception : string ();
native method set_exception : void ($exception : string);
native method DESTROY : void ();
}