summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm/wasm-type.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp
index f7a4fb13c..ce871c728 100644
--- a/src/wasm/wasm-type.cpp
+++ b/src/wasm/wasm-type.cpp
@@ -370,7 +370,7 @@ bool Type::isTuple() const {
bool Type::isRef() const {
if (isBasic()) {
- return id >= funcref && id <= dataref;
+ return id >= funcref && id <= _last_basic_type;
} else {
return getTypeInfo(*this)->isRef();
}
@@ -685,10 +685,10 @@ Type Type::getLeastUpperBound(Type a, Type b) {
return handleNullability(HeapType::eq);
}
// The LUB of two different reference types is anyref, which may or may
- // not be a valid type depending on whether the anyref feature is enabled.
- // When anyref is disabled, it is possible for the finalization of invalid
- // code to introduce a use of anyref via this function, but that is not a
- // problem because it will be caught and rejected by validation.
+ // not be a valid type depending on whether the GC feature is enabled. When
+ // GC is disabled, it is possible for the finalization of invalid code to
+ // introduce a use of anyref via this function, but that is not a problem
+ // because it will be caught and rejected by validation.
return Type::anyref;
}
if (a.isTuple()) {