summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-07-12 17:39:43 -0400
committerGitHub <noreply@github.com>2024-07-12 14:39:43 -0700
commit20c10df0cc5e5ffb9b8a0ca8cf4895d3416c6771 (patch)
treec7c404370949b4c53f905b6092830145ef1f54e0 /src
parenteda6530a187add28f06d9ab84d78b21b5001a6df (diff)
downloadbinaryen-20c10df0cc5e5ffb9b8a0ca8cf4895d3416c6771.tar.gz
binaryen-20c10df0cc5e5ffb9b8a0ca8cf4895d3416c6771.tar.bz2
binaryen-20c10df0cc5e5ffb9b8a0ca8cf4895d3416c6771.zip
Remove non-standard `i31.new` (#6736)
The standard name for the instruction is `ref.i31`. Remove support for the non-standard name and update tests that were still using it.
Diffstat (limited to 'src')
-rw-r--r--src/gen-s-parser.inc29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/gen-s-parser.inc b/src/gen-s-parser.inc
index bbed0f8be..98f5b7831 100644
--- a/src/gen-s-parser.inc
+++ b/src/gen-s-parser.inc
@@ -1811,27 +1811,16 @@ switch (buf[0]) {
case '3': {
switch (buf[2]) {
case '1': {
- switch (buf[4]) {
- case 'g': {
- switch (buf[8]) {
- case 's':
- if (op == "i31.get_s"sv) {
- CHECK_ERR(makeI31Get(ctx, pos, annotations, true));
- return Ok{};
- }
- goto parse_error;
- case 'u':
- if (op == "i31.get_u"sv) {
- CHECK_ERR(makeI31Get(ctx, pos, annotations, false));
- return Ok{};
- }
- goto parse_error;
- default: goto parse_error;
+ switch (buf[8]) {
+ case 's':
+ if (op == "i31.get_s"sv) {
+ CHECK_ERR(makeI31Get(ctx, pos, annotations, true));
+ return Ok{};
}
- }
- case 'n':
- if (op == "i31.new"sv) {
- CHECK_ERR(makeRefI31(ctx, pos, annotations, Unshared));
+ goto parse_error;
+ case 'u':
+ if (op == "i31.get_u"sv) {
+ CHECK_ERR(makeI31Get(ctx, pos, annotations, false));
return Ok{};
}
goto parse_error;