Class TRegexNFAExecutorNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.regex.tregex.nodes.TRegexExecutorBaseNode
com.oracle.truffle.regex.tregex.nodes.TRegexExecutorNode
com.oracle.truffle.regex.tregex.nodes.nfa.TRegexNFAExecutorNode
- All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode,com.oracle.truffle.api.nodes.NodeInterface,Cloneable
This regex executor matches a given expression by calculating DFA states from the NFA on the fly,
without any caching. It is used as a placeholder for
TRegexDFAExecutorNode until the
expression is executed TRegexOptions.TRegexGenerateDFAThresholdCalls times, in order to
avoid the costly DFA generation on all expressions that are not on any hot code paths.-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.nodes.Node.Child, com.oracle.truffle.api.nodes.Node.ChildrenNested classes/interfaces inherited from interface com.oracle.truffle.api.instrumentation.InstrumentableNode
com.oracle.truffle.api.instrumentation.InstrumentableNode.WrapperNode -
Field Summary
Fields inherited from class com.oracle.truffle.regex.tregex.nodes.TRegexExecutorNode
ASTRAL_PROBABILITY, BMP_PROBABILITY, CONTINUE_PROBABILITY, EXIT_PROBABILITY, LATIN1_PROBABILITY -
Method Summary
Modifier and TypeMethodDescriptionstatic TRegexNFAExecutorNodecreateLocals(com.oracle.truffle.api.strings.TruffleString input, int fromIndex, int maxIndex, int regionFrom, int regionTo, int index) execute(com.oracle.truffle.api.frame.VirtualFrame frame, TRegexExecutorLocals abstractLocals, com.oracle.truffle.api.strings.TruffleString.CodeRange codeRange) getName()getNFA()intbooleanbooleanvoidbooleanReturnstrueif this executor may write any new capture group boundaries.Methods inherited from class com.oracle.truffle.regex.tregex.nodes.TRegexExecutorNode
countUpTo, getAstralProfile, getBMPProfile, getMaxIndex, getMinIndex, getNumberOfCaptureGroups, getNumberOfTransitions, getSource, inputAdvance, inputAtBegin, inputAtEnd, inputGetCodePointSize, inputGetCodePointSize, inputHasNext, inputHasNext, inputHasNext, inputIncNextIndexRaw, inputIncNextIndexRaw, inputIncRaw, inputIncRaw, inputIncRaw, inputIncRaw, inputIncRaw, inputIncRaw, inputReadAndDecode, inputReadAndDecode, inputReadRaw, inputReadRaw, inputReadRaw, inputReadRaw, inputSkip, inputSkipIntl, inputSkipReverse, inputUTF16IsHighSurrogate, inputUTF16IsLowSurrogate, inputUTF16ToCodePoint, isSimpleCG, rewindUpToMethods inherited from class com.oracle.truffle.regex.tregex.nodes.TRegexExecutorBaseNode
createWrapper, getEncoding, isBooleanMatch, isInstrumentable, isUTF16, isUTF32, isUTF8, unwrapMethods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.truffle.api.instrumentation.InstrumentableNode
findNearestNodeAt, findNearestNodeAt, getNodeObject, hasTag, materializeInstrumentableNodes
-
Method Details
-
create
-
shallowCopy
- Specified by:
shallowCopyin classTRegexExecutorBaseNode
-
getNFA
-
notifyDfaGeneratorBailedOut
public void notifyDfaGeneratorBailedOut() -
getName
- Specified by:
getNamein classTRegexExecutorBaseNode
-
isForward
public boolean isForward()- Specified by:
isForwardin classTRegexExecutorBaseNode
-
isTrivial
public boolean isTrivial()- Overrides:
isTrivialin classTRegexExecutorBaseNode
-
writesCaptureGroups
public boolean writesCaptureGroups()Description copied from class:TRegexExecutorBaseNodeReturnstrueif this executor may write any new capture group boundaries.- Specified by:
writesCaptureGroupsin classTRegexExecutorBaseNode
-
getNumberOfStates
public int getNumberOfStates()- Specified by:
getNumberOfStatesin classTRegexExecutorBaseNode
-
createLocals
public TRegexExecutorLocals createLocals(com.oracle.truffle.api.strings.TruffleString input, int fromIndex, int maxIndex, int regionFrom, int regionTo, int index) - Specified by:
createLocalsin classTRegexExecutorBaseNode
-
execute
public Object execute(com.oracle.truffle.api.frame.VirtualFrame frame, TRegexExecutorLocals abstractLocals, com.oracle.truffle.api.strings.TruffleString.CodeRange codeRange) - Specified by:
executein classTRegexExecutorBaseNode
-