summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-09-13 20:02:26 -0700
committerGitHub <noreply@github.com>2023-09-13 20:02:26 -0700
commit2cbe448eb4df17010f0e5f360a8e705da710f3e0 (patch)
treeb0967cb40dd4dbb2d209afb66cdf58c8af498cf9 /src/js
parent9d79632c210a8c5002657ae87ff06c70ee109e8f (diff)
downloadbinaryen-2cbe448eb4df17010f0e5f360a8e705da710f3e0.tar.gz
binaryen-2cbe448eb4df17010f0e5f360a8e705da710f3e0.tar.bz2
binaryen-2cbe448eb4df17010f0e5f360a8e705da710f3e0.zip
Replace i31.new with ref.i31 everywhere (#5931)
Replace i31.new with ref.i31 in the printer, tests, and source code. Continue parsing i31.new for the time being to allow a graceful transition. Also update the JS API to reflect the new instruction name.
Diffstat (limited to 'src/js')
-rw-r--r--src/js/binaryen.js-post.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index b6ea4d490..4ff719b30 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -2370,6 +2370,9 @@ function wrapModule(module, self = {}) {
'func'(func, type) {
return preserveStack(() => Module['_BinaryenRefFunc'](module, strToStack(func), type));
},
+ 'i31'(value) {
+ return Module['_BinaryenRefI31'](module, value);
+ },
'eq'(left, right) {
return Module['_BinaryenRefEq'](module, left, right);
}
@@ -2418,9 +2421,6 @@ function wrapModule(module, self = {}) {
};
self['i31'] = {
- 'new'(value) {
- return Module['_BinaryenRefI31'](module, value);
- },
'get_s'(i31) {
return Module['_BinaryenI31Get'](module, i31, 1);
},