Skip to content
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

Enhance GC subtyping checks #3317

Merged
merged 127 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
80e2f3d
Refactor GC feature (#1956)
wenyongh Feb 16, 2023
776d10f
GC: Enable extern cases, fix build issues (#1965)
wenyongh Feb 16, 2023
de5b11c
GC: Implement opcode array.new_canon_data (#1968)
wenyongh Feb 17, 2023
e89db5c
Implement GC for fast interpreter (#1999)
wenyongh Mar 7, 2023
5d44ec5
Merge branch main into dev/gc_refactor
wenyongh Mar 9, 2023
30b57cb
Implement GC struct opcodes for fast interpreter (#2030)
kylo5aby Mar 15, 2023
5283c8a
Implement GC array opcodes for fast interpreter (#2031)
yviansu Mar 15, 2023
7ef782e
Enable gc reclaim in wasm_exec_env_create (#2043)
yviansu Mar 23, 2023
181d957
nuttx: Add compile role for GC (#2077)
no1wudi Mar 28, 2023
3d327e2
Merge branch main into dev/gc_refactor (#2114)
wenyongh Apr 7, 2023
2779598
Fix GC loader issue and refine call_indirect for interpreter (#2118)
wenyongh Apr 7, 2023
5399211
Merge branch 'main' into dev/gc_refactor
wenyongh Apr 7, 2023
786cf6a
Support GC opcodes generated by binaryen (#2110)
xujuntwt95329 Apr 10, 2023
74417d6
Define the GC runtime APIs to export (#2143)
wenyongh Apr 23, 2023
5cea277
[GC] Fix uint type and add macro for cpp in gc_export.h (#2160)
xujuntwt95329 Apr 27, 2023
0b9ed39
Fix type of gc_obj field in union WASMValue (#2177)
xujuntwt95329 May 5, 2023
2e5ba11
Implement part of GC runtime export APIs (#2154)
kylo5aby May 5, 2023
453bf2d
[GC] Add API to get obj defined type and call func ref (#2180)
xujuntwt95329 May 6, 2023
9bf0999
[GC] Remove unused normalize API (#2182)
xujuntwt95329 May 6, 2023
21e4bcb
Implement GC export APIs related to func and array (#2184)
xujuntwt95329 May 6, 2023
c6e1f64
Update comments in gc_export.h and optimize wasm ref type processing …
xujuntwt95329 May 8, 2023
496fbbd
Optimize get ref_type from ref_type_maps with wasm_reftype_map_find (…
yviansu May 8, 2023
02f0156
GC: Change table_elem_type_t to pointer width to simplify the related…
no1wudi May 9, 2023
8704532
Merge pull request #2191 from bytecodealliance/main
wenyongh May 9, 2023
24c0fbd
Fix GC compile errors (#2203)
wenyongh May 11, 2023
8021df9
Fix GC issues (#2204)
xujuntwt95329 May 12, 2023
13284e6
[GC] Add missing packed types in gc_export.h (#2210)
xujuntwt95329 May 15, 2023
ea3b828
Fix ref type equal check for the packed types (#2215)
kylo5aby May 15, 2023
035cca0
Add --enable-gc option to wamrc (#2190)
no1wudi May 15, 2023
e189dcb
GC AOT: Change func_types to types in AOTModule (#2217)
no1wudi May 17, 2023
190f690
GC AOT: Emit string with '\0' as terminator (#2221)
no1wudi May 18, 2023
9fd8480
[GC] Fix frame ref not cleared issue in classic and fast interpreter …
xujuntwt95329 May 30, 2023
366b3b7
Merge branch main into dev/gc_refactor
wenyongh Jun 5, 2023
f48ffbc
Fix fast interpreter spec test issue (#2265)
xujuntwt95329 Jun 6, 2023
d665999
GC: Make Func/Struct/Array type inherited from WASMType (#2271)
no1wudi Jun 7, 2023
edba40c
GC: Change type of `types` to AOTType in AOTModule and AOTCompData (#…
no1wudi Jun 8, 2023
6e76300
Specify wasm features supported by feature_flags (#2302)
no1wudi Jun 22, 2023
76faf89
Merge branch main into dev/gc_refactor
wenyongh Jun 27, 2023
254bbdd
Add GC finalizer mechanism (#2325)
xujuntwt95329 Jul 7, 2023
61b692e
Free extra_info_nodes during heap destroying (#2353)
xujuntwt95329 Jul 11, 2023
f906585
Fix drop opcode not clear frame ref issue (#2360)
xujuntwt95329 Jul 18, 2023
6a86817
Fix static code analyzing issues (#2371)
xujuntwt95329 Jul 20, 2023
803597d
Merge branch main into dev/gc_refactor
wenyongh Aug 7, 2023
9f3a65b
Fix inconsistences in marking slot for gc object (#2434)
kylo5aby Aug 8, 2023
fb8dbc1
Fix type checking for array.copy opcode (#2438)
xujuntwt95329 Aug 8, 2023
a051dd7
Fix several memory leak issues (#2445)
xujuntwt95329 Aug 11, 2023
48b9c8c
Process GC types in wasm_runtime_invoke_native_raw (#2456)
xujuntwt95329 Aug 14, 2023
2e8d2c4
Enable GC spec test on ubuntu (#2461)
no1wudi Aug 14, 2023
0bd23eb
Fix validation non-nullable locals (#2462)
xujuntwt95329 Aug 14, 2023
d77f979
Fix extra_info_nodes size (#2464)
xujuntwt95329 Aug 15, 2023
7d86111
Refactor the LLVM IR translation of the existing opcodes for GC AOT (…
TianlongLiang Aug 23, 2023
03155cf
Merge branch main into dev/gc_refactor
wenyongh Aug 23, 2023
27aea1c
Merge pull request #2501 from bytecodealliance/main
wenyongh Aug 23, 2023
98fa210
Fix parameter processing in wasm_runtime_call_wasm_a (#2505)
xujuntwt95329 Aug 25, 2023
33ac031
Enhance LLVM AOT/JIT stack frame dump (#2350)
wenyongh Aug 28, 2023
6de889b
Fix total free size calculation during reclaiming objects (#2510)
xujuntwt95329 Aug 29, 2023
7158e39
Merge branch 'main' into dev/aot_stack_frame
wenyongh Sep 4, 2023
6cacbc6
Merge pull request #2540 from bytecodealliance/main
wenyongh Sep 11, 2023
fd5862f
Enhance AOT stack frame dump (#2541)
wenyongh Sep 15, 2023
c1dc08a
Merge branch 'main' into dev/aot_stack_frame
wenyongh Sep 17, 2023
067a86a
Implement AOT file emitting and loading for GC (#2366)
no1wudi Sep 19, 2023
4b09e28
Add option for JIT stack frame and update documents (#2565)
wenyongh Sep 19, 2023
a9cac2e
AOT compiler: Implement part of GC opcode compilation (#2486)
TianlongLiang Sep 19, 2023
7a9ed07
Merge branch main into dev/aot_stack_frame
wenyongh Oct 8, 2023
85869ed
Merge branch main into dev/gc_refactor
wenyongh Oct 8, 2023
ac426ee
GC AOT: Fix compile warnings and errors (#2623)
wenyongh Oct 8, 2023
760505e
AOT compiler: Implement left of GC opcode compilation (#2487)
TianlongLiang Oct 8, 2023
ae508e2
Merge branch dev/aot_stack_frame into dev/gc_refactor
wenyongh Oct 9, 2023
40896eb
Restore AOT stack frame after call func to fix CI error
wenyongh Oct 9, 2023
872db7c
Make max table size configurable through macro (#2632)
xujuntwt95329 Oct 12, 2023
995817e
Init frame->sp and frame->ip at entry of call func in interpreter (#2…
xujuntwt95329 Oct 12, 2023
3a31e51
Fix GC AOT issues (#2640)
wenyongh Oct 16, 2023
01627ed
Fix issues in compile GC struct/array opcodes (#2652)
wenyongh Oct 19, 2023
54fc47e
Register GC symbols to AOT loader (#2654)
no1wudi Oct 19, 2023
06d46b0
Fix some GC relative issues (#2656)
no1wudi Oct 23, 2023
2f45f12
Support stringref proposal (#2651)
yviansu Oct 23, 2023
f863d27
Add cpp macro in string_object.h (#2660)
xujuntwt95329 Oct 23, 2023
3362738
Fix AOT loader for struct type (#2658)
no1wudi Oct 23, 2023
52328f0
Fix GC AOT struct/array/i31/exception issues (#2664)
wenyongh Oct 25, 2023
348d82b
Merge branch main into dev/gc_refactor
wenyongh Nov 3, 2023
f9ccffd
Fix struct field offset and size in AOT loader (#2729)
xujuntwt95329 Nov 8, 2023
6d92534
Add gc performance profiling (#2716)
WenLY1 Nov 8, 2023
64e40c1
Fix more GC AOT/JIT issues (#2727)
wenyongh Nov 9, 2023
b4406fa
Fix align when emitting struct type (#2742)
xujuntwt95329 Nov 10, 2023
f926301
Merge dupplicated compile options for wamrc (#2748)
no1wudi Nov 10, 2023
943274e
Fix GC struct field offset calculation in AOT compiler (#2746)
wenyongh Nov 13, 2023
5d9cbfe
Implement GC AOT object reclaim process (#2762)
wenyongh Nov 22, 2023
c4010b0
Fix GC AOT on 32bit target (#2814)
xujuntwt95329 Nov 23, 2023
77d27c9
Enable stringref aot (#2816)
xujuntwt95329 Nov 27, 2023
238208a
Refine the GC frame ref flag commit (#2822)
wenyongh Nov 27, 2023
9c71ca6
Merge branch main into dev/gc_refactor
wenyongh Nov 29, 2023
8e5ab79
Disable ems memory allocator heap corruption check when GC is enabled…
wenyongh Nov 29, 2023
92176be
Sync up with the latest GC MVP spec proposal (#2836)
xujuntwt95329 Dec 12, 2023
cf7350f
Implement aot_alloc_frame/aot_free_frame with LLVM IRs (#2830)
wenyongh Dec 12, 2023
eab09a2
Merge branch main into dev/gc_refactor
wenyongh Dec 12, 2023
837a319
Fix typo of WASM_ENABLE_SPEC_TEST macro in wasm_application.c (#2902)
no1wudi Dec 13, 2023
5db9c8f
Fix warnings of printf format string mismatch (#2903)
no1wudi Dec 13, 2023
8099e7e
nuttx/wamr.mk: Fix extraneous text after 'endif' directive (#2912)
no1wudi Dec 20, 2023
c898d3a
Enable string literal section for app-manager (#2904)
xujuntwt95329 Dec 21, 2023
7de3170
Emit SIMD flag to AOT file only if SIMD is actually used (#2911)
no1wudi Dec 25, 2023
1d43fda
Enable GC spectest for NuttX (#2896)
no1wudi Dec 26, 2023
a210b97
Fix some typos and unify the AOT file format for init data (#2915)
TianlongLiang Dec 27, 2023
e6d210a
Merge branch main into dev/gc_refactor
wenyongh Jan 3, 2024
cc23a09
Fix test script error and related wamrc and GC issues (#2975)
wenyongh Jan 8, 2024
d31455f
Refactor aot stack frame commit (#2976)
wenyongh Jan 8, 2024
ad57ffb
Enable non-GC spec test again on NuttX (#2986)
no1wudi Jan 9, 2024
e7bbf88
Refine the format of call stack dump (#2996)
wenyongh Jan 11, 2024
a74839a
Don't commit params/locals ref flags in AOT code (#2990)
TianlongLiang Jan 12, 2024
6440445
Merge branch main into dev/gc_refactor
wenyongh Jan 12, 2024
4f0551a
Enable quick aot entry when GC is enabled (#3015)
wenyongh Jan 18, 2024
7c812ec
Enhance aot feature flags emit and load (#3048)
wenyongh Jan 23, 2024
e70c521
Merge branch main into dev/gc_refactor
wenyongh Jan 26, 2024
71b6bdf
Merge branch main into dev/gc_refactor
wenyongh Feb 2, 2024
dcde455
Add wasm_runtime_get_cur_local_obj_ref and change API names (#3117)
LevelCA Feb 4, 2024
004b913
Merge branch main into dev/gc_refactor
wenyongh Feb 4, 2024
bae036f
addr2line.py: A tool to convert the addr in call-stack dump to the li…
lum1n0us Feb 5, 2024
2f6e4b9
Merge branch main into dev/gc_refactor
wenyongh Feb 5, 2024
9bdd349
Fix read and validation of GC sub opcode (#3134)
wenyongh Feb 5, 2024
51eaf80
Remove JIT_STACK_FRAME macro (#3127)
wenyongh Feb 5, 2024
60c51e5
Merge branch main into dev/gc_refactor
wenyongh Feb 6, 2024
0dd9521
Merge branch main into dev/gc_refactor
wenyongh Apr 12, 2024
95a4731
Enhance GC feature
wenyongh Apr 15, 2024
ed64df9
fix init table data in aot instantiation
wenyongh Apr 15, 2024
f5eee38
fix coding guideline check
wenyongh Apr 15, 2024
b457180
fix func type check in call_ref
wenyongh Apr 15, 2024
b6d5673
fix type index check
wenyongh Apr 16, 2024
3dfef85
fix update dynamic_offset in op else
wenyongh Apr 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion build-scripts/config_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ endif ()

# Sanitizers

set(WAMR_BUILD_SANITIZER $ENV{WAMR_BUILD_SANITIZER})
if (NOT DEFINED WAMR_BUILD_SANITIZER)
set(WAMR_BUILD_SANITIZER $ENV{WAMR_BUILD_SANITIZER})
endif ()

if (NOT DEFINED WAMR_BUILD_SANITIZER)
set(WAMR_BUILD_SANITIZER "")
Expand Down Expand Up @@ -554,3 +556,6 @@ else ()
# Disable aot intrinsics for interp, fast-jit and llvm-jit
add_definitions (-DWASM_ENABLE_AOT_INTRINSICS=0)
endif ()
if (NOT WAMR_BUILD_SANITIZER STREQUAL "")
message (" Sanitizer ${WAMR_BUILD_SANITIZER} enabled")
endif ()
94 changes: 66 additions & 28 deletions core/iwasm/aot/aot_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1525,45 +1525,60 @@ load_table_info(const uint8 **p_buf, const uint8 *buf_end, AOTModule *module,
return false;
}

static void
destroy_type(AOTType *type)
{
#if WASM_ENABLE_GC != 0
if (type->ref_count > 1) {
/* The type is referenced by other types
of current aot module */
type->ref_count--;
return;
}

if (type->type_flag == WASM_TYPE_FUNC) {
AOTFuncType *func_type = (AOTFuncType *)type;
if (func_type->ref_type_maps != NULL) {
bh_assert(func_type->ref_type_map_count > 0);
wasm_runtime_free(func_type->ref_type_maps);
}
}
else if (type->type_flag == WASM_TYPE_STRUCT) {
AOTStructType *struct_type = (AOTStructType *)type;
if (struct_type->ref_type_maps != NULL) {
bh_assert(struct_type->ref_type_map_count > 0);
wasm_runtime_free(struct_type->ref_type_maps);
}
}
#endif
wasm_runtime_free(type);
}

static void
destroy_types(AOTType **types, uint32 count)
{
uint32 i;
for (i = 0; i < count; i++) {

if (types[i]) {
#if WASM_ENABLE_GC != 0
if (types[i]->type_flag == WASM_TYPE_FUNC) {
AOTFuncType *func_type = (AOTFuncType *)types[i];
if (func_type->ref_type_maps != NULL) {
bh_assert(func_type->ref_type_map_count > 0);
wasm_runtime_free(func_type->ref_type_maps);
}
}
else if (types[i]->type_flag == WASM_TYPE_STRUCT) {
AOTStructType *struct_type = (AOTStructType *)types[i];
if (struct_type->ref_type_maps != NULL) {
bh_assert(struct_type->ref_type_map_count > 0);
wasm_runtime_free(struct_type->ref_type_maps);
}
}
#endif
wasm_runtime_free(types[i]);
destroy_type(types[i]);
}
}
wasm_runtime_free(types);
}

#if WASM_ENABLE_GC != 0
static void
init_base_type(AOTType *base_type, uint16 type_flag, bool is_sub_final,
uint32 parent_type_idx, uint16 rec_count, uint16 rec_idx)
init_base_type(AOTType *base_type, uint32 type_idx, uint16 type_flag,
bool is_sub_final, uint32 parent_type_idx, uint16 rec_count,
uint16 rec_idx)
{
base_type->type_flag = type_flag;
base_type->ref_count = 1;
base_type->is_sub_final = is_sub_final;
base_type->parent_type_idx = parent_type_idx;
base_type->rec_count = rec_count;
base_type->rec_idx = rec_idx;
base_type->rec_begin_type_idx = type_idx - rec_idx;
}

static bool
Expand All @@ -1576,7 +1591,7 @@ load_types(const uint8 **p_buf, const uint8 *buf_end, AOTModule *module,
uint32 i, j;
uint32 type_flag, param_cell_num, ret_cell_num;
uint16 param_count, result_count, ref_type_map_count, rec_count, rec_idx;
bool is_sub_final;
bool is_equivalence_type, is_sub_final;
uint32 parent_type_idx;
WASMRefType ref_type;

Expand All @@ -1590,12 +1605,31 @@ load_types(const uint8 **p_buf, const uint8 *buf_end, AOTModule *module,

/* Create each type */
for (i = 0; i < module->type_count; i++) {

buf = align_ptr(buf, 4);

/* Read base type info */
read_uint16(buf, buf_end, type_flag);
read_uint16(buf, buf_end, is_sub_final);

read_uint8(buf, buf_end, is_equivalence_type);
/* If there is an equivalence type, re-use it */
if (is_equivalence_type) {
uint8 u8;
/* padding */
read_uint8(buf, buf_end, u8);
(void)u8;

read_uint32(buf, buf_end, j);
if (module->types[j]->ref_count == UINT16_MAX) {
set_error_buf(error_buf, error_buf_size,
"wasm type's ref count too large");
goto fail;
}
module->types[j]->ref_count++;
module->types[i] = module->types[j];
continue;
}

read_uint8(buf, buf_end, is_sub_final);
read_uint32(buf, buf_end, parent_type_idx);
read_uint16(buf, buf_end, rec_count);
read_uint16(buf, buf_end, rec_idx);
Expand All @@ -1620,7 +1654,7 @@ load_types(const uint8 **p_buf, const uint8 *buf_end, AOTModule *module,

types[i] = (AOTType *)func_type;

init_base_type((AOTType *)func_type, type_flag, is_sub_final,
init_base_type((AOTType *)func_type, i, type_flag, is_sub_final,
parent_type_idx, rec_count, rec_idx);
func_type->param_count = param_count;
func_type->result_count = result_count;
Expand Down Expand Up @@ -1726,7 +1760,7 @@ load_types(const uint8 **p_buf, const uint8 *buf_end, AOTModule *module,
offset = (uint32)offsetof(WASMStructObject, field_data);
types[i] = (AOTType *)struct_type;

init_base_type((AOTType *)struct_type, type_flag, is_sub_final,
init_base_type((AOTType *)struct_type, i, type_flag, is_sub_final,
parent_type_idx, rec_count, rec_idx);
struct_type->field_count = field_count;
struct_type->ref_type_map_count = ref_type_map_count;
Expand Down Expand Up @@ -1812,7 +1846,7 @@ load_types(const uint8 **p_buf, const uint8 *buf_end, AOTModule *module,

types[i] = (AOTType *)array_type;

init_base_type((AOTType *)array_type, type_flag, is_sub_final,
init_base_type((AOTType *)array_type, i, type_flag, is_sub_final,
parent_type_idx, rec_count, rec_idx);
read_uint16(buf, buf_end, array_type->elem_flags);
read_uint8(buf, buf_end, array_type->elem_type);
Expand Down Expand Up @@ -1841,7 +1875,6 @@ load_types(const uint8 **p_buf, const uint8 *buf_end, AOTModule *module,
if (rec_count == 0) {
bh_assert(rec_idx == 0);
}

for (j = i - rec_idx; j <= i; j++) {
AOTType *cur_type = module->types[j];
parent_type_idx = cur_type->parent_type_idx;
Expand All @@ -1850,6 +1883,11 @@ load_types(const uint8 **p_buf, const uint8 *buf_end, AOTModule *module,

module->types[j]->parent_type = parent_type;
module->types[j]->root_type = parent_type->root_type;
if (parent_type->inherit_depth == UINT16_MAX) {
set_error_buf(error_buf, error_buf_size,
"parent type's inherit depth too large");
goto fail;
}
module->types[j]->inherit_depth =
parent_type->inherit_depth + 1;
}
Expand All @@ -1867,7 +1905,7 @@ load_types(const uint8 **p_buf, const uint8 *buf_end, AOTModule *module,
AOTType *parent_type = module->types[parent_type_idx];
/* subtyping has been checked during compilation */
bh_assert(wasm_type_is_subtype_of(
module->types[j], parent_type, module->types, i));
module->types[j], parent_type, module->types, i + 1));
(void)parent_type;
}
}
Expand Down
1 change: 1 addition & 0 deletions core/iwasm/aot/aot_reloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ typedef struct {
REG_SYM(aot_array_init_with_data), \
REG_SYM(aot_create_func_obj), \
REG_SYM(aot_obj_is_instance_of), \
REG_SYM(aot_func_type_is_super_of), \
REG_SYM(aot_rtt_type_new), \
REG_SYM(wasm_array_obj_copy), \
REG_SYM(wasm_array_obj_new), \
Expand Down
22 changes: 20 additions & 2 deletions core/iwasm/aot/aot_runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -1721,15 +1721,17 @@ aot_instantiate(AOTModule *module, AOTModuleInstance *parent,

bh_assert(table_init_data);

bh_assert(table_init_data->table_index < module_inst->table_count);
table = module_inst->tables[table_init_data->table_index];
bh_assert(table);

table_data = table->elems;
bh_assert(table_data);

wasm_runtime_get_table_inst_elem_type(
(WASMModuleInstanceCommon *)module_inst, i, &tbl_elem_type,
&tbl_elem_ref_type, &tbl_init_size, &tbl_max_size);
(WASMModuleInstanceCommon *)module_inst,
table_init_data->table_index, &tbl_elem_type, &tbl_elem_ref_type,
&tbl_init_size, &tbl_max_size);

if (!wasm_elem_is_declarative(table_init_data->mode)
&& !wasm_reftype_is_subtype_of(
Expand Down Expand Up @@ -4477,6 +4479,22 @@ aot_obj_is_instance_of(AOTModuleInstance *module_inst, WASMObjectRef gc_obj,
return wasm_obj_is_instance_of(gc_obj, type_index, types, type_count);
}

bool
aot_func_type_is_super_of(AOTModuleInstance *module_inst, uint32 type_idx1,
uint32 type_idx2)
{
AOTModule *aot_module = (AOTModule *)module_inst->module;
AOTType **types = aot_module->types;

if (type_idx1 == type_idx2)
return true;

bh_assert(types[type_idx1]->type_flag == WASM_TYPE_FUNC);
bh_assert(types[type_idx2]->type_flag == WASM_TYPE_FUNC);
return wasm_func_type_is_super_of((WASMFuncType *)types[type_idx1],
(WASMFuncType *)types[type_idx2]);
}

WASMRttTypeRef
aot_rtt_type_new(AOTModuleInstance *module_inst, uint32 type_index)
{
Expand Down
5 changes: 5 additions & 0 deletions core/iwasm/aot/aot_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,11 @@ bool
aot_obj_is_instance_of(AOTModuleInstance *module_inst, WASMObjectRef gc_obj,
uint32 type_index);

/* Whether func type1 is one of super types of func type2 */
bool
aot_func_type_is_super_of(AOTModuleInstance *module_inst, uint32 type_idx1,
uint32 type_idx2);

WASMRttTypeRef
aot_rtt_type_new(AOTModuleInstance *module_inst, uint32 type_index);

Expand Down
7 changes: 6 additions & 1 deletion core/iwasm/common/gc/gc_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,12 @@ wasm_defined_type_equal(WASMType *const def_type1, WASMType *const def_type2,
}
#endif
#if WASM_ENABLE_AOT != 0
/* TODO */
if (module->module_type == Wasm_Module_AoT) {
AOTModule *aot_module = (AOTModule *)module;

types = aot_module->types;
type_count = aot_module->type_count;
}
#endif

bh_assert(types);
Expand Down
Loading
Loading