public interface FlowScope extends StaticTypedScope<JSType>, LatticeElement
Modifier and Type | Method and Description |
---|---|
void |
completeScope(StaticTypedScope<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.
|
StaticTypedSlot<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,
boolean declare)
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.
|
getOwnSlot, getParentScope, getSlot, getTypeOfThis
getRootNode
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, boolean declare)
FlowScope optimize()
StaticTypedSlot<JSType> findUniqueRefinedSlot(FlowScope blindScope)
blindScope
- The scope before the refinement, i.e. some parent of the
this scope or itself.void completeScope(StaticTypedScope<JSType> scope)
Copyright © 2009–2023 Google. All rights reserved.