summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorShao Cheng <cheng.shao@tweag.io>2020-04-23 19:51:05 +0200
committerGitHub <noreply@github.com>2020-04-23 10:51:05 -0700
commit2a5d77d7f71a4c48804e83c10129b8c0b53e1b32 (patch)
treee964bd20a28493cc3f6a7da3968fc192b0956558 /src/js
parent127d9b4a898a19aa626a5c2418573eea69af7ed6 (diff)
downloadbinaryen-2a5d77d7f71a4c48804e83c10129b8c0b53e1b32.tar.gz
binaryen-2a5d77d7f71a4c48804e83c10129b8c0b53e1b32.tar.bz2
binaryen-2a5d77d7f71a4c48804e83c10129b8c0b53e1b32.zip
Add snake_case method names for returnCall/returnCallIndirect in JS API (#2795)
Diffstat (limited to 'src/js')
-rw-r--r--src/js/binaryen.js-post.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index 955d80f1d..3bc0fa4a3 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -557,17 +557,20 @@ function wrapModule(module, self) {
return Module['_BinaryenCall'](module, strToStack(name), i32sToStack(operands), operands.length, type);
});
};
+ // 'callIndirect', 'returnCall', 'returnCallIndirect' are deprecated and may
+ // be removed in a future release. Please use the the snake_case names
+ // instead.
self['callIndirect'] = self['call_indirect'] = function(target, operands, params, results) {
return preserveStack(function() {
return Module['_BinaryenCallIndirect'](module, target, i32sToStack(operands), operands.length, params, results);
});
};
- self['returnCall'] = function(name, operands, type) {
+ self['returnCall'] = self['return_call'] = function(name, operands, type) {
return preserveStack(function() {
return Module['_BinaryenReturnCall'](module, strToStack(name), i32sToStack(operands), operands.length, type);
});
};
- self['returnCallIndirect'] = function(target, operands, params, results) {
+ self['returnCallIndirect'] = self['return_call_indirect'] = function(target, operands, params, results) {
return preserveStack(function() {
return Module['_BinaryenReturnCallIndirect'](module, target, i32sToStack(operands), operands.length, params, results);
});