diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js/binaryen.js-post.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index aca41ca6b..6e4833986 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -1163,19 +1163,19 @@ Module['Module'] = function(module) { return Module['_BinaryenSetStart'](module, start); }; this['emitText'] = function() { - var old = Module['print']; + var old = out; var ret = ''; - Module['print'] = function(x) { ret += x + '\n' }; + out = function(x) { ret += x + '\n' }; Module['_BinaryenModulePrint'](module); - Module['print'] = old; + out = old; return ret; }; this['emitAsmjs'] = function() { - var old = Module['print']; + var old = out; var ret = ''; - Module['print'] = function(x) { ret += x + '\n' }; + out = function(x) { ret += x + '\n' }; Module['_BinaryenModulePrintAsmjs'](module); - Module['print'] = old; + out = old; return ret; }; this['validate'] = function() { @@ -1550,11 +1550,11 @@ Module['emitText'] = function(expr) { if (typeof expr === 'object') { return expr.emitText(); } - var old = Module['print']; + var old = out; var ret = ''; - Module['print'] = function(x) { ret += x + '\n' }; + out = function(x) { ret += x + '\n' }; Module['_BinaryenExpressionPrint'](expr); - Module['print'] = old; + out = old; return ret; }; |