From 569f789622f116177c8a1e32fb62a4e5a5c9dfe0 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 20 Dec 2022 09:52:54 -0600 Subject: Update RefCast representation to drop extra HeapType (#5350) The latest upstream version of ref.cast is parameterized with a target reference type, not just a heap type, because the nullability of the result is parameterizable. As a first step toward implementing these new, more flexible ref.cast instructions, change the internal representation of ref.cast to use the expression type as the cast target rather than storing a separate heap type field. For now require that the encoded semantics match the previously allowed semantics, though, so that none of the optimization passes need to be updated. --- src/ir/module-utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ir/module-utils.cpp') diff --git a/src/ir/module-utils.cpp b/src/ir/module-utils.cpp index f3d9201b7..8e6ac0d1a 100644 --- a/src/ir/module-utils.cpp +++ b/src/ir/module-utils.cpp @@ -71,7 +71,7 @@ struct CodeScanner } else if (curr->is()) { counts.note(curr->type); } else if (auto* cast = curr->dynCast()) { - counts.note(cast->intendedType); + counts.note(cast->type); } else if (auto* cast = curr->dynCast()) { counts.note(cast->intendedType); } else if (auto* cast = curr->dynCast()) { -- cgit v1.2.3