public class DFAStateNode extends DFAAbstractStateNode
| Modifier and Type | Class and Description |
|---|---|
static class |
DFAStateNode.LoopOptimizationNode |
| Modifier and Type | Field and Description |
|---|---|
protected CharMatcher[] |
matchers |
successors| Constructor and Description |
|---|
DFAStateNode(short id,
byte flags,
DFAStateNode.LoopOptimizationNode loopOptimizationNode,
short[] successors,
CharMatcher[] matchers,
DFASimpleCG simpleCG,
AllTransitionsInOneTreeMatcher allTransitionsInOneTreeMatcher) |
| Modifier and Type | Method and Description |
|---|---|
static byte |
buildFlags(boolean finalState,
boolean anchoredFinalState,
boolean hasBackwardPrefixState) |
static DFAStateNode.LoopOptimizationNode |
buildLoopOptimizationNode(short loopTransitionIndex,
char[] indexOfChars) |
protected void |
checkFinalState(TRegexDFAExecutorLocals locals,
TRegexDFAExecutorNode executor,
int index) |
DFAStateNode |
createNodeSplitCopy(short copyID)
Creates a copy of this state node, where all attributes are copied shallowly, except for the
DFAAbstractStateNode.successors array, which is deep-copied, and the node ID, which is replaced by the
parameter copyID. |
void |
executeFindSuccessor(TRegexDFAExecutorLocals locals,
TRegexDFAExecutorNode executor,
boolean compactString)
Calculates this state's successor by finding a transition that matches the current input.
|
CharMatcher[] |
getMatchers() |
com.oracle.truffle.api.profiles.BranchProfile |
getStateReachedProfile() |
boolean |
hasBackwardPrefixState() |
boolean |
hasLoopToSelf() |
boolean |
isAnchoredFinalState() |
boolean |
isFinalState() |
JsonValue |
toJson() |
String |
toString() |
getId, getSuccessorsaccept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, lookupContextReference, lookupLanguageReference, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecializeprotected final CharMatcher[] matchers
public DFAStateNode(short id,
byte flags,
DFAStateNode.LoopOptimizationNode loopOptimizationNode,
short[] successors,
CharMatcher[] matchers,
DFASimpleCG simpleCG,
AllTransitionsInOneTreeMatcher allTransitionsInOneTreeMatcher)
public static byte buildFlags(boolean finalState,
boolean anchoredFinalState,
boolean hasBackwardPrefixState)
public static DFAStateNode.LoopOptimizationNode buildLoopOptimizationNode(short loopTransitionIndex, char[] indexOfChars)
public DFAStateNode createNodeSplitCopy(short copyID)
DFAAbstractStateNodeDFAAbstractStateNode.successors array, which is deep-copied, and the node ID, which is replaced by the
parameter copyID. Used by DFANodeSplit.createNodeSplitCopy in class DFAAbstractStateNodecopyID - new ID for the copy.public final CharMatcher[] getMatchers()
public com.oracle.truffle.api.profiles.BranchProfile getStateReachedProfile()
public boolean isFinalState()
public boolean isAnchoredFinalState()
public boolean hasBackwardPrefixState()
public boolean hasLoopToSelf()
public void executeFindSuccessor(TRegexDFAExecutorLocals locals, TRegexDFAExecutorNode executor, boolean compactString)
CGTrackingDFAStateNode.executeFindSuccessor in class DFAAbstractStateNodelocals - a virtual frame as described by TRegexDFAExecutorProperties.executor - this node's parent TRegexDFAExecutorNode.compactString - true if the input string is a compact string, must be partial
evaluation constant.protected void checkFinalState(TRegexDFAExecutorLocals locals, TRegexDFAExecutorNode executor, int index)
public String toString()
toString in class com.oracle.truffle.api.nodes.Nodepublic JsonValue toJson()