anchor.diff:          varUInt64:   Result := htInt64 or (PUInt64(P^.VPointer)^ and $0FFFFFFF)
                                  xor (not (PUInt64(P^.VPointer)^ shr 3)
                                  and $10000000);
  +{$ENDIF}
  +{$IFDEF FPC}
  +         varQWord:   Result := htInt64 or (PQWord(P^.VPointer)^ and $0FFFFFFF)
  +                           xor (not (PQWord(P^.VPointer)^ shr 3) and $10000000);
   {$ENDIF}
           varSingle:   Result := htDouble or (PInteger(P^.VPointer)^
                                  and $0FFFFFFF);
  
positive.code:   for I := 1 to N do
      Result := ((Result shl 2) or (Result shr 30)) xor Ord(Value[I]);
    Result := htOleStr or (Result and $0FFFFFFF);
  end;
  
  function GetHashType(VType: Word): Integer;
  begin
    case VType of
      varEmpty:    Result := htNull;
      varNull:     Result := htNull;
      varBoolean:  Result := htBoolean;
      varByte:     Result := htInteger;
      varWord:     Result := htInteger;
      varShortInt: Result := htInteger;
      varSmallint: Result := htInteger;
      varInteger:  Result := htInteger;
      varLongWord: Result := htInt64;
      varInt64:    Result := htInt64;
  {$IFDEF DELPHI2009_UP}
      varUInt64:   Result := htInt64;
  {$ENDIF}
      varSingle:   Result := htDouble;
      varDouble:   Result := htDouble;
      varCurrency: Result := htDouble;
      varOleStr:   Result := htOleStr;
      varDate:     Result := htDate;
      varUnknown:  Result := htObject;
      varVariant:  Result := htObject;
    else
      if VType = varObject then
        Result := htObject
      else
        Result := htNull;
    end;
  end;
  
  function HashOfVariant(const Value: Variant): Integer;
  
negative.code: var
    HashCode1, HashCode2: Integer;
  begin
    inherited Exchange(Index1, Index2);
  
    HashCode1 := HashOf(FList[Index1]);
    HashCode2 := HashOf(FList[Index2]);
    if HashCode1 <> HashCode2 then begin
      FHashBucket.Modify(HashCode1, HashCode2, Index2);
      FHashBucket.Modify(HashCode2, HashCode1, Index1);
    end;
  
  end;
  
  function THashedList.HashOf(const Value: Variant): Integer;
  