anchor.diff:   end;
   end;
   
  +function TFLREDFA.FastProcessNextState(State:PFLREDFAState;const CurrentChar:ansichar;const Reversed:boolean):PFLREDFAState;
  +var Counter:longint;
  +    Instruction:PFLREInstruction;
  +begin
  +
  + // Process state instructions
  + inc(Generation);
  + NewState.CountInstructions:=0;
  + NewState.Flags:=(State^.Flags and sfDFAStart) shl sfDFANeedShift;
  + for Counter:=0 To State^.CountInstructions-1 do begin
  +  Instruction:=State^.Instructions[Counter];
  +  case Instruction^.IDandOpcode and $ff of
  +   opSINGLECHAR:begin
  +    if byte(ansichar(CurrentChar))=Instruction^.Value then begin
  +     FastAddInstructionThread(@NewState,Instruction^.Next);
  +    end;
  +   end;
  +   opCHAR:begin
  +    if CurrentChar in PFLRECharClass(pointer(ptruint(Instruction^.Value)))^ then begin
  +     FastAddInstructionThread(@NewState,Instruction^.Next);
  +    end;
  +   end;
  +   opANY:begin
  +    FastAddInstructionThread(@NewState,Instruction^.Next);
  +   end;
  +   opMATCH:begin
  +    if not (SearchLongest or Reversed) then begin
  +     // We can stop processing the instruction list queue here since we found a match (for the PCRE leftmost first valid match behaviour)
  +     break;
  +    end;
  +   end;
  +   else begin
  +    // Oops?! Invalid byte code instruction for the DFA processing context! So abort and fallback to NFA...
  +    result:=nil;
  +    exit;
  +   end;
  +  end;
  + end;
  +
  + // Dead state? If yes, ...
  + if NewState.CountInstructions=0 then begin
  +  // ... drop it and take the dead state as the next state
  +  result:=DefaultStates[skDead];
  + end else begin
  +  // .. otherwise try caching it
  +  result:=CacheState(@NewState);
  + end;
  +
  + // Connect the last state to the new state with the current char
  + State.NextStates[Instance.ByteMap[byte(ansichar(CurrentChar))]]:=result;
  +
  +end;
  +
  +function TFLREDFA.SearchMatchFast(const StartPosition,UntilExcludingPosition:longint;out MatchEnd:longint;const UnanchoredStart:boolean):longint;
  +var Position:longint;
  +    State,LastState:PFLREDFAState;
  +    LocalInput:pansichar;
  +    LocalByteMap:PFLREByteMap;
  +begin
  + result:=DFAFail;
  + LocalInput:=ThreadLocalStorageInstance.Input;
  + LocalByteMap:=@Instance.ByteMap;
  + if UnanchoredStart then begin
  +  State:=DefaultStates[skFast+skUnanchored];
  + end else begin
  +  State:=DefaultStates[skFast+skAnchored];
  + end;
  + for Position:=StartPosition to UntilExcludingPosition-1 do begin
  +  LastState:=State;
  +  State:=State^.NextStates[LocalByteMap[byte(ansichar(LocalInput[Position]))]];
  +  if not assigned(State) then begin
  +   State:=FastProcessNextState(LastState,LocalInput[Position],false);
  +   if not assigned(State) then begin
  +    result:=DFAError;
  +    exit;
  +   end;
  +  end;
  +  if (State^.Flags and (sfDFAMatchWins or sfDFADead))<>0 then begin
  +   if (State^.Flags and sfDFADead)<>0 then begin
  +    if result<>DFAMatch then begin
  +     result:=DFAFail;
  +    end;
  +    exit;
  +   end;
  +   if (State^.Flags and sfDFAMatchWins)<>0 then begin
  +    MatchEnd:=Position;
  +    result:=DFAMatch;
  +   end;
  +  end;
  + end;
  +end;
  +
  +function TFLREDFA.SearchMatchFastReversed(const StartPosition,UntilIncludingPosition:longint;out MatchBegin:longint):longint;
  +var Position:longint;
  +    State,LastState:PFLREDFAState;
  +    LocalInput:pansichar;
  +    LocalByteMap:PFLREByteMap;
  +begin
  + result:=DFAFail;
  + LocalInput:=ThreadLocalStorageInstance.Input;
  + LocalByteMap:=@Instance.ByteMap;
  + State:=DefaultStates[skFast+skReversed];
  + for Position:=StartPosition downto UntilIncludingPosition do begin
  +  LastState:=State;
  +  State:=State^.NextStates[LocalByteMap[byte(ansichar(LocalInput[Position]))]];
  +  if not assigned(State) then begin
  +   State:=FastProcessNextState(LastState,LocalInput[Position],true);
  +   if not assigned(State) then begin
  +    result:=DFAError;
  +    exit;
  +   end;
  +  end;
  +  if (State^.Flags and (sfDFAMatchWins or sfDFADead))<>0 then begin
  +   if (State^.Flags and sfDFADead)<>0 then begin
  +    if result<>DFAMatch then begin
  +     result:=DFAFail;
  +    end;
  +    exit;
  +   end;
  +   if (State^.Flags and sfDFAMatchWins)<>0 then begin
  +    MatchBegin:=Position;
  +    result:=DFAMatch;
  +   end;
  +  end;
  + end;
  +end;
  +
   procedure TFLREDFA.FullAddInstructionThread(const State:PFLREDFAState;Instruction:PFLREInstruction;const Flags:longword);
   var StackPointer:longint;
       Stack:PPFLREInstructionsStatic;
  
positive.code:        function TakeOverState(TakeOverFrom:PFLREDFAState):PFLREDFAState;
         procedure FreeState(State:PFLREDFAState);
         procedure Reset;
         function SearchMatchFast(const StartPosition,UntilExcludingPosition:longint;out MatchEnd:longint;const UnanchoredStart:boolean):longint;
         function SearchMatchFastReversed(const StartPosition,UntilIncludingPosition:longint;out MatchBegin:longint):longint;
         function SearchMatchFull(const StartPosition,UntilExcludingPosition:longint;out MatchEnd:longint;const UnanchoredStart:boolean):longint;
         function SearchMatchFullReversed(const StartPosition,UntilIncludingPosition:longint;out MatchBegin:longint):longint;
       end;
  
       TFLREThreadLocalStorageInstance=class
  
negative.code:        WorkQueues:TFLREDFAWorkQueues;
         constructor Create(const AThreadLocalStorageInstance:TFLREThreadLocalStorageInstance);
         destructor Destroy; override;
  
         function CacheState(const State:PFLREDFAState):PFLREDFAState; {$ifdef caninline}inline;{$endif}
  
         procedure DestroyStatePool(var StatePool:PFLREDFAStatePool);
         procedure FreeUsedStatePool;
         function AllocateNewStatePool:PFLREDFAStatePool;
  