Skip to content

Commit d38f3d4

Browse files
committed
gc: complete common heap type coverage in wasm_is_refheaptype_common()
Signed-off-by: zhenweijin <[email protected]>
1 parent 9a23968 commit d38f3d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/iwasm/common/gc/gc_type.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,13 @@ wasm_is_refheaptype_typeidx(const RefHeapType_Common *ref_heap_type)
269269
return ref_heap_type->heap_type >= 0 ? true : false;
270270
}
271271

272-
/* Whether a ref heap type is a common type: func/any/eq/i31/data,
273-
not (type i) or (rtt n i) or (rtt i) */
272+
/* Whether a ref heap type is a common type:
273+
func/any/eq/i31/data/nofunc/noextern, not (type i) or (rtt n i) or (rtt i) */
274274
inline static bool
275275
wasm_is_refheaptype_common(const RefHeapType_Common *ref_heap_type)
276276
{
277277
return ((ref_heap_type->heap_type >= (int32)HEAP_TYPE_ARRAY
278-
&& ref_heap_type->heap_type <= (int32)HEAP_TYPE_NONE)
278+
&& ref_heap_type->heap_type <= (int32)HEAP_TYPE_NOFUNC)
279279
#if WASM_ENABLE_STRINGREF != 0
280280
|| (ref_heap_type->heap_type >= (int32)HEAP_TYPE_STRINGVIEWITER
281281
&& ref_heap_type->heap_type <= (int32)HEAP_TYPE_I31)

0 commit comments

Comments
 (0)