|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FlowScope
A symbol table for inferring types during data flow analysis. Each flow scope represents the types of all variables in the scope at a particular point in the flow analysis.
Method Summary | |
---|---|
void |
completeScope(StaticScope<JSType> scope)
Look through the given scope, and try to find slots where it doesn't have enough type information. |
FlowScope |
createChildFlowScope()
Creates a child of this flow scope, to represent an instruction directly following this one. |
StaticSlot<JSType> |
findUniqueRefinedSlot(FlowScope blindScope)
Tries to find a unique refined variable in the refined scope, up to the the blind scope. |
void |
inferQualifiedSlot(Node node,
String symbol,
JSType bottomType,
JSType inferredType)
Infer the type of a qualified name. |
void |
inferSlotType(String symbol,
JSType type)
Defines the type of a symbol at this point in the flow. |
FlowScope |
optimize()
Optimize this scope and return a new FlowScope with faster lookup. |
Methods inherited from interface com.google.javascript.rhino.jstype.StaticScope |
---|
getOwnSlot, getParentScope, getRootNode, getSlot, getTypeOfThis |
Method Detail |
---|
FlowScope createChildFlowScope()
void inferSlotType(String symbol, JSType type)
IllegalArgumentException
- If no slot for this symbol exists.void inferQualifiedSlot(Node node, String symbol, JSType bottomType, JSType inferredType)
FlowScope optimize()
StaticSlot<JSType> findUniqueRefinedSlot(FlowScope blindScope)
blindScope
- The scope before the refinement, i.e. some parent of the
this scope or itself.
void completeScope(StaticScope<JSType> scope)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |