diff options
author | Alon Zakai <azakai@google.com> | 2021-02-02 19:18:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-02 11:18:58 -0800 |
commit | 3f1287c4c30ff273972c7580d99ae1ca729ea108 (patch) | |
tree | c9a824048fc074167a6420ea086824c5941d515d /src | |
parent | cf51ca4f3b727e7efcfc043bb8120ed2c766285d (diff) | |
download | binaryen-3f1287c4c30ff273972c7580d99ae1ca729ea108.tar.gz binaryen-3f1287c4c30ff273972c7580d99ae1ca729ea108.tar.bz2 binaryen-3f1287c4c30ff273972c7580d99ae1ca729ea108.zip |
[GC] Feedback for #3536 (#3539)
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm/wasm-type.cpp | 10 |
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()) { |