anchor.diff:    for I := 0 to J shr 1 do Exchange(I, J - I);
   end;
   
  -function TAbstractList.Partition(Low, High: Integer; CompareProc: TCompareMethod
  -  ): Integer;
  -var
  -  Elem: Variant;
  -begin
  -  Elem := Get(Low);
  -  while Low < High do begin
  -    while (Low < High) and (CompareProc(Elem, Get(High)) <= 0) do Dec(High);
  -    Exchange(Low, High);
  -    while (Low < High) and (CompareProc(Elem, Get(Low)) >= 0) do Inc(Low);
  -    Exchange(Low, High);
  -  end;
  -  Result := Low;
  -end;
  -
  -procedure TAbstractList.QuickSort(Low, High: Integer;
  -  CompareProc: TCompareMethod);
  -var
  -  P: Integer;
  -begin
  -  if High - Low > 8 then begin
  -    P := Partition(Low, High, CompareProc);
  -    QuickSort(Low, P - 1, CompareProc);
  -    QuickSort(P + 1, High, CompareProc);
  -  end;
  -end;
  -
   function TAbstractList.Compare(const Value1, Value2: Variant): Integer;
   begin
     case VarCompareValue(Value1, Value2) of
  
positive.code:   private
      FLock: TCriticalSection;
      FReadWriteLock: TMultiReadExclusiveWriteSynchronizer;
      function Partition(Low, High: Integer; CompareProc: TCompareMethod): Integer;
      procedure QuickSort(Low, High: Integer; CompareProc: TCompareMethod);
    protected
      function Get(Index: Integer): Variant; virtual; abstract;
      procedure Put(Index: Integer; const Value: Variant); virtual; abstract;
  
negative.code:  *                                                        *
   * hprose common unit for delphi.                         *
   *                                                        *
   * LastModified: Jun 14, 2016                             *
   * Author: Ma Bingyao <andot@hprose.com>                  *
   *                                                        *
  \**********************************************************/
  