Skip to content

Conversation

@wenyongh
Copy link
Contributor

No description provided.

* 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* frame of the variables, they must be poped from the stack.
* frame of the variables, they must be popped from the stack.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

* 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);
Copy link
Collaborator

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?

Copy link
Contributor Author

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

*/
WASM_RUNTIME_API_EXTERN wasm_ref_type_t
wasm_func_type_get_result_type(const wasm_func_type_t func_type,
uint32 param_idx);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uint32 param_idx);
uint32 result_idx);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

/**
* Get parameter count of a function type
*/
WASM_RUNTIME_API_EXTERN uint32
Copy link
Collaborator

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?

Copy link
Contributor Author

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

wasm_obj_is_anyref_obj(const wasm_obj_t obj);

/**
* Check whether an object is a struct object, or, a i31/struct/array object
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

wasm_obj_is_internal_obj(const wasm_obj_t obj);

/**
* Check whether an object is a eq object
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Check whether an object is a eq object
* Check whether an object is an eq object

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks

Copy link
Collaborator

@xujuntwt95329 xujuntwt95329 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenyongh wenyongh merged commit 74417d6 into bytecodealliance:dev/gc_refactor Apr 23, 2023
@wenyongh wenyongh deleted the export_gc_api branch April 24, 2023 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants