From 916ce6f1a9f7c85102a8c69f593b301c8df5d19d Mon Sep 17 00:00:00 2001 From: Daniel Wirtz Date: Wed, 9 Sep 2020 03:40:09 +0200 Subject: Update reference types (#3084) Align with the current state of the reference types proposal: * Remove `nullref` * Remove `externref` and `funcref` subtyping * A `Literal` of a nullable reference type can now represent `null` (previously was type `nullref`) * Update the tests and temporarily comment out those tests relying on subtyping --- src/tools/wasm-reduce.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/tools/wasm-reduce.cpp') diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp index 9c9978b63..1a7c3544d 100644 --- a/src/tools/wasm-reduce.cpp +++ b/src/tools/wasm-reduce.cpp @@ -597,7 +597,6 @@ struct Reducer case Type::v128: case Type::funcref: case Type::externref: - case Type::nullref: case Type::exnref: continue; // not implemented yet case Type::none: @@ -623,7 +622,6 @@ struct Reducer case Type::v128: case Type::funcref: case Type::externref: - case Type::nullref: case Type::exnref: continue; // not implemented yet case Type::none: @@ -649,7 +647,6 @@ struct Reducer case Type::v128: case Type::funcref: case Type::externref: - case Type::nullref: case Type::exnref: continue; // not implemented yet case Type::none: @@ -675,7 +672,6 @@ struct Reducer case Type::v128: case Type::funcref: case Type::externref: - case Type::nullref: case Type::exnref: continue; // not implemented yet case Type::none: @@ -687,7 +683,6 @@ struct Reducer case Type::v128: case Type::funcref: case Type::externref: - case Type::nullref: case Type::exnref: continue; // not implemented yet case Type::none: @@ -1015,8 +1010,8 @@ struct Reducer return false; } // try to replace with a trivial value - if (curr->type.isRef()) { - RefNull* n = builder->makeRefNull(); + if (curr->type.isNullable()) { + RefNull* n = builder->makeRefNull(curr->type); return tryToReplaceCurrent(n); } if (curr->type.isTuple()) { -- cgit v1.2.3