summaryrefslogtreecommitdiff
path: root/src/js/binaryen.js-post.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/binaryen.js-post.js')
-rw-r--r--src/js/binaryen.js-post.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index 66de10848..fd121b8af 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -36,6 +36,7 @@ function initializeConstants() {
['funcref', 'Funcref'],
['externref', 'Externref'],
['exnref', 'Exnref'],
+ ['anyref', 'Anyref'],
['unreachable', 'Unreachable'],
['auto', 'Auto']
].forEach(entry => {
@@ -120,6 +121,7 @@ function initializeConstants() {
'TailCall',
'ReferenceTypes',
'Multivalue',
+ 'Anyref',
'All'
].forEach(name => {
Module['Features'][name] = Module['_BinaryenFeature' + name]();
@@ -2063,6 +2065,12 @@ function wrapModule(module, self = {}) {
}
};
+ self['anyref'] = {
+ 'pop'() {
+ return Module['_BinaryenPop'](module, Module['anyref']);
+ }
+ };
+
self['ref'] = {
'null'(type) {
return Module['_BinaryenRefNull'](module, type);