public abstract class ChainableReverseAbstractInterpreter extends Object implements ReverseAbstractInterpreter
Constructor and Description |
---|
ChainableReverseAbstractInterpreter(JSTypeRegistry typeRegistry)
Constructs an interpreter, which is the only link in a chain.
|
Modifier and Type | Method and Description |
---|---|
ChainableReverseAbstractInterpreter |
append(ChainableReverseAbstractInterpreter lastLink)
Appends a link to
this , returning the updated last link. |
protected void |
declareNameInScope(FlowScope scope,
Node node,
JSType type)
Declares a refined type in
scope for the name represented by
node . |
protected FlowScope |
firstPreciserScopeKnowingConditionOutcome(Node condition,
FlowScope blindScope,
boolean outcome)
Calculates the preciser scope starting with the first link.
|
ChainableReverseAbstractInterpreter |
getFirst()
Gets the first link of this chain.
|
protected JSType |
getRestrictedWithoutNull(JSType type)
Returns a version of type where null is not present.
|
protected JSType |
getRestrictedWithoutUndefined(JSType type)
Returns a version of type where undefined is not present.
|
protected JSType |
getTypeIfRefinable(Node node,
FlowScope scope)
Returns the type of a node in the given scope if the node corresponds to a
name whose type is capable of being refined.
|
protected FlowScope |
nextPreciserScopeKnowingConditionOutcome(Node condition,
FlowScope blindScope,
boolean outcome)
Delegates the calculation of the preciser scope to the next link.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPreciserScopeKnowingConditionOutcome
public ChainableReverseAbstractInterpreter(JSTypeRegistry typeRegistry)
append(com.google.javascript.jscomp.type.ChainableReverseAbstractInterpreter)
.public ChainableReverseAbstractInterpreter append(ChainableReverseAbstractInterpreter lastLink)
this
, returning the updated last link.
The pattern new X().append(new Y())...append(new Z())
forms a
chain starting with X, then Y, then ... Z.
lastLink
- a chainable interpreter, with no next linkpublic ChainableReverseAbstractInterpreter getFirst()
protected FlowScope firstPreciserScopeKnowingConditionOutcome(Node condition, FlowScope blindScope, boolean outcome)
protected FlowScope nextPreciserScopeKnowingConditionOutcome(Node condition, FlowScope blindScope, boolean outcome)
protected JSType getTypeIfRefinable(Node node, FlowScope scope)
protected void declareNameInScope(FlowScope scope, Node node, JSType type)
scope
for the name represented by
node
. It must be possible to refine the type of the given node in
the given scope, as determined by getTypeIfRefinable(com.google.javascript.rhino.Node, com.google.javascript.jscomp.type.FlowScope)
.protected final JSType getRestrictedWithoutUndefined(JSType type)
Copyright © 2009–2023 Google. All rights reserved.