Name
SPVM::Document::NativeAPI::Argument - Argument Native APIs
Description
The argument native APIs in SPVM are the APIs to get definition information for arguments.
Usage
SPVM_API_ARG* api_arg = env->api->arg;
SPVM_API_METHOD* api_method = env->api->method;
void* basic_type = env->get_basic_type(env, stack, "Foo");
void* method = env->api->basic_type->get_method_by_name(env->runtime, basic_type, "get");
void* arg = api_method->get_arg_by_index(env->runtime, method, 0);
void* arg_basic_type = api_arg->get_basic_type(env->runtime, arg);
Native APIs
get_name
const char* (*get_name)(void* runtime, void* arg);
Returns the name of the argument arg.
get_index
int32_t (*get_index)(void* runtime, void* arg);
Returns the index of the argument arg.
get_basic_type
void* (*get_basic_type)(void* runtime, void* arg);
Returns the basic type of the argument arg.
get_type_dimension
int32_t (*get_type_dimension)(void* runtime, void* arg);
Returns the type dimention of the argument arg.
get_type_flag
int32_t (*get_type_flag)(void* runtime, void* arg);
Returns the type flag ID of the argument arg.
get_stack_index
int32_t (*get_stack_index)(void* runtime, void* arg);
Returns the stack index of the argument arg. The stack index is the position in a runtime stack.
get_current_method
void* (*get_current_method)(void* runtime, void* arg);
Returns the method that owns the argment arg.
Native API IDs
0 get_name
1 get_index
2 get_basic_type
3 get_type_dimension
4 get_type_flag
5 get_stack_index
6 get_current_method
See Aloso
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License