Support extended constant expressions (#4432)
* implement extended const expr (#4318) * add a toggle to enable extended const on wamrc (#4412)
This commit is contained in:
@ -5350,12 +5350,14 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
|
||||
|| init_values[i].init_expr_type
|
||||
== INIT_EXPR_TYPE_FUNCREF_CONST);
|
||||
#if WASM_ENABLE_GC == 0
|
||||
table_elems[i] =
|
||||
(table_elem_type_t)init_values[i].u.ref_index;
|
||||
table_elems[i] = (table_elem_type_t)init_values[i]
|
||||
.u.unary.v.ref_index;
|
||||
#else
|
||||
if (init_values[i].u.ref_index != UINT32_MAX) {
|
||||
if (init_values[i].u.unary.v.ref_index
|
||||
!= UINT32_MAX) {
|
||||
if (!(func_obj = wasm_create_func_obj(
|
||||
module, init_values[i].u.ref_index,
|
||||
module,
|
||||
init_values[i].u.unary.v.ref_index,
|
||||
true, NULL, 0))) {
|
||||
goto got_exception;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user