summaryrefslogtreecommitdiff
path: root/src/tools/fuzzing.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-01-21 22:09:47 +0000
committerGitHub <noreply@github.com>2021-01-21 14:09:47 -0800
commit3f4d3b3eff5d8112a9da3674a5f5eea696ca3c7d (patch)
tree30d3ddedf6ae2de10f56d6acea64f2b17640041b /src/tools/fuzzing.h
parent527e9f9ed76cee0baaa67e89569c282a3782be08 (diff)
downloadbinaryen-3f4d3b3eff5d8112a9da3674a5f5eea696ca3c7d.tar.gz
binaryen-3f4d3b3eff5d8112a9da3674a5f5eea696ca3c7d.tar.bz2
binaryen-3f4d3b3eff5d8112a9da3674a5f5eea696ca3c7d.zip
[GC] Add dataref type (#3500)
This is not 100% of everything, but is enough to get tests passing, which includes full binary and text format support, getting all switches to compile without error, and some additions to InstrumentLocals.
Diffstat (limited to 'src/tools/fuzzing.h')
-rw-r--r--src/tools/fuzzing.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h
index 09e83031d..749e6c31f 100644
--- a/src/tools/fuzzing.h
+++ b/src/tools/fuzzing.h
@@ -1652,6 +1652,7 @@ private:
case Type::anyref:
case Type::eqref:
case Type::i31ref:
+ case Type::dataref:
case Type::none:
case Type::unreachable:
WASM_UNREACHABLE("invalid type");
@@ -1758,6 +1759,7 @@ private:
case Type::anyref:
case Type::eqref:
case Type::i31ref:
+ case Type::dataref:
case Type::none:
case Type::unreachable:
WASM_UNREACHABLE("invalid type");
@@ -1894,6 +1896,7 @@ private:
case Type::anyref:
case Type::eqref:
case Type::i31ref:
+ case Type::dataref:
case Type::none:
case Type::unreachable:
WASM_UNREACHABLE("invalid type");
@@ -1941,6 +1944,7 @@ private:
case Type::anyref:
case Type::eqref:
case Type::i31ref:
+ case Type::dataref:
case Type::none:
case Type::unreachable:
WASM_UNREACHABLE("unexpected type");
@@ -2013,6 +2017,7 @@ private:
case Type::anyref:
case Type::eqref:
case Type::i31ref:
+ case Type::dataref:
case Type::none:
case Type::unreachable:
WASM_UNREACHABLE("unexpected type");
@@ -2042,6 +2047,7 @@ private:
case Type::anyref:
case Type::eqref:
case Type::i31ref:
+ case Type::dataref:
case Type::none:
case Type::unreachable:
WASM_UNREACHABLE("unexpected type");
@@ -2075,6 +2081,9 @@ private:
if (oneIn(2) && type.isNullable()) {
return builder.makeRefNull(type);
}
+ if (type == Type::dataref) {
+ WASM_UNREACHABLE("TODO: dataref");
+ }
// TODO: randomize the order
for (auto& func : wasm.functions) {
// FIXME: RefFunc type should be non-nullable, but we emit nullable
@@ -2177,6 +2186,7 @@ private:
case Type::anyref:
case Type::eqref:
case Type::i31ref:
+ case Type::dataref:
return makeTrivial(type);
case Type::none:
case Type::unreachable:
@@ -2325,6 +2335,7 @@ private:
case Type::anyref:
case Type::eqref:
case Type::i31ref:
+ case Type::dataref:
case Type::none:
case Type::unreachable:
WASM_UNREACHABLE("unexpected type");
@@ -2567,6 +2578,7 @@ private:
case Type::anyref:
case Type::eqref:
case Type::i31ref:
+ case Type::dataref:
case Type::none:
case Type::unreachable:
WASM_UNREACHABLE("unexpected type");
@@ -2774,6 +2786,7 @@ private:
case Type::anyref:
case Type::eqref:
case Type::i31ref:
+ case Type::dataref:
case Type::none:
case Type::unreachable:
WASM_UNREACHABLE("unexpected type");
@@ -3041,6 +3054,7 @@ private:
Type::eqref,
Type::i31ref));
// TODO: emit typed function references types
+ // TODO: dataref
}
Type getSingleConcreteType() { return pick(getSingleConcreteTypes()); }
@@ -3055,6 +3069,7 @@ private:
Type::anyref,
Type::eqref,
Type::i31ref));
+ // TODO: dataref
}
Type getReferenceType() { return pick(getReferenceTypes()); }