summaryrefslogtreecommitdiff
path: root/test/binaryen.js/emit_asmjs.js
blob: e7b9afee2a7a99dd7d49bd3171bdcb57509565d8 (plain)
1
2
3
4
5
6
7
8
9
var module = new binaryen.Module();

module.addFunction("main", binaryen.i32, binaryen.i32, [], module.local.get(0, binaryen.i32));

module.addFunctionExport("main", "main");

assert(module.validate()); // should validate before calling emitAsmjs

console.log(module.emitAsmjs());