dcodeIO 6d6d1dddcf Improve inlining where locals can be aliased; Add a crude mechanism for explicit unchecked array accesses
The `unchecked` builtin should be handled with ultimate care and it would be a lot better if there'd be a mechanism doing this automatically.
2018-04-25 05:04:35 +02:00

9 lines
363 B
JavaScript

const fs = require("fs");
const compiled = new WebAssembly.Module(fs.readFileSync(__dirname + "/build/optimized.wasm"));
const imports = {
env: { abort: function(filename, line, column) { throw Error("abort called at " + line + ":" + colum); } }
};
Object.defineProperty(module, "exports", {
get: () => new WebAssembly.Instance(compiled, imports).exports
});