diff options
Diffstat (limited to 'src/js/binaryen.js-post.js')
-rw-r--r-- | src/js/binaryen.js-post.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index cda00742c..985691494 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -833,6 +833,14 @@ Module['print'] = old; return ret; }; + this['emitAsmjs'] = function() { + var old = Module['print']; + var ret = ''; + Module['print'] = function(x) { ret += x + '\n' }; + Module['_BinaryenModulePrintAsmjs'](module); + Module['print'] = old; + return ret; + }; this['validate'] = function() { return Module['_BinaryenModuleValidate'](module); }; |