Getters & setters (static); Instantiate compiler tests; Cleanup

This commit is contained in:
dcodeIO
2017-12-27 02:37:53 +01:00
parent 5c4bf1af76
commit ba61a5e414
49 changed files with 2359 additions and 1952 deletions

View File

@ -0,0 +1,16 @@
var binaryen = require("binaryen");
var mod = new binaryen.Module();
var funcType = mod.addFunctionType("v", binaryen.void, []);
var func = mod.addFunction("test", funcType, [],
mod.block("", [
mod.drop(
mod.getGlobal("missing", binaryen.i32)
)
])
);
mod.addExport("test", func);
if (mod.validate())
console.log("-> validates");
mod.emitBinary(); // -> Assertion failed: mappedGlobals.count(name), at: binaryen/src/wasm/wasm-binary.cpp,355,getGlobalIndex at Error