summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gen-s-parser.inc18
-rw-r--r--src/js/binaryen.js-post.js6
2 files changed, 19 insertions, 5 deletions
diff --git a/src/gen-s-parser.inc b/src/gen-s-parser.inc
index 7f1958582..85702d326 100644
--- a/src/gen-s-parser.inc
+++ b/src/gen-s-parser.inc
@@ -8,13 +8,21 @@ char op[27] = {'\0'};
strncpy(op, s[0]->c_str(), 26);
switch (op[0]) {
case 'a': {
- switch (op[7]) {
- case 'f':
- if (strcmp(op, "atomic.fence") == 0) { return makeAtomicFence(s); }
- goto parse_error;
+ switch (op[1]) {
case 'n':
- if (strcmp(op, "atomic.notify") == 0) { return makeAtomicNotify(s); }
+ if (strcmp(op, "anyref.pop") == 0) { return makePop(anyref); }
goto parse_error;
+ case 't': {
+ switch (op[7]) {
+ case 'f':
+ if (strcmp(op, "atomic.fence") == 0) { return makeAtomicFence(s); }
+ goto parse_error;
+ case 'n':
+ if (strcmp(op, "atomic.notify") == 0) { return makeAtomicNotify(s); }
+ goto parse_error;
+ default: goto parse_error;
+ }
+ }
default: goto parse_error;
}
}
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index b11d2769b..8f49b105c 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -1872,6 +1872,12 @@ function wrapModule(module, self) {
},
};
+ self['anyref'] = {
+ 'pop': function() {
+ return Module['_BinaryenPop'](module, Module['anyref']);
+ }
+ };
+
self['exnref'] = {
'pop': function() {
return Module['_BinaryenPop'](module, Module['exnref']);