mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-14 15:31:31 +00:00
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:
@ -416,8 +416,10 @@ export class Program extends DiagnosticEmitter {
|
||||
var globalAliases = options.globalAliases;
|
||||
if (globalAliases) {
|
||||
for (let [alias, name] of globalAliases) {
|
||||
let element = this.elementsLookup.get(name); // TODO: error? has no source range
|
||||
if (!alias.length) continue; // explicitly disabled
|
||||
let element = this.elementsLookup.get(name);
|
||||
if (element) this.elementsLookup.set(alias, element);
|
||||
else throw new Error("element not found: " + name);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user