22 typedef uint8_t wasm_value_type_t;
24 typedef enum wasm_value_type_enum {
25 VALUE_TYPE_I32 = 0x7F,
26 VALUE_TYPE_I64 = 0x7E,
27 VALUE_TYPE_F32 = 0x7D,
28 VALUE_TYPE_F64 = 0x7C,
29 VALUE_TYPE_V128 = 0x7B,
32 VALUE_TYPE_I16 = 0x77,
33 VALUE_TYPE_NULLFUNCREF = 0x73,
34 VALUE_TYPE_NULLEXTERNREF = 0x72,
35 VALUE_TYPE_NULLREF = 0x71,
36 VALUE_TYPE_FUNCREF = 0x70,
37 VALUE_TYPE_EXTERNREF = 0x6F,
38 VALUE_TYPE_ANYREF = 0x6E,
39 VALUE_TYPE_EQREF = 0x6D,
40 VALUE_TYPE_I31REF = 0x6C,
41 VALUE_TYPE_STRUCTREF = 0x6B,
42 VALUE_TYPE_ARRAYREF = 0x6A,
43 VALUE_TYPE_HT_NON_NULLABLE_REF = 0x64,
44 VALUE_TYPE_HT_NULLABLE_REF = 0x63,
46 VALUE_TYPE_STRINGREF = 0X67,
47 VALUE_TYPE_STRINGVIEWWTF8 = 0x66,
48 VALUE_TYPE_STRINGVIEWWTF16 = 0x62,
49 VALUE_TYPE_STRINGVIEWITER = 0x61
50 } wasm_value_type_enum;
52 typedef int32_t wasm_heap_type_t;
54 typedef enum wasm_heap_type_enum {
55 HEAP_TYPE_FUNC = -0x10,
56 HEAP_TYPE_EXTERN = -0x11,
57 HEAP_TYPE_ANY = -0x12,
59 HEAP_TYPE_I31 = -0x16,
60 HEAP_TYPE_NOFUNC = -0x17,
61 HEAP_TYPE_NOEXTERN = -0x18,
62 HEAP_TYPE_STRUCT = -0x19,
63 HEAP_TYPE_ARRAY = -0x1A,
64 HEAP_TYPE_NONE = -0x1B
65 } wasm_heap_type_enum;
68 typedef struct WASMObject *wasm_obj_t;
70 #ifndef WASM_VALUE_DEFINED
71 #define WASM_VALUE_DEFINED
84 uint32_t global_index;
112 wasm_value_type_t value_type;
135 struct WASMStructType;
136 struct WASMArrayType;
138 typedef struct WASMType *wasm_defined_type_t;
139 typedef struct WASMFuncType *wasm_func_type_t;
140 typedef struct WASMStructType *wasm_struct_type_t;
141 typedef struct WASMArrayType *wasm_array_type_t;
143 struct WASMExternrefObject;
144 struct WASMAnyrefObject;
145 struct WASMStructObject;
146 struct WASMArrayObject;
147 struct WASMFuncObject;
149 typedef struct WASMExternrefObject *wasm_externref_obj_t;
150 typedef struct WASMAnyrefObject *wasm_anyref_obj_t;
151 typedef struct WASMStructObject *wasm_struct_obj_t;
152 typedef struct WASMArrayObject *wasm_array_obj_t;
153 typedef struct WASMFuncObject *wasm_func_obj_t;
154 typedef struct WASMStringrefObject *wasm_stringref_obj_t;
155 typedef uintptr_t wasm_i31_obj_t;
157 typedef void (*wasm_obj_finalizer_t)(
const wasm_obj_t obj,
void *data);
168 WASM_RUNTIME_API_EXTERN uint32_t
179 WASM_RUNTIME_API_EXTERN wasm_defined_type_t
190 WASM_RUNTIME_API_EXTERN wasm_defined_type_t
201 WASM_RUNTIME_API_EXTERN int32_t
211 WASM_RUNTIME_API_EXTERN
bool
221 WASM_RUNTIME_API_EXTERN
bool
231 WASM_RUNTIME_API_EXTERN
bool
241 WASM_RUNTIME_API_EXTERN uint32_t
264 WASM_RUNTIME_API_EXTERN uint32_t
278 uint32_t result_idx);
287 WASM_RUNTIME_API_EXTERN uint32_t
301 uint32_t field_idx,
bool *p_is_mutable);
325 WASM_RUNTIME_API_EXTERN
bool
327 const wasm_defined_type_t def_type2,
328 const wasm_module_t module);
340 WASM_RUNTIME_API_EXTERN
bool
342 const wasm_defined_type_t def_type2,
343 const wasm_module_t module);
354 WASM_RUNTIME_API_EXTERN
void
365 WASM_RUNTIME_API_EXTERN
void
379 WASM_RUNTIME_API_EXTERN
bool
382 const wasm_module_t module);
394 WASM_RUNTIME_API_EXTERN
bool
397 const wasm_module_t module);
409 WASM_RUNTIME_API_EXTERN wasm_struct_obj_t
420 WASM_RUNTIME_API_EXTERN wasm_struct_obj_t
422 const wasm_struct_type_t type);
431 WASM_RUNTIME_API_EXTERN
void
443 WASM_RUNTIME_API_EXTERN
void
454 WASM_RUNTIME_API_EXTERN uint32_t
468 WASM_RUNTIME_API_EXTERN wasm_array_obj_t
483 WASM_RUNTIME_API_EXTERN wasm_array_obj_t
485 const wasm_array_type_t type, uint32_t length,
495 WASM_RUNTIME_API_EXTERN
void
507 WASM_RUNTIME_API_EXTERN
void
520 WASM_RUNTIME_API_EXTERN
void
522 const wasm_array_obj_t src_obj, uint32_t src_idx,
532 WASM_RUNTIME_API_EXTERN uint32_t
542 WASM_RUNTIME_API_EXTERN
void *
553 WASM_RUNTIME_API_EXTERN
void *
566 WASM_RUNTIME_API_EXTERN wasm_func_obj_t
568 uint32_t func_idx_bound);
579 WASM_RUNTIME_API_EXTERN wasm_func_obj_t
581 uint32_t func_idx_bound);
590 WASM_RUNTIME_API_EXTERN uint32_t
600 WASM_RUNTIME_API_EXTERN wasm_func_type_t
622 WASM_RUNTIME_API_EXTERN
bool
624 const wasm_func_obj_t func_obj, uint32_t argc,
643 WASM_RUNTIME_API_EXTERN
bool
645 const wasm_func_obj_t func_obj,
665 WASM_RUNTIME_API_EXTERN
bool
667 const wasm_func_obj_t func_obj,
669 uint32_t num_args, ...);
679 WASM_RUNTIME_API_EXTERN wasm_externref_obj_t
689 WASM_RUNTIME_API_EXTERN
const void *
700 WASM_RUNTIME_API_EXTERN wasm_anyref_obj_t
710 WASM_RUNTIME_API_EXTERN
const void *
721 WASM_RUNTIME_API_EXTERN wasm_obj_t
733 WASM_RUNTIME_API_EXTERN wasm_externref_obj_t
735 const wasm_obj_t internal_obj);
744 WASM_RUNTIME_API_EXTERN wasm_i31_obj_t
755 WASM_RUNTIME_API_EXTERN uint32_t
766 WASM_RUNTIME_API_EXTERN
bool
777 WASM_RUNTIME_API_EXTERN
bool
787 WASM_RUNTIME_API_EXTERN
bool
797 WASM_RUNTIME_API_EXTERN
bool
807 WASM_RUNTIME_API_EXTERN
bool
817 WASM_RUNTIME_API_EXTERN
bool
827 WASM_RUNTIME_API_EXTERN
bool
837 WASM_RUNTIME_API_EXTERN
bool
847 WASM_RUNTIME_API_EXTERN
bool
857 WASM_RUNTIME_API_EXTERN
bool
869 WASM_RUNTIME_API_EXTERN
bool
871 const wasm_defined_type_t defined_type,
872 const wasm_module_t module);
885 WASM_RUNTIME_API_EXTERN
bool
887 const wasm_module_t module);
897 WASM_RUNTIME_API_EXTERN
bool
909 WASM_RUNTIME_API_EXTERN
void
929 WASM_RUNTIME_API_EXTERN
void
956 wasm_obj_finalizer_t cb,
void *data);