mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 22:41:27 +00:00
Getters & setters (static); Instantiate compiler tests; Cleanup
This commit is contained in:
16
tests/binaryen/get_global-missing.js
Normal file
16
tests/binaryen/get_global-missing.js
Normal 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
|
Reference in New Issue
Block a user