diff options
author | Thomas Lively <tlively@google.com> | 2023-09-13 10:13:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-13 15:13:33 +0000 |
commit | 3ca8c21b89c207ce5d872e9cb2d410a869522d38 (patch) | |
tree | 10757c566326c6894512508a71719ed3b4c594fd /src/js/binaryen.js-post.js | |
parent | bd497d3def1e2c702e29521f097be26024a8253e (diff) | |
download | binaryen-3ca8c21b89c207ce5d872e9cb2d410a869522d38.tar.gz binaryen-3ca8c21b89c207ce5d872e9cb2d410a869522d38.tar.bz2 binaryen-3ca8c21b89c207ce5d872e9cb2d410a869522d38.zip |
Replace I31New with RefI31 everywhere (#5930)
Globally replace the source string "I31New" with "RefI31" in preparation for
renaming the instruction from "i31.new" to "ref.i31", as implemented in the spec
in https://github.com/WebAssembly/gc/pull/422. This would be NFC, except that it
also changes the string in the external-facing C APIs.
A follow-up PR will make the corresponding behavioral change.
Diffstat (limited to 'src/js/binaryen.js-post.js')
-rw-r--r-- | src/js/binaryen.js-post.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index d57d5955e..b6ea4d490 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -105,7 +105,7 @@ function initializeConstants() { 'TupleMake', 'TupleExtract', 'Pop', - 'I31New', + 'RefI31', 'I31Get', 'CallRef', 'RefTest', @@ -2419,7 +2419,7 @@ function wrapModule(module, self = {}) { self['i31'] = { 'new'(value) { - return Module['_BinaryenI31New'](module, value); + return Module['_BinaryenRefI31'](module, value); }, 'get_s'(i31) { return Module['_BinaryenI31Get'](module, i31, 1); @@ -3271,11 +3271,11 @@ Module['getExpressionInfo'] = function(expr) { 'tuple': Module['_BinaryenTupleExtractGetTuple'](expr), 'index': Module['_BinaryenTupleExtractGetIndex'](expr) }; - case Module['I31NewId']: + case Module['RefI31Id']: return { 'id': id, 'type': type, - 'value': Module['_BinaryenI31NewGetValue'](expr) + 'value': Module['_BinaryenRefI31GetValue'](expr) }; case Module['I31GetId']: return { @@ -4837,12 +4837,12 @@ Module['TupleExtract'] = makeExpressionWrapper({ } }); -Module['I31New'] = makeExpressionWrapper({ +Module['RefI31'] = makeExpressionWrapper({ 'getValue'(expr) { - return Module['_BinaryenI31NewGetValue'](expr); + return Module['_BinaryenRefI31GetValue'](expr); }, 'setValue'(expr, valueExpr) { - Module['_BinaryenI31NewSetValue'](expr, valueExpr); + Module['_BinaryenRefI31SetValue'](expr, valueExpr); } }); |