SPVM::D...Runtime(3)
hey bestie π welcome to the manual page for SPVM::D...Runtime(3) from User Contributed Perl Documentation. this is the runtime native APIs situation for SPVM, and it's giving core runtime realness. lowkey obsessed, no cap. π
β¨ Name β¨
SPVM::Document::NativeAPI::Runtime - Runtime Native APIs π
π¦ Description π¦
The runtime native APIs of SPVM are the APIs for SPVM runtimes β lowkey iconic, highkey essential, periodt. π
πΈ Usage πΈ
okay so the vibe check usage is literally this:
SPVM_API_RUNTIME* api_runtime = env->api->runtime;
int32_t basic_types_length = api_runtime->get_basic_types_length(env->runtime);
π₯ Runtime Native APIs π₯
these are the runtime native APIs, bestie β every single one, no skipping, not even the offset girlies π . not me about to walk you through all of them, main character energy only.
π get_object_data_offset π
int32_t (*get_object_data_offset)(void* runtime);
Returns the offset of the data area in the SPVM_OBJECT struct. Elements in an array or fields or a pointer in a pointer class is stored into the data area. π§Ί
π get_object_ref_count_offset π
int32_t (*get_object_ref_count_offset)(void* runtime);
Returns the offset of the "ref_count" field in SPVM_OBJECT struct. π’
π get_object_length_offset π
int32_t (*get_object_length_offset)(void* runtime);
Returns the offset of the "length" field in SPVM_OBJECT struct. π
π get_basic_type_by_id π
void* (*get_basic_type_by_id)(void* runtime, int32_t basic_type_id);
Searches a basic type given the basic type ID basic_type_id. If it is found, returns it. Otherwise, returns NULL. π―
π get_basic_type_by_name π
void* (*get_basic_type_by_name)(void* runtime, const char* basic_type_name);
Searches a basic type given the basic type name basic_type_name. If it is found, returns it. Otherwise, returns NULL. π
π get_basic_types_length π
int32_t (*get_basic_types_length)(void* runtime);
Returns the length of the basic types owned by the SPVM runtime runtime. π
π build_precompile_class_source π
void (*build_precompile_class_source)(void* runtime, void* string_buffer, void* basic_type);
Creates a C source code for methods with the "precompile" attribute defined in the class given by the its basic type basic_type, and saves it to the string buffer string_buffer. π οΈ
π build_precompile_method_source π
void (*build_precompile_method_source)(void* runtime, void* string_buffer, void* method);
Creates a C source code for the method method, and saves it to the string buffer string_buffer. β¨
π get_compiler π
void* (*get_compiler)(void* runtime);
Returns the value of the "compiler" field. The compiler that build the runtime runtime is stored to this field. π§βπ»
π set_compiler π
void (*set_compiler)(void* runtime, void* compiler);
Sets compiler to the "compiler" field. π
π get_spvm_stdin π
FILE* (*get_spvm_stdin)(void* runtime);
Returns SPVM's standard input. π₯
π get_spvm_stdout π
FILE* (*get_spvm_stdout)(void* runtime);
Returns SPVM's standard output. π€
π get_spvm_stderr π
FILE* (*get_spvm_stderr)(void* runtime);
Returns SPVM's standard error. π¨
π get_env π
SPVM_ENV* (*get_env)(void* runtime);
Returns the runtime environment. π
π get_object_capacity_offset π
int32_t (*get_object_capacity_offset)(void* runtime);
Returns the offset of "capacity" membar variable in SPVM_OBJECT struct. π§
π Native API IDs π
vibe check: here are the numeric IDs, bestie β yes, they start at 0, iconic. iykyk. π
0βget_object_data_offset1βget_object_ref_count_offset2βget_object_length_offset3βget_basic_type_by_id4βget_basic_type_by_name5βget_basic_types_length6βbuild_precompile_class_source7βbuild_precompile_method_source8βget_compiler9βset_compiler10βget_spvm_stdin11βget_spvm_stdout12βget_spvm_stderr13βget_env14βget_object_capacity_offset
π«Ά See Also π«Ά
ngl, go read these too, fr fr:
SPVM::Document::NativeAPISPVM::Document::NativeAPI::BasicTypeSPVM::Document::NativeAPI::MethodSPVM::Document::NativeAPI::StringBufferSPVM::Document::NativeAPI::CompilerSPVM::Document::NativeClassSPVM::Document
π Copyright & License π
Copyright (c) 2023 Yuki Kimoto
MIT License
legal bestie moment, slay π
mwah π β this page is from perl v5.42.2, dated 2026-02-03, and it's the SPVM::D...Runtime(3) manual page. byeee π«Ά
π¦ where this page comes from
- alpine 3.24: spvm-doc 0.990125-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms