New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define the GC runtime APIs to export #2143
Define the GC runtime APIs to export #2143
Conversation
core/iwasm/include/gc_export.h
Outdated
* this type of variable so that they can be traced when GC occurs. | ||
* Before using such a variable, it must be pushed onto the stack | ||
* (implemented as a chain) of such variables, and before leaving the | ||
* frame of the variables, they must be poped from the stack. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* frame of the variables, they must be poped from the stack. | |
* frame of the variables, they must be popped from the stack. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
core/iwasm/include/gc_export.h
Outdated
* Check whether a defined type is a function type | ||
*/ | ||
WASM_RUNTIME_API_EXTERN bool | ||
wasm_defined_type_is_func_type(const wasm_defined_type_t def_type1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the 1
in def_type1
mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo, should be def_type
core/iwasm/include/gc_export.h
Outdated
*/ | ||
WASM_RUNTIME_API_EXTERN wasm_ref_type_t | ||
wasm_func_type_get_result_type(const wasm_func_type_t func_type, | ||
uint32 param_idx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uint32 param_idx); | |
uint32 result_idx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
core/iwasm/include/gc_export.h
Outdated
/** | ||
* Get parameter count of a function type | ||
*/ | ||
WASM_RUNTIME_API_EXTERN uint32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In wasm_export.h
, we use uint32_t
rather than uint32
, should we keep the same rule in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, had better use xxx_t
types
core/iwasm/include/gc_export.h
Outdated
wasm_obj_is_anyref_obj(const wasm_obj_t obj); | ||
|
||
/** | ||
* Check whether an object is a struct object, or, a i31/struct/array object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Check whether an object is a struct object, or, a i31/struct/array object | |
* Check whether an object is a struct object, or, an i31/struct/array object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
core/iwasm/include/gc_export.h
Outdated
wasm_obj_is_internal_obj(const wasm_obj_t obj); | ||
|
||
/** | ||
* Check whether an object is a eq object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Check whether an object is a eq object | |
* Check whether an object is an eq object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.