SPVM::N...:Runtime(3)

πŸ“¦ version 0.990125, in alpine 3.24

🌸 NAME 🌸

SPVM::Native::Runtime β€” aka Native::Runtime, bestie. This is the SPVM::N...:Runtime(3) page from the User Contributed Perl Documentation, and it is giving very specific runtime-info energy πŸ’….

SPVM::Native::Runtime is the Native::Runtime class in SPVM language.

✨ DESCRIPTION ✨

Okay so the instance has the runtime information such as operation codes, classes, methods, fields, class variables, constant strings. It is the whole backstage pass 🎟️.

This class provides only the minimal methods to get the information of classes and methods. Lowkey minimal, highkey useful.

An instance of Native::Runtime class is build by Native::Compiler#get_runtime. (Yep, β€œbuild” β€” I am not fixing the page’s grammar, I am just delivering the tea 🍡.)

🫢 USAGE 🫢

use Native::Runtime;

my $runtime = $compiler->get_runtime;

my $stack = $env->new_stack;

πŸŽ€ POINTER πŸŽ€

The Native::Runtime class is a pointer class. Iconic.

Its instance has a pointer to a runtime object. No cap.

πŸ’– FIELDS πŸ’–

compiler

has compiler : Native::Compiler;

The compiler that build this runtime.

env

has env : Native::Env;

The runtime environment owned by this runtime.

πŸ’… 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.

get_method_by_name

method get_method_by_name : Native::Method ($class_name : string, $method_name : string);

Gets a method given the class name $class_name and the method name $method_name, returns it.

get_field_by_name

method get_field_by_name : Native::Field ($class_name : string, $field_name : string);

Gets a field given the class name $class_name and the method name $method_name, returns it.

get_class_var_by_name

method get_class_var_by_name : Native::ClassVar ($class_name : string, $class_var_name : string);

Gets a class variable given the class name $class_name and the method name $method_name, returns it.

get_basic_types

method get_basic_types : Native::BasicType[] ($options : object[] = undef);

Returns basic types given the options $options.

Options:

Options $options is key-value pairs.

  • "category" (int[]) β€” If the category ID of the basic type matches a value in this option values, only they are extracted. For constant values, see Basic Type Category IDs.
  • "is_anon" (Int) β€” If this option is a true value, only anon basic types are extracted. If this option is a false value, only non-anon basic types are extracted.

get_env

method get_env : Native::Env ();

Returns the "env" field.

🌈 SEE ALSO 🌈

  • Native::Compiler
  • Native::Env

Copyright (c) 2023 Yuki Kimoto

MIT License


Okay bestie, that is the whole page πŸ’‹ β€” this was served by perl v5.42.2, dated 2026-02-03, from the SPVM::N...:Runtime(3) manual page. Mwah 🫢✨

πŸ“¦ where this page comes from