From 7c5f6c2aca80d70cf05fc83739f87ff23c75a1e3 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 1 Sep 2022 10:30:43 -0700 Subject: [Wasm GC] Fix evaluateKindCheck() on new externalize/internalize operations (#5000) Also add testing that they pass through the full optimizer. Fixes #4999 Drive-by fixes to the text in the assertions, which was copy-pasted. --- src/ir/gc-type-utils.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ir/gc-type-utils.h b/src/ir/gc-type-utils.h index cec4490e2..abe5f2dfc 100644 --- a/src/ir/gc-type-utils.h +++ b/src/ir/gc-type-utils.h @@ -100,7 +100,7 @@ inline EvaluationResult evaluateKindCheck(Expression* curr) { expected = I31; break; default: - WASM_UNREACHABLE("unhandled BrOn"); + WASM_UNREACHABLE("unhandled RefIs"); } child = is->value; } else if (auto* as = curr->dynCast()) { @@ -117,8 +117,12 @@ inline EvaluationResult evaluateKindCheck(Expression* curr) { case RefAsI31: expected = I31; break; + case ExternInternalize: + case ExternExternalize: + // These instructions can never be removed. + return Unknown; default: - WASM_UNREACHABLE("unhandled BrOn"); + WASM_UNREACHABLE("unhandled RefAs"); } child = as->value; } else { -- cgit v1.2.3