summaryrefslogtreecommitdiff
path: root/src/tools/fuzzing.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-01-26 21:09:31 +0000
committerGitHub <noreply@github.com>2021-01-26 13:09:31 -0800
commit5e57a13614c56f959faab675d6bcabbd629ec562 (patch)
tree3c86a2741cffa6da009741506eed4513acc60bf1 /src/tools/fuzzing.h
parent89164cdf1403a21a3d79ada0f0cf529d526c9de6 (diff)
downloadbinaryen-5e57a13614c56f959faab675d6bcabbd629ec562.tar.gz
binaryen-5e57a13614c56f959faab675d6bcabbd629ec562.tar.bz2
binaryen-5e57a13614c56f959faab675d6bcabbd629ec562.zip
[GC] RefIsNull => RefIs. (#3516)
This internal refactoring prepares us for ref.is_func/data/i31, by renaming the node and adding an "op" field. For now that field must always be "Null" which means it is a ref.is_null. This adjusts the C API to match the new IR shape. The high-level JS API is unchanged.
Diffstat (limited to 'src/tools/fuzzing.h')
-rw-r--r--src/tools/fuzzing.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h
index 7e5a56ab1..22d9a12e6 100644
--- a/src/tools/fuzzing.h
+++ b/src/tools/fuzzing.h
@@ -2943,10 +2943,11 @@ private:
WASM_UNREACHABLE("invalid value");
}
+ // TODO: support other RefIs variants, and rename this
Expression* makeRefIsNull(Type type) {
assert(type == Type::i32);
assert(wasm.features.hasReferenceTypes());
- return builder.makeRefIsNull(make(getReferenceType()));
+ return builder.makeRefIs(RefIsNull, make(getReferenceType()));
}
Expression* makeRefEq(Type type) {