Manpage logo

SPVM::Document::NativeAPI::Internal - Internal Native APIs

Name  Description  Usage  Native APIs  get_ref_count  inc_ref_count  dec_ref_count  get_stack_tmp_buffer  leave_scope_local  Native API IDs  See Also  Copyright & License 

Name

SPVM::Document::NativeAPI::Internal − Internal Native APIs

Description

The internal native APIs in SPVM are the APIs for internal operations.

These APIs are used for the implementation of the SPVM language, so they should not be used.

Usage

SPVM_API_INTERNAL* api_internal = env−>api−>internal;

Native APIs

get_ref_count

"int32_t (*get_ref_count)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);"

Returns the reference count of the object object.

inc_ref_count

"void (*inc_ref_count)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);"

Increments the reference count of the object object.

dec_ref_count

"void (*dec_ref_count)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);"

Decrements the reference count of the object object.

get_stack_tmp_buffer

"char* (*get_stack_tmp_buffer)(SPVM_ENV* env, SPVM_VALUE* stack);"

Returns the temporary buffer on the runtime stack stack.

The byte size of the temporary buffer is SPVM_NATIVE_C_STACK_TMP_BUFFER_SIZE.

Currently, this internal native API is the same as get_stack_tmp_buffer native API.

leave_scope_local

"void (*leave_scope_local)(SPVM_ENV* env, SPVM_VALUE* stack, void** object_vars, int32_t* mortal_stack_typed_var_index, int32_t* mortal_stack_top_ptr, int32_t* mortal_stack_tops, int32_t mortal_stack_tops_index);"

Performs a leaveing scope operation for local variables given object variables object_vars, the mortal stack mortal_stack, the address of the top of the mortal stack mortal_stack_top_ptr, and the mortal stack tops mortal_stack_tops, and the index of the top of the mortal stack mortal_stack_tops_index.

The value referenced by mortal_stack_top_ptr is updated.

Native API IDs

0 get_ref_count
1 inc_ref_count
2 dec_ref_count
3 removed3
4 get_stack_tmp_buffer
5 leave_scope_local

See Also

SPVM::Document::NativeAPI

SPVM::Document::NativeClass

SPVM::Document

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License


Updated 2026-06-01 - jenkler.se | uex.se