diff options
-rw-r--r-- | bin/binaryen.js | 2 | ||||
-rw-r--r-- | src/js/binaryen.js-post.js | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/bin/binaryen.js b/bin/binaryen.js index 5ea97ba89..bce312888 100644 --- a/bin/binaryen.js +++ b/bin/binaryen.js @@ -462,5 +462,5 @@ Y.prototype=Object.create(x.prototype);Y.prototype.constructor=Y;Y.prototype.p=Y Object.create(ga.prototype);fa.prototype.constructor=fa;fa.prototype.p=fa;fa.s={};d.ShellExternalInterface=fa;fa.prototype.__destroy__=function(){ed(this.e)};ha.prototype=Object.create(x.prototype);ha.prototype.constructor=ha;ha.prototype.p=ha;ha.s={};d.VoidPtr=ha;ha.prototype.__destroy__=function(){Wc(this.e)};S.prototype=Object.create(x.prototype);S.prototype.constructor=S;S.prototype.p=S;S.s={};d.WasmBinaryWriter=S;S.prototype.write=S.prototype.write=function(){ld(this.e)};S.prototype.__destroy__= function(){Vc(this.e)};Z.prototype=Object.create(x.prototype);Z.prototype.constructor=Z;Z.prototype.p=Z;Z.s={};d.ModuleInstance=Z;Z.prototype.callExport=function(b,c){var d=this.e;b&&"object"===typeof b&&(b=b.e);c&&"object"===typeof c&&(c=c.e);return wa(Qc(d,b,c),R)};Z.prototype.__destroy__=function(){Tc(this.e)};(function(){function b(){}d.calledRun||wb(b)})();"undefined"!==typeof Symbol&&Symbol.iterator&&(d.BufferWithRandomAccess.prototype[Symbol.iterator]=function(){var b=this,c=0,d=b.size();return{next:function(){return c< d?{done:!1,value:b.vc(c++)}:{done:!0}}}});"undefined"!==typeof Uint8Array&&(d.BufferWithRandomAccess.prototype.toArrayBuffer=function(){return Uint8Array.from(this).buffer});d.compileWast=function(b){var c=(new d.SExpressionParser(b)).Zc().Qc(0);b=new d.Module;new d.SExpressionWasmBuilder(b,c);c=new d.BufferWithRandomAccess(!1);(new d.WasmBinaryWriter(b,c,!1)).write();return N?Buffer.from(Uint8Array.from(c)):c.toArrayBuffer()};return d} -if("undefined"!=typeof exports){var jb=ib();if("object"===typeof module)module.exports=jb;else for(var Nb in jb)exports[Nb]=jb[Nb]}("undefined"!==typeof window?window:"undefined"!==typeof global&&("undefined"===typeof process||process.argv&&Array.isArray(process.argv)&&process.argv[1]&&"/a.js"===process.argv[1].substr(-5))?global:this).Binaryen=ib; +if("undefined"!=typeof exports){var jb=ib();if("object"===typeof module)module.exports=jb;else for(var Nb in jb)exports[Nb]=jb[Nb]}("undefined"!==typeof window?window:"undefined"!==typeof global&&("undefined"===typeof process||process.argv&&Array.isArray(process.argv)&&process.argv[1]&&("/a.js"===process.argv[1].substr(-5)||"\\a.js"===process.argv[1].substr(-5)))?global:this).Binaryen=ib; diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index 7389f5afe..a96d39756 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -21,7 +21,8 @@ if (typeof exports != 'undefined') { ( process.argv && Array.isArray(process.argv) && process.argv[1] && - process.argv[1].substr(-5) === '/a.js' + (process.argv[1].substr(-5) === '/a.js' || + process.argv[1].substr(-5) === '\\a.js') ) ) ? global : |