class TypeInferencePass extends java.lang.Object implements CompilerPass
Modifier and Type | Class and Description |
---|---|
private static class |
TypeInferencePass.FirstScopeBuildingCallback |
private class |
TypeInferencePass.SecondScopeBuildingCallback |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,CodingConvention.AssertionFunctionSpec> |
assertionFunctionsMap |
private AbstractCompiler |
compiler |
(package private) static DiagnosticType |
DATAFLOW_ERROR |
private ReverseAbstractInterpreter |
reverseInterpreter |
private MemoizedScopeCreator |
scopeCreator |
private TypedScope |
topScope |
Constructor and Description |
---|
TypeInferencePass(AbstractCompiler compiler,
ReverseAbstractInterpreter reverseInterpreter,
TypedScope topScope,
MemoizedScopeCreator scopeCreator) |
Modifier and Type | Method and Description |
---|---|
private ControlFlowGraph<Node> |
computeCfg(Node n) |
(package private) void |
inferAllScopes(Node node)
Entry point for type inference when running over part of the tree.
|
(package private) void |
inferScope(Node n,
TypedScope scope) |
void |
process(Node externsRoot,
Node jsRoot)
Main entry point for type inference when running over the whole tree.
|
static final DiagnosticType DATAFLOW_ERROR
private final AbstractCompiler compiler
private final ReverseAbstractInterpreter reverseInterpreter
private final TypedScope topScope
private final MemoizedScopeCreator scopeCreator
private final java.util.Map<java.lang.String,CodingConvention.AssertionFunctionSpec> assertionFunctionsMap
TypeInferencePass(AbstractCompiler compiler, ReverseAbstractInterpreter reverseInterpreter, TypedScope topScope, MemoizedScopeCreator scopeCreator)
public void process(Node externsRoot, Node jsRoot)
process
in interface CompilerPass
externsRoot
- The root of the externs parse tree.jsRoot
- The root of the input parse tree to be checked.void inferAllScopes(Node node)
void inferScope(Node n, TypedScope scope)
private ControlFlowGraph<Node> computeCfg(Node n)