From 737c22d30798c491eea3b401b948b9327ac979de Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 20 Sep 2021 10:47:14 -0700 Subject: [Wasm GC] Add static variants of ref.test, ref.cast, and br_on_cast* (#4163) These variants take a HeapType that is the type we intend to cast to, and do not take an RTT. These are intended to be more statically optimizable. For now though this PR just implements the minimum to get them parsing and to get through the optimizer without crashing. Spec: https://docs.google.com/document/d/1afthjsL_B9UaMqCA5ekgVmOm75BVFu6duHNsN9-gnXw/edit# See #4149 --- scripts/gen-s-parser.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts/gen-s-parser.py') diff --git a/scripts/gen-s-parser.py b/scripts/gen-s-parser.py index 50ffdb301..556f537e7 100755 --- a/scripts/gen-s-parser.py +++ b/scripts/gen-s-parser.py @@ -537,11 +537,15 @@ instructions = [ ("i31.get_s", "makeI31Get(s, true)"), ("i31.get_u", "makeI31Get(s, false)"), ("ref.test", "makeRefTest(s)"), + ("ref.test_static", "makeRefTestStatic(s)"), ("ref.cast", "makeRefCast(s)"), + ("ref.cast_static", "makeRefCastStatic(s)"), ("br_on_null", "makeBrOn(s, BrOnNull)"), ("br_on_non_null", "makeBrOn(s, BrOnNonNull)"), ("br_on_cast", "makeBrOn(s, BrOnCast)"), + ("br_on_cast_static", "makeBrOnStatic(s, BrOnCast)"), ("br_on_cast_fail", "makeBrOn(s, BrOnCastFail)"), + ("br_on_cast_static_fail", "makeBrOnStatic(s, BrOnCastFail)"), ("br_on_func", "makeBrOn(s, BrOnFunc)"), ("br_on_non_func", "makeBrOn(s, BrOnNonFunc)"), ("br_on_data", "makeBrOn(s, BrOnData)"), -- cgit v1.2.3