The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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.

leave_scope_local

void (*leave_scope_local)(SPVM_ENV* env, SPVM_VALUE* stack, void** object_vars, int32_t* mortal_stack, int32_t* mortal_stack_top_ptr, int32_t original_mortal_stack_top);

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 original top of the mortal stack original_mortal_stack_top.

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 leave_scope_local

See Also

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License