=head1 Name SPVM::Document::NativeAPI::Runtime - Runtime Native APIs =head1 Description The runtime native APIs of L are the APIs for SPVM runtimes. =head1 Usage SPVM_API_RUNTIME* api_runtime = env->api->runtime; int32_t basic_types_length = api_runtime->get_basic_types_length(env->runtime); =head1 Runtime Native APIs =head2 get_object_data_offset C);> Returns the offset of data area in L struct. Elements in an array or fields or a pointer in a pointer class is stored into the data area. =head2 get_object_ref_count_offset C);> Returns the offset of the C field in L struct. =head2 get_object_length_offset C);> Returns the offset of the C field in L struct. =head2 get_basic_type_by_id C, int32_t basic_type_id);> Searches a L given the basic type ID I. If it is found, returns it. Otherwise, returns C. =head2 get_basic_type_by_name C, const char* basic_type_name);> Searches a L given the basic type name I. If it is found, returns it. Otherwise, returns C. =head2 get_basic_types_length C);> Returns the length of the basic types owned by the SPVM runtime I. =head2 build_precompile_class_source C, L, L);> Creates a C source code for methods with the C attribute defined in the class given by the its basic type I, and saves it to the string buffer I. =head2 build_precompile_method_source C, L, L);> Creates a C source code for the method I, and saves it to the string buffer I. =head2 get_compiler C);> Returns the value of the C field. The compiler that build the runtime I is stored to this field. =head2 set_compiler C, L);> Sets I to the C field. =head2 get_spvm_stdin C);> Returns L. =head2 get_spvm_stdout C);> Returns L. =head2 get_spvm_stderr C);> Returns L. =head1 Native API IDs 0 get_object_data_offset 1 get_object_ref_count_offset 2 get_object_length_offset 3 get_basic_type_by_id 4 get_basic_type_by_name 5 get_basic_types_length 6 build_precompile_class_source 7 build_precompile_method_source 8 get_compiler 9 set_compiler 10 get_spvm_stdin 11 get_spvm_stdout 12 get_spvm_stderr =head1 See Also =over 2 =item * L =item * L =item * L =item * L =item * L =item * L =item * L =back =head1 Copyright & License Copyright (c) 2023 Yuki Kimoto MIT License