Manpage logo

SPVM::Document::NativeAPI::Type - Type Native APIs

Name  Description  Usage  Native APIs  can_assign  get_type_width  is_object_type  is_any_object_type  is_object_array_type  is_any_object_array_type  is_numeric_type  is_class_type  Native API IDs  See Also  Copyright & License 

Name

SPVM::Document::NativeAPI::Type − Type Native APIs

Description

The type native APIs in SPVM are the APIs to get type information.

Usage

SPVM_API_TYPE* api_type = env−>api−>type;

Native APIs

can_assign

"int32_t (*can_assign)(void* runtime, void* dist_basic_type, int32_t dist_type_dimension, int32_t dist_type_flag, void* src_basic_type, int32_t src_type_dimension, int32_t src_type_flag);"

If the source type given by src_basic_type, src_type_dimension, and src_type_flag can be assigned to the dist type given by dist_basic_type, dist_type_dimension, and dist_type_flag , returns 1, otherwise returns 0.

get_type_width

"int32_t (*get_type_width)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);"

Returns the type width of the type given by basic_type, type_dimension, and type_flag.

is_object_type

"int32_t (*is_object_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);"

If the type given by basic_type, type_dimension, and type_flag is an object type, returns 1, otherwise returns 0.

is_any_object_type

"int32_t (*is_any_object_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);"

If the type given by basic_type, type_dimension, and type_flag is the any object type "object", returns 1, otherwise returns 0.

is_object_array_type

"int32_t (*is_object_array_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);"

If the type given by basic_type, type_dimension, and type_flag is an object array type, returns 1, otherwise returns 0.

is_any_object_array_type

"int32_t (*is_any_object_array_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);"

If the type given by basic_type, type_dimension, and type_flag is any object array type "object[]", returns 1, otherwise returns 0.

is_numeric_type

"int32_t (*is_numeric_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);"

If the type given by basic_type, type_dimension, and type_flag is a numeric type, returns 1, otherwise returns 0.

is_class_type

"int32_t (*is_class_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);"

If the type given by basic_type, type_dimension, and type_flag is a class type, returns 1, otherwise returns 0.

Native API IDs

0 can_assign
1 get_type_width
2 is_object_type
3 is_any_object_type
4 is_object_array_type
5 is_any_object_array_type
6 is_numeric_type
6 is_class_type

See Also

SPVM::Document::NativeAPI

SPVM::Document::NativeAPI::BasicType

SPVM::Document::NativeClass

SPVM::Document

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License


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