Ver Fonte

+ Removed HASCURRENCY VALUEGETMEM VALUEFREEMEM defines

git-svn-id: trunk@293 -
michael há 20 anos atrás
pai
commit
a775d3d487

+ 0 - 24
rtl/i386/i386.inc

@@ -655,20 +655,13 @@ asm
         movl    %esp,%esi
       { Save Register}
         pushal
-{$ifdef valuegetmem}
         { esi can be destroyed in fpc_getmem!!! (JM) }
         pushl   %esi
-{$endif valuegetmem}
       { Memory size }
         pushl   (%eax)
-{$ifdef valuegetmem}
         call    fpc_getmem
         popl    %esi
         movl    %eax,(%esi)
-{$else valuegetmem}
-        pushl   %esi
-        call    AsmGetMem
-{$endif valuegetmem}
         movl    $-1,8(%ebp)
         popal
       { Avoid 80386DX bug }
@@ -746,14 +739,8 @@ asm
         movl    (%esi,%edi,1),%eax
         movl    %esi,12(%ebp)
         { push object position }
-{$ifdef valuefreemem}
         pushl   %esi
         call    fpc_freemem
-{$else valuefreemem}
-        leal    12(%ebp),%eax
-        pushl   %eax
-        call    AsmFreeMem
-{$endif valuefreemem}
         { set both object places to zero }
         xorl    %esi,%esi
         movl    %esi,12(%ebp)
@@ -784,20 +771,9 @@ asm
       { I think for precaution }
       { that we should clear the VMT here }
         movl    $0,(%eax,%edi,1)
-{$ifdef valuefreemem}
       { Freemem }
         pushl   %eax
         call    fpc_freemem
-{$else valuefreemem}
-      { temporary Variable }
-        subl    $4,%esp
-        movl    %esp,%edi
-      { SELF }
-        movl    %eax,(%edi)
-        pushl   %edi
-        call    AsmFreeMem
-        addl    $4,%esp
-{$endif valuefreemem}
 .LHD_3:
         popal
         { avoid the 80386DX bug }

+ 0 - 4
rtl/inc/compproc.inc

@@ -32,12 +32,8 @@ type
 
 
 { Needed to solve overloading problem with call from assembler (PFV) }
-{$ifdef valuegetmem}
 Function  fpc_getmem(size:ptrint):pointer;compilerproc;
-{$endif}
-{$ifdef valuefreemem}
 Procedure fpc_freemem(p:pointer);compilerproc;
-{$endif valuefreemem}
 
 procedure fpc_Shortstr_SetLength(var s:shortstring;len:SizeInt); compilerproc;
 function fpc_shortstr_to_shortstr(len:longint; const sstr: shortstring): shortstring; compilerproc;

+ 0 - 23
rtl/inc/heap.inc

@@ -428,7 +428,6 @@ begin
  ReAllocMemory := ReAllocMem(p,size);
 end;
 
-{$ifdef ValueGetmem}
 
 { Needed for calls from Assembler }
 function fpc_getmem(size:ptrint):pointer;compilerproc;[public,alias:'FPC_GETMEM'];
@@ -448,18 +447,6 @@ begin
    end;
 end;
 
-{$else ValueGetmem}
-
-{ Needed for calls from Assembler }
-procedure AsmGetMem(var p:pointer;size:ptrint);[public,alias:'FPC_GETMEM'];
-begin
-  p := MemoryManager.GetMem(size);
-end;
-
-{$endif ValueGetmem}
-
-{$ifdef ValueFreemem}
-
 procedure fpc_freemem(p:pointer);compilerproc;[public,alias:'FPC_FREEMEM'];
 begin
   if IsMultiThread and MemoryManager.NeedLock then
@@ -479,16 +466,6 @@ begin
    end;
 end;
 
-{$else ValueFreemem}
-
-procedure AsmFreeMem(var p:pointer);[public,alias:'FPC_FREEMEM'];
-begin
-  if p <> nil then
-    MemoryManager.FreeMem(p);
-end;
-
-{$endif ValueFreemem}
-
 
 { Bootstrapping }
 {$ifndef HASGETHEAPSTATUS}

+ 0 - 8
rtl/inc/heaph.inc

@@ -123,14 +123,6 @@ function GetFPCHeapStatus:TFPCHeapStatus;
 procedure GetHeapStatus(var status:THeapStatus);
 {$endif HASGETFPCHEAPSTATUS}
 
-{$ifndef ValueGetmem}
-{ Needed to solve overloading problem with call from assembler (PFV) }
-Procedure AsmGetmem(var p:pointer;size:ptrint);
-{$endif ValueGetmem}
-{$ifndef ValueFreemem}
-Procedure AsmFreemem(var p:pointer);
-{$endif ValueFreemem}
-
 { Bootstrapping }
 {$ifndef HASGETHEAPSTATUS}
 Function  Memavail:ptrint;

+ 0 - 2
rtl/inc/objpash.inc

@@ -293,9 +293,7 @@
            vtClass      : (VClass: TClass);
            vtPWideChar  : (VPWideChar: PWideChar);
            vtAnsiString : (VAnsiString: Pointer);
-{$ifdef HASCURRENCY}
            vtCurrency   : (VCurrency: PCurrency);
-{$endif HASCURRENCY}
            vtVariant    : (VVariant: PVariant);
            vtInterface  : (VInterface: Pointer);
            vtWideString : (VWideString: Pointer);

+ 0 - 3
rtl/inc/systemh.inc

@@ -223,9 +223,6 @@ Type
   UTF8String          = type ansistring;
   PUTF8String         = ^UTF8String;
 
-{$ifndef HASCURRENCY}
-  Currency            = Int64;
-{$endif HASCURRENCY}
   HRESULT             = type Longint;
   TDateTime           = type Double;
   Error               = type Longint;

+ 0 - 8
rtl/objpas/cvarutil.inc

@@ -378,11 +378,7 @@ begin
         VarInteger : Result:=VInteger;
         VarSingle  : Result:=Trunc(VSingle);
         VarDouble  : Result:=Trunc(VDouble);
-{$ifdef HASCURRENCY}
         VarCurrency: Result:=Trunc(VCurrency);
-{$else}
-        VarCurrency: Result:=VCurrency;
-{$endif}
         VarDate    : Result:=Trunc(VDate);
         VarOleStr  : NoWideStrings;
         VarBoolean : Result:=Longint(VBoolean);
@@ -413,11 +409,7 @@ begin
         VarInteger : Result:=VInteger;
         VarSingle  : Result:=Trunc(VSingle);
         VarDouble  : Result:=Trunc(VDouble);
-{$ifdef HASCURRENCY}
         VarCurrency: Result:=Trunc(VCurrency);
-{$else}
-        VarCurrency: Result:=VCurrency;
-{$endif}
         VarDate    : Result:=Trunc(VDate);
         VarOleStr  : NoWideStrings;
         VarBoolean : Result:=Longint(VBoolean);

+ 0 - 12
rtl/objpas/typinfo.pp

@@ -1208,10 +1208,8 @@ type
   TGetDoubleProcIndex = function(Index: integer): Double of object;
   TGetSingleProc = function:Single of object;
   TGetSingleProcIndex = function(Index: integer):Single of object;
-{$ifdef HASCURRENCY}
   TGetCurrencyProc = function : Currency of object;
   TGetCurrencyProcIndex = function(Index: integer) : Currency of object;
-{$endif HASCURRENCY}
 var
   AMethod : TMethod;
 begin
@@ -1227,10 +1225,8 @@ begin
          Result:=PExtended(Pointer(Instance)+Ptrint(PropInfo^.GetProc))^;
        ftcomp:
          Result:=PComp(Pointer(Instance)+Ptrint(PropInfo^.GetProc))^;
-{$ifdef HASCURRENCY}
        ftcurr:
          Result:=PCurrency(Pointer(Instance)+Ptrint(PropInfo^.GetProc))^;
-{$endif HASCURRENCY}
        end;
     ptStatic,
     ptVirtual:
@@ -1256,13 +1252,11 @@ begin
               Result:=TGetExtendedProc(AMethod)()
             else
               Result:=TGetExtendedProcIndex(AMethod)(PropInfo^.Index);
-          {$ifdef HASCURRENCY}
           ftCurr:
             if ((PropInfo^.PropProcs shr 6) and 1)<>0 then
               Result:=TGetCurrencyProc(AMethod)()
             else
               Result:=TGetCurrencyProcIndex(AMethod)(PropInfo^.Index);
-          {$endif HASCURRENCY}
         end;
       end;
   end;
@@ -1277,10 +1271,8 @@ type
   TSetDoubleProcIndex = procedure(Index: integer; const AValue: Double) of object;
   TSetSingleProc = procedure(const AValue: Single) of object;
   TSetSingleProcIndex = procedure(Index: integer; const AValue: Single) of object;
-{$ifdef HASCURRENCY}
   TSetCurrencyProc = procedure(const AValue: Currency) of object;
   TSetCurrencyProcIndex = procedure(Index: integer; const AValue: Currency) of object;
-{$endif HASCURRENCY}
 Var
   AMethod : TMethod;
 begin
@@ -1300,10 +1292,8 @@ begin
         ftComp:
           PComp(Pointer(Instance)+PtrUInt(PropInfo^.SetProc))^:=Value;
 {$endif FPC_COMP_IS_INT64}
-{$ifdef HASCURRENCY}
         ftCurr:
  	  PCurrency(Pointer(Instance)+PtrUInt(PropInfo^.SetProc))^:=Value;
-{$endif HASCURRENCY}
        end;
     ptStatic,
     ptVirtual:
@@ -1329,13 +1319,11 @@ begin
               TSetExtendedProc(AMethod)(Value)
             else
               TSetExtendedProcIndex(AMethod)(PropInfo^.Index,Value);
-          {$ifdef HASCURRENCY}
           ftCurr:
             if ((PropInfo^.PropProcs shr 6) and 1)<>0 then
               TSetCurrencyProc(AMethod)(Value)
             else
               TSetCurrencyProcIndex(AMethod)(PropInfo^.Index,Value);
-          {$endif HASCURRENCY}
         end;
       end;
   end;