diff options
author | Alon Zakai <azakai@google.com> | 2021-02-02 00:47:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 16:47:46 -0800 |
commit | a4837c095275b465005841616ff10bcd0b0d7996 (patch) | |
tree | fef7ce382071dd9d0aef74ab8b3ee1219367728d /src/wasm-type.h | |
parent | eafb0a4ef25cd82317ac8fa84a9d7e58f9382fcc (diff) | |
download | binaryen-a4837c095275b465005841616ff10bcd0b0d7996.tar.gz binaryen-a4837c095275b465005841616ff10bcd0b0d7996.tar.bz2 binaryen-a4837c095275b465005841616ff10bcd0b0d7996.zip |
[GC] isGCData => isData (#3534)
We added isGCData() before we had dataref. But now there is a clear
parallel of Function vs Data. This PR makes us more consistent there,
renaming isGCData to isData and using that throughout.
This also fixes a bug where the old isGCData just checked if the input
was an Array or a Struct, and ignored the data heap type itself. It is not
possible to test that, however, due to other bugs, so that is deferred.
Diffstat (limited to 'src/wasm-type.h')
-rw-r--r-- | src/wasm-type.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h index bf3dd69de..f5c2fb273 100644 --- a/src/wasm-type.h +++ b/src/wasm-type.h @@ -136,6 +136,7 @@ public: bool isSingle() const { return isConcrete() && !isTuple(); } bool isRef() const; bool isFunction() const; + bool isData() const; bool isException() const; bool isNullable() const; bool isRtt() const; @@ -314,6 +315,7 @@ public: constexpr bool isBasic() const { return id <= _last_basic_type; } constexpr bool isCompound() const { return id > _last_basic_type; } bool isFunction() const; + bool isData() const; bool isSignature() const; bool isStruct() const; bool isArray() const; |