From e35cdb97adf6eb2ade2be7734d1c6c397d440dc1 Mon Sep 17 00:00:00 2001 From: Daniel Wirtz Date: Sat, 19 Sep 2020 08:48:06 +0200 Subject: GC: Integrate eqref and i31ref types (#3141) Adds the `eqref` and `i31ref` types to their respective code locations. Implements what can be implemented trivially and otherwise traps with a TODO for now. Integration of `eqref` is mostly complete due to it being nullable, just like `anyref`, but `i31ref` needs to remain disabled in the fuzzer because we are lacking the functionality to create trivial `i31ref` values, i.e. `(i31.new (i32.const 0))`, which is left for follow-ups to implement. --- src/wasm/wasm-validator.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/wasm/wasm-validator.cpp') diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 505753c88..16ba60d72 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -1396,6 +1396,8 @@ void FunctionValidator::validateMemBytes(uint8_t bytes, case Type::externref: case Type::exnref: case Type::anyref: + case Type::eqref: + case Type::i31ref: case Type::none: WASM_UNREACHABLE("unexpected type"); } @@ -2204,6 +2206,8 @@ void FunctionValidator::validateAlignment( case Type::externref: case Type::exnref: case Type::anyref: + case Type::eqref: + case Type::i31ref: case Type::none: WASM_UNREACHABLE("invalid type"); } -- cgit v1.2.3