Class TRegexDFAExecutorDebugRecorder

java.lang.Object
com.oracle.truffle.regex.tregex.nodes.dfa.TRegexDFAExecutorDebugRecorder
All Implemented Interfaces:
JsonConvertible

public final class TRegexDFAExecutorDebugRecorder extends Object implements JsonConvertible
This class is used to store a trace of the execution of a TRegexExecutorBaseNode.execute(com.oracle.truffle.api.frame.VirtualFrame, TRegexExecutorLocals, TruffleString.CodeRange). A trace contains the arguments received by TRegexExecutorBaseNode.execute(com.oracle.truffle.api.frame.VirtualFrame, TRegexExecutorLocals, TruffleString.CodeRange), and the ID of the DFA transition taken for all characters of the input string that have been traversed. After execution, the recorded trace can be dumped to disk as JSON with finishRecording().
  • Method Details

    • create

      public static TRegexDFAExecutorDebugRecorder create(RegexOptions options, DFAGenerator dfaGenerator)
    • startRecording

      public void startRecording(TRegexDFAExecutorLocals locals)
    • setInitialIndex

      public void setInitialIndex(int initialIndex)
    • recordTransition

      public void recordTransition(int currentIndex, short stateNodeID, int transitionIndex)
    • recordCGPartialTransition

      public void recordCGPartialTransition(int currentIndex, int cgPartialTransitionIndex)
    • finishRecording

      public void finishRecording()
    • toJson

      public JsonValue toJson()
      Specified by:
      toJson in interface JsonConvertible