# Copyright (c) 2023 Yuki Kimoto
# MIT License

class Native::Env : pointer {
  version_from SPVM;

  allow Native::MethodCall;
  
  use Native::Compiler;
  use Native::Runtime;
  use Native::Stack;
  
  # Fields
  has runtime : ro Native::Runtime;
  
  # Class Method
  private static method new_with_pointer : Native::Env ($pointer : Address, $options : object[] = undef) {
    
    my $self = new Native::Env;
    
    Fn->set_pointer($self, $pointer);
    
    return $self;
  }
  
  # Instance Methods
  native method new_stack : Native::Stack ();
  
  native method DESTROY : void ();
  
}
