mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-19 01:41:30 +00:00
Unified continue/break labels with binaryen labels; Module-level global exports
This commit is contained in:
@ -12,6 +12,10 @@ globalScope["select"] = function select<T>(ifTrue: T, ifFalse: T, condition: boo
|
||||
return condition ? ifTrue : ifFalse;
|
||||
};
|
||||
|
||||
globalScope["assert"] = function(isTrue: bool): void {
|
||||
if (!isTrue) throw new Error("assertion failed");
|
||||
};
|
||||
|
||||
let binaryen: any;
|
||||
try {
|
||||
binaryen = require("binaryen");
|
||||
|
Reference in New Issue
Block a user