Skip to content

Commit 72cb1e9

Browse files
committed
Update dependencies; Regenerate dist files
1 parent 9dfe39c commit 72cb1e9

File tree

7 files changed

+135
-150
lines changed

7 files changed

+135
-150
lines changed

dist/asc.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/asc.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assemblyscript.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assemblyscript.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 124 additions & 129 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
},
1313
"dependencies": {
1414
"@protobufjs/utf8": "^1.1.0",
15-
"binaryen": "48.0.0-nightly.20180627",
15+
"binaryen": "48.0.0-nightly.20180712",
1616
"long": "^4.0.0"
1717
},
1818
"devDependencies": {
19-
"@types/node": "^10.5.1",
19+
"@types/node": "^10.5.2",
2020
"browser-process-hrtime": "^0.1.2",
2121
"diff": "^3.5.0",
2222
"glob": "^7.1.2",
@@ -26,7 +26,7 @@
2626
"typedoc": "^0.11.1",
2727
"typedoc-plugin-external-module-name": "^1.1.1",
2828
"typescript": "^2.9.2",
29-
"webpack": "^4.14.0",
29+
"webpack": "^4.16.0",
3030
"webpack-cli": "^3.0.8"
3131
},
3232
"main": "index.js",

src/glue/js/binaryen.js

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,10 @@ global.load = function(ptr) {
3333

3434
const Module = require("../../module").Module;
3535

36-
Module.prototype.toText = function toText() {
37-
var previousPrint = binaryen.print;
38-
var ret = "";
39-
binaryen.print = function(x) { ret += x + "\n" };
40-
_BinaryenModulePrint(this.ref);
41-
binaryen.print = previousPrint;
42-
return ret;
36+
Module.prototype.toText = function() {
37+
return new binaryen.Module(this.ref).emitText();
4338
};
4439

45-
Module.prototype.toAsmjs = function toAsmjs() {
46-
var previousPrint = binaryen.print;
47-
var ret = "";
48-
binaryen.print = function(x) { ret += x + "\n" };
49-
_BinaryenModulePrintAsmjs(this.ref);
50-
binaryen.print = previousPrint;
51-
return ret;
40+
Module.prototype.toAsmjs = function() {
41+
return new binaryen.Module(this.ref).emitAsmjs();
5242
};

0 commit comments

Comments
 (0)