Move 'abort' out of builtins and make it overridable

Now defaults to 'env.abort' as imported in lib/env.ts, but can be overridden through '--use abort=someThingElseOrNothingAtAll'
This commit is contained in:
dcodeIO
2018-05-21 18:48:29 +02:00
parent 940392f463
commit 73417a9a06
83 changed files with 5836 additions and 5833 deletions

View File

@ -78,13 +78,6 @@ export declare function changetype<T>(value: void): T;
export declare function assert<T>(isTrueish: T, message?: string): T;
export declare function abort(
message?: string | null,
fileName?: string | null,
lineNumber?: u32,
columnNumber?: u32
): void;
export declare function unchecked<T>(expr: T): T;
export declare function i8(value: void): i8;

7
std/assembly/env.ts Normal file
View File

@ -0,0 +1,7 @@
/** Environment abort function called where assertions evaluate to false / on throw. */
declare function abort(
message?: string | null,
fileName?: string | null,
lineNumber?: u32,
columnNumber?: u32
): void;