Add a more convenient tracing utility for debugging; Fix basic GC test

This commit is contained in:
dcodeIO
2018-07-20 16:49:27 +02:00
parent f56face188
commit 41ad2f8a70
19 changed files with 2264 additions and 703 deletions

View File

@ -2700,6 +2700,7 @@ export function compileCall(
}
}
}
compiler.currentType = Type.void;
return exprs.length
? module.createBlock(null, exprs)
: module.createNop();

View File

@ -626,8 +626,8 @@ export class Program extends DiagnosticEmitter {
}
// register 'main' if present
if (this.elementsLookup.has("main")) {
let element = <Element>this.elementsLookup.get("main");
if (this.moduleLevelExports.has("main")) {
let element = (<ModuleExport>this.moduleLevelExports.get("main")).element;
if (
element.kind == ElementKind.FUNCTION_PROTOTYPE &&
!(<FunctionPrototype>element).isAny(CommonFlags.GENERIC | CommonFlags.AMBIENT)