public class UnifyAst extends Object
ControlFlowAnalyzer
in terms of reachability,
except that in some cases it's easier to be conservative and visit relatively
more nodes than CFA would.
Operates based on a work-queue to prevent recursion sickness.
Must handle:
- Type reference resolution
- Field and method reference resolution
- General code flow like ControlFlowAnalyzer
- GWT.create(), GWT.runAsync(), Impl.getNameOf()
- Stitch native methods into JsProgram
- Class.desiredAssertionStatus, Class.isClassMetaDataEnabled, GWT.isClient,
GWT.isProdMode, GWT.isScript.
TODO: SOYC correlations.Modifier and Type | Field and Description |
---|---|
static String |
GWT_CREATE |
static String |
OLD_GWT_CREATE |
Constructor and Description |
---|
UnifyAst(TreeLogger logger,
CompilerContext compilerContext,
JProgram program,
JsProgram jsProgram,
RebindPermutationOracle rpo) |
Modifier and Type | Method and Description |
---|---|
void |
addRootTypes(Collection<String> sourceTypeNames) |
void |
buildEverything()
Special AST construction, useful for tests.
|
void |
exec()
For normal compilation, only translate and stitch types reachable from
entry points.
|
public static final String GWT_CREATE
public static final String OLD_GWT_CREATE
public UnifyAst(TreeLogger logger, CompilerContext compilerContext, JProgram program, JsProgram jsProgram, RebindPermutationOracle rpo)
public void addRootTypes(Collection<String> sourceTypeNames) throws UnableToCompleteException
UnableToCompleteException
public void buildEverything() throws UnableToCompleteException
UnableToCompleteException
public void exec() throws UnableToCompleteException
UnableToCompleteException
Copyright © 2018. All rights reserved.