From 2bdc4841b680ee44e132bbb07f5167eaa7226f99 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 27 Jan 2021 17:46:31 +0000 Subject: [GC] ref.as_* (#3520) These are similar to is, but instead of returning an i32 answer, they trap on an invalid value, and return it otherwise. These could in theory be in a single RefDoThing, with opcodes for both As and Is, but as the return values are different, that would be a little odd, and the name would be less clear. --- scripts/gen-s-parser.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/gen-s-parser.py b/scripts/gen-s-parser.py index ff6172138..5c1ed5dd7 100755 --- a/scripts/gen-s-parser.py +++ b/scripts/gen-s-parser.py @@ -568,6 +568,9 @@ instructions = [ ("ref.is_func", "makeRefIs(s, RefIsFunc)"), ("ref.is_data", "makeRefIs(s, RefIsData)"), ("ref.is_i31", "makeRefIs(s, RefIsI31)"), + ("ref.as_func", "makeRefAs(s, RefAsFunc)"), + ("ref.as_data", "makeRefAs(s, RefAsData)"), + ("ref.as_i31", "makeRefAs(s, RefAsI31)"), ] -- cgit v1.2.3