anchor.diff:   end;
   end;
   
  -function FLREStringLength(const s:TFLRERawByteString):longint;
  +function FLREStringLength(const s:TFLRERawByteString):TFLREInt32;
   begin
    if FLREIsUTF8(s) then begin
     result:=UTF8Length(s);
  
positive.code: 
         procedure FastAddInstructionThread(const State:PFLREDFAState;Instruction:PFLREInstruction); {$ifdef cpu386}register;{$endif}
         function FastProcessNextState(State:PFLREDFAState;const CurrentChar:TFLRERawByteChar):PFLREDFAState; {$ifdef cpu386}register;{$endif}
         function SearchMatchFast(const StartPosition,UntilExcludingPosition:longint;out MatchEnd:longint;const UnanchoredStart:longbool):longint; {$ifdef cpu386}stdcall;{$endif}
         function SearchMatchFastReversed(const StartPosition,UntilIncludingPosition:longint;out MatchBegin:longint;const UnanchoredStart:longbool):longint; {$ifdef cpu386}stdcall;{$endif}
  
         function WorkQueueToCachedState(const WorkQueue:TFLREDFAWorkQueue;Flags:longword):PFLREDFAState;
         procedure StateToWorkQueue(const DFAState:PFLREDFAState;const WorkQueue:TFLREDFAWorkQueue);
         procedure AddToWorkQueue(const WorkQueue:TFLREDFAWorkQueue;Instruction:PFLREInstruction;Flags:longword);
         procedure ProcessWorkQueueOnZeroWidthString(const OldWorkQueue,NewWorkQueue:TFLREDFAWorkQueue;Flags:longword);
         procedure ProcessWorkQueueOnByte(const OldWorkQueue,NewWorkQueue:TFLREDFAWorkQueue;CurrentChar,Flags:longword;var IsMatch:boolean);
         function RunStateOnByte(State:PFLREDFAState;const Position:longint;const CurrentChar:longword):PFLREDFAState;
         function InitializeStartState(const StartPosition:longint;const UnanchoredStart:boolean):PFLREDFAState;
  
         function SearchMatchFull(const StartPosition,UntilExcludingPosition:longint;out MatchEnd:longint;const UnanchoredStart:longbool):longint; {$ifdef cpu386}stdcall;{$endif}
         function SearchMatchFullReversed(const StartPosition,UntilExcludingPosition:longint;out MatchEnd:longint;const UnanchoredStart:longbool):longint; {$ifdef cpu386}stdcall;{$endif}
  
       end;
  
  
negative.code:  if assigned(State) then begin
    SetLength(State^.Instructions,0);
    if assigned(StatePoolUsed) and
       ((TFLREPtrUInt(TFLREPtrUInt(State)-TFLREPtrUInt(StatePoolUsed^.States))<StatePoolSize) and
        (pointer(TFLREPtrUInt(TFLREPtrUInt(StatePoolUsed^.NextState)-TFLREPtrUInt(StateSize)))=State)) then begin
     FillChar(State^,StateSize,#0);
     dec(TFLREPtrUInt(StatePoolUsed^.NextState),StateSize);
    end;
   end;
  end;
  
  procedure TFLREDFA.Reset;
  var Index:TFLREInt32;
      State:PFLREDFAState;
  begin
  
  