-
Notifications
You must be signed in to change notification settings - Fork 628
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
[instantiation linking] refactor wasm_table_inst_t #3901
base: dev/instantiate_linking
Are you sure you want to change the base?
[instantiation linking] refactor wasm_table_inst_t #3901
Conversation
It's not just for consistency. It's also beneficial for tasks such as creating a table from the host, importing an exported table from an instance, sharing table elements between the host and WebAssembly, between different WebAssembly modules, and for setting or getting a table from the host or another module. Additionally, it simplifies the management of ownership for |
Hi @lum1n0us, I may be missing it, but I'm not seeing a way to access these (or equivalents) from the table after this refactor. Is there a way?
Thanks, |
I think there are two methods (possibly more). Please share your thoughts.
|
I guess the second way sounds nicer to me, but I don't have a strong opinion. |
d54c87a
to
dfb490e
Compare
dfb490e
to
c0eee7a
Compare
core/iwasm/aot/aot_runtime.c
Outdated
@@ -704,6 +708,8 @@ tables_instantiate(AOTModuleInstance *module_inst, AOTModule *module, | |||
tbl_inst->elem_ref_type.elem_ref_type = | |||
module->tables[i].table_type.elem_ref_type; | |||
#endif | |||
tbl_inst->is_table64 = table->table_type.flags & TABLE64_FLAG; | |||
tbl_inst->is_shared = table->table_type.flags & SHARED_TABLE_FLAG; |
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.
Still necessary. L751 will use that.
01c3c6c
to
41f7526
Compare
Because there is no member such as Later, I understood that the actual issue isn't obtaining a |
BTW, for the same purpose and idea, also need to refactor |
41f7526
to
786ae05
Compare
786ae05
to
997c4aa
Compare
Use
WASMTableInstance
and (#define AOTModuleInstance WASMModuleInstance
).