mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-22 19:21:47 +00:00
More options for asc; asm.js output
This commit is contained in:
@ -40,3 +40,12 @@ Module.prototype.toText = function toText() {
|
||||
binaryen.print = previousPrint;
|
||||
return ret;
|
||||
}
|
||||
|
||||
Module.prototype.toAsmjs = function toAsmjs() {
|
||||
var previousPrint = binaryen.print;
|
||||
var ret = "";
|
||||
binaryen.print = function print(x) { ret += x + "\n" };
|
||||
this.printAsmjs();
|
||||
binaryen.print = previousPrint;
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user