summaryrefslogtreecommitdiff
path: root/src/js/binaryen.js-post.js
diff options
context:
space:
mode:
authorDaniel Wirtz <dcode@dcode.io>2018-05-09 00:18:05 +0200
committerAlon Zakai <alonzakai@gmail.com>2018-05-08 15:18:05 -0700
commit65ea79b18c1fc2492b993cdde221b974d605a883 (patch)
treee393af9bc6fab06abd0fc530cb80dba9a697177a /src/js/binaryen.js-post.js
parenta5d33e7faaa965565f9ca1d0c23c3077389f2389 (diff)
downloadbinaryen-65ea79b18c1fc2492b993cdde221b974d605a883.tar.gz
binaryen-65ea79b18c1fc2492b993cdde221b974d605a883.tar.bz2
binaryen-65ea79b18c1fc2492b993cdde221b974d605a883.zip
Add a way to remove function types to Binaryen-C/.js (#1536)
Diffstat (limited to 'src/js/binaryen.js-post.js')
-rw-r--r--src/js/binaryen.js-post.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index fbabfe995..aca41ca6b 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -1052,6 +1052,11 @@ Module['Module'] = function(module) {
i32sToStack(paramTypes), paramTypes.length);
});
};
+ this['removeFunctionType'] = function(name) {
+ return preserveStack(function () {
+ return Module['_BinaryenRemoveFunctionType'](module, strToStack(name));
+ });
+ };
this['addFunction'] = function(name, functionType, varTypes, body) {
return preserveStack(function() {
return Module['_BinaryenAddFunction'](module, strToStack(name), functionType, i32sToStack(varTypes), varTypes.length, body);