Avoid trampolines where optional arguments are constant literals, see #102; Fix temporary local flags not being cleared; Fix inlined temporary locals not being free'd; Fix inlined flows not breaking after returns; Allow changetype of u32s, i.e. function pointers

This commit is contained in:
dcodeIO
2018-05-11 16:31:56 +02:00
parent ef9b43740d
commit e415377cda
35 changed files with 3424 additions and 4059 deletions

View File

@ -37,9 +37,11 @@ abstract class ExportsWalker {
/** Program reference. */
program: Program;
/** Whether to include private members */
private includePrivate: bool;
includePrivate: bool;
/** Elements still to do. */
todo: Element[] = [];
/** Already seen elements. */
private seen: Set<Element> = new Set();
seen: Set<Element> = new Set();
/** Constructs a new Element walker. */
constructor(program: Program, includePrivate: bool = false) {
@ -50,6 +52,8 @@ abstract class ExportsWalker {
/** Walks all exports and calls the respective handlers. */
walk(): void {
for (let element of this.program.moduleLevelExports.values()) this.visitElement(element);
var todo = this.todo;
for (let i = 0; i < todo.length; ) this.visitElement(todo[i]);
}
/** Visits an element.*/