diff options
Diffstat (limited to 'src/js/binaryen.js-post.js')
-rw-r--r-- | src/js/binaryen.js-post.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index 985691494..d4e2cbf80 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -847,6 +847,13 @@ this['optimize'] = function() { return Module['_BinaryenModuleOptimize'](module); }; + this['runPasses'] = function(passes) { + return preserveStack(function() { + return Module['_BinaryenModuleRunPasses'](module, i32sToStack( + passes.map(strToStack) + ), passes.length); + }); + } this['autoDrop'] = function() { return Module['_BinaryenModuleAutoDrop'](module); }; |