diff options
author | Alon Zakai <azakai@google.com> | 2021-01-27 17:46:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-27 09:46:31 -0800 |
commit | 2bdc4841b680ee44e132bbb07f5167eaa7226f99 (patch) | |
tree | 170585bbb9c74022201efeeee91962fdb5f0a1f1 /scripts | |
parent | f82e94363a231bf570fbe3d7dc49259c8668206f (diff) | |
download | binaryen-2bdc4841b680ee44e132bbb07f5167eaa7226f99.tar.gz binaryen-2bdc4841b680ee44e132bbb07f5167eaa7226f99.tar.bz2 binaryen-2bdc4841b680ee44e132bbb07f5167eaa7226f99.zip |
[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.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/gen-s-parser.py | 3 |
1 files changed, 3 insertions, 0 deletions
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)"), ] |