Better resolve infrastructure; Instance fields

This commit is contained in:
dcodeIO
2018-01-03 18:33:27 +01:00
parent fb2b7aa96b
commit ae99adefce
17 changed files with 1428 additions and 318 deletions

View File

@ -58,7 +58,8 @@ glob.sync(filter, { cwd: __dirname + "/compiler" }).forEach(filename => {
module.interpret();
console.log(chalk.default.green("interpret OK"));
try {
var wasmModule = new WebAssembly.Module(module.toBinary());
var binary = module.toBinary();
var wasmModule = new WebAssembly.Module(binary);
var wasmInstance = new WebAssembly.Instance(wasmModule, {
env: {
externalFunc: function() {},