anchor.diff:  var Thread:PFLREThread;
   begin
    while assigned(Instruction) do begin
  -  if Instruction^.Generation=Generation then begin
  +  if ThreadLocalState.InstructionGenerations[Instruction^.IndexAndOpcode shr 8]=ThreadLocalState.Generation then begin
      DecRef(SubMatches);
      break;
     end else begin
  -   Instruction^.Generation:=Generation;
  +   ThreadLocalState.InstructionGenerations[Instruction^.IndexAndOpcode shr 8]:=ThreadLocalState.Generation;
      case Instruction^.IndexAndOpcode and $ff of
       opJMP:begin
        Instruction:=Instruction^.Next;
  
positive.code:        property Values[const Key:ansistring]:TFLREStringIntegerPairHashMapData read GetValue write SetValue; default;
       end;
  
       TFLREThreadLocalState=class
        private
         AllNext:TFLREThreadLocalState;
         FreeNext:TFLREThreadLocalState;
        public
         Instance:TFLRE;
         Input:pansichar;
         InputLength:longint;
         constructor Create(AInstance:TFLRE);
         destructor Destroy; override;
         function GetSatisfyFlags(const Position:longint):longword;
       end;
  
       TFLRE=class
        private
  
         RegularExpression:ansistring;
  
         Flags:TFLREFlags;
  
         AnchoredRootNode:PFLRENode;
  
         UnanchoredRootNode:PFLRENode;
  
         Nodes:TList;
  
         Generation:longword;
  
         CountParens:longint;
  
         CountSubMatches:longint;
  
         ForwardInstructions:TFLREInstructions;
         CountForwardInstructions:longint;
  
         BackwardInstructions:TFLREInstructions;
         CountBackwardInstructions:longint;
  
         AnchoredStartInstruction:PFLREInstruction;
         UnanchoredStartInstruction:PFLREInstruction;
         ReversedStartInstruction:PFLREInstruction;
  
         CharClasses:TPFLRECharClasses;
         CountCharClasses:longint;
  
         ThreadLists:TFLREThreadLists;
  
         FreeSubMatches:PFLRESubMatches;
         AllSubMatches:TList;
  
         FixedString:ansistring;
         FixedStringIsWholeRegExp:longbool;
         FixedStringLength:longint;
         FixedStringPatternBitMasks:TFLRECharPatternBitMasks;
         FixedStringBoyerMooreSkip:TFLRECharPatternBitMasks;
         FixedStringBoyerMooreNext:TFLREBoyerMooreNext;
  
         PrefixCharClasses:TFLREPrefixCharClasses;
         CountPrefixCharClasses:longint;
         CountObviousPrefixCharClasses:longint;
         PrefixPatternBitMasks:TFLRECharPatternBitMasks;
  
         ByteMap:TFLREByteMap;
         UnByteMap:TFLREByteMap;
         ByteCharSetMap:TFLRECharClass;
         ByteMapCount:longint;
  
         OnePassNFANodes:PFLREOnePassNFAState;
         OnePassNFANodesCount:longint;
         OnePassNFAStart:PFLREOnePassNFAState;
         OnePassNFAStateSize:longint;
         OnePassNFAWorkCaptures:TFLREOnePassNFACaptures;
         OnePassNFAMatchCaptures:TFLREOnePassNFACaptures;
         OnePassNFACharClassActions:PFLREOnePassNFAStateCharClassAction;
         OnePassNFAReady:longbool;
  
         BitStateNFAVisited:TFLREBitStateNFAVisited;
         BitStateNFACountVisited:longint;
         BitStateNFAJobs:TFLREBitStateNFAJobs;
         BitStateNFACountJobs:longint;
         BitStateNFAMaxJob:longint;
         BitStateNFAWorkCaptures:TFLREBitStateNFACaptures;
         BitStateNFAMatchCaptures:TFLREBitStateNFACaptures;
         BitStateNFAReady:longbool;
  
         DFAStackInstructions:TPFLREInstructions;
         DFAStateCache:TFLREDFAStateHashMap;
  
negative.code:  Input:=ThreadLocalState.Input;
   InputLength:=ThreadLocalState.InputLength;
  
   CurrentThreadList:=@ThreadLocalState.ThreadLists[0];
   NewThreadList:=@ThreadLocalState.ThreadLists[1];
  
   CurrentThreadList^.Count:=0;
   NewThreadList^.Count:=0;
  
   SubMatches:=NewSubMatches(CountSubMatches,0);
  
   inc(ThreadLocalState.Generation);
   if UnanchoredStart then begin
    AddThread(ThreadLocalState,CurrentThreadList,UnanchoredStartInstruction,SubMatches,StartPosition);
   end else begin
  