浏览代码

* Removed inline for procedures with assembler or formal parameters, since inline is not supported for them (compiler warns about that now). Even if there is no inline modifier in interface declaration of procedure, it is possible to specify inline in procedure implementation if needed (e.g. for generic implementations) and inlining will work for them.

git-svn-id: trunk@10629 -
yury 17 年之前
父节点
当前提交
5dc6e54925
共有 6 个文件被更改,包括 39 次插入39 次删除
  1. 4 4
      rtl/arm/arm.inc
  2. 8 8
      rtl/i386/i386.inc
  3. 1 1
      rtl/inc/compproc.inc
  4. 5 5
      rtl/inc/system.inc
  5. 19 19
      rtl/inc/systemh.inc
  6. 2 2
      rtl/wince/system.pp

+ 4 - 4
rtl/arm/arm.inc

@@ -71,14 +71,14 @@ end;
 
 
 {$IFNDEF INTERNAL_BACKTRACE}
 {$IFNDEF INTERNAL_BACKTRACE}
 {$define FPC_SYSTEM_HAS_GET_FRAME}
 {$define FPC_SYSTEM_HAS_GET_FRAME}
-function get_frame:pointer;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif}
+function get_frame:pointer;assembler;nostackframe;
 asm
 asm
   mov    r0,r11
   mov    r0,r11
 end;
 end;
 {$ENDIF not INTERNAL_BACKTRACE}
 {$ENDIF not INTERNAL_BACKTRACE}
 
 
 {$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
 {$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
-function get_caller_addr(framebp:pointer):pointer;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
+function get_caller_addr(framebp:pointer):pointer;assembler;
 asm
 asm
   movs r0,r0
   movs r0,r0
   beq .Lg_a_null
   beq .Lg_a_null
@@ -88,7 +88,7 @@ end;
 
 
 
 
 {$define FPC_SYSTEM_HAS_GET_CALLER_FRAME}
 {$define FPC_SYSTEM_HAS_GET_CALLER_FRAME}
-function get_caller_frame(framebp:pointer):pointer;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
+function get_caller_frame(framebp:pointer):pointer;assembler;
 asm
 asm
   movs r0,r0
   movs r0,r0
   beq .Lgnf_null
   beq .Lgnf_null
@@ -98,7 +98,7 @@ end;
 
 
 
 
 {$define FPC_SYSTEM_HAS_SPTR}
 {$define FPC_SYSTEM_HAS_SPTR}
-Function Sptr : pointer;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Sptr : pointer;assembler;
 asm
 asm
   mov    r0,sp
   mov    r0,sp
 end;
 end;

+ 8 - 8
rtl/i386/i386.inc

@@ -1045,7 +1045,7 @@ end;
 
 
 
 
 {$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
 {$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
-function get_caller_addr(framebp:pointer):pointer;nostackframe;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
+function get_caller_addr(framebp:pointer):pointer;nostackframe;assembler;
 asm
 asm
 {$ifndef REGCALL}
 {$ifndef REGCALL}
         movl    framebp,%eax
         movl    framebp,%eax
@@ -1058,7 +1058,7 @@ end;
 
 
 
 
 {$define FPC_SYSTEM_HAS_GET_CALLER_FRAME}
 {$define FPC_SYSTEM_HAS_GET_CALLER_FRAME}
-function get_caller_frame(framebp:pointer):pointer;nostackframe;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
+function get_caller_frame(framebp:pointer):pointer;nostackframe;assembler;
 asm
 asm
 {$ifndef REGCALL}
 {$ifndef REGCALL}
         movl    framebp,%eax
         movl    framebp,%eax
@@ -1071,7 +1071,7 @@ end;
 
 
 
 
 {$define FPC_SYSTEM_HAS_SPTR}
 {$define FPC_SYSTEM_HAS_SPTR}
-Function Sptr : Pointer;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Sptr : Pointer;assembler;nostackframe;
 asm
 asm
         movl    %esp,%eax
         movl    %esp,%eax
 end;
 end;
@@ -1359,7 +1359,7 @@ const
 
 
 
 
 {$define FPC_SYSTEM_HAS_SYSINITFPU}
 {$define FPC_SYSTEM_HAS_SYSINITFPU}
-Procedure SysInitFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
+Procedure SysInitFPU;
   var
   var
     { these locals are so we don't have to hack pic code in the assembler }
     { these locals are so we don't have to hack pic code in the assembler }
     localmxcsr: dword;
     localmxcsr: dword;
@@ -1383,7 +1383,7 @@ Procedure SysInitFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
 
 
 
 
 {$define FPC_SYSTEM_HAS_SYSRESETFPU}
 {$define FPC_SYSTEM_HAS_SYSRESETFPU}
-Procedure SysResetFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
+Procedure SysResetFPU;
   begin
   begin
     asm
     asm
       fnclex
       fnclex
@@ -1501,7 +1501,7 @@ end;
 {$ifndef FPC_SYSTEM_HAS_MEM_BARRIER}
 {$ifndef FPC_SYSTEM_HAS_MEM_BARRIER}
 {$define FPC_SYSTEM_HAS_MEM_BARRIER}
 {$define FPC_SYSTEM_HAS_MEM_BARRIER}
 
 
-procedure ReadBarrier;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif}
+procedure ReadBarrier;assembler;nostackframe;
 asm
 asm
   lock
   lock
   addl $0,0(%esp)
   addl $0,0(%esp)
@@ -1513,14 +1513,14 @@ begin
   { reads imply barrier on earlier reads depended on }
   { reads imply barrier on earlier reads depended on }
 end;
 end;
 
 
-procedure ReadWriteBarrier;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif}
+procedure ReadWriteBarrier;assembler;nostackframe;
 asm
 asm
   lock
   lock
   addl $0,0(%esp)
   addl $0,0(%esp)
   { alternative: mfence on SSE capable CPUs }
   { alternative: mfence on SSE capable CPUs }
 end;
 end;
 
 
-procedure WriteBarrier;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif}
+procedure WriteBarrier;assembler;nostackframe;
 asm
 asm
   { no write reordering on intel CPUs (yet) }
   { no write reordering on intel CPUs (yet) }
 end;
 end;

+ 1 - 1
rtl/inc/compproc.inc

@@ -239,7 +239,7 @@ Function fpc_AnsiStr_ShortStr_Compare (Var S1 : Pointer; Var S2 : ShortString):
 { pointer argument because otherwise when calling this, we get
 { pointer argument because otherwise when calling this, we get
   an endless loop since a 'var s: ansistring' must be made
   an endless loop since a 'var s: ansistring' must be made
   unique as well                                               }
   unique as well                                               }
-Function fpc_ansistr_Unique(Var S : Pointer): Pointer; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
+Function fpc_ansistr_Unique(Var S : Pointer): Pointer; compilerproc;
 {$endif FPC_HAS_FEATURE_ANSISTRINGS}
 {$endif FPC_HAS_FEATURE_ANSISTRINGS}
 
 
 {$ifdef FPC_HAS_FEATURE_WIDESTRINGS}
 {$ifdef FPC_HAS_FEATURE_WIDESTRINGS}

+ 5 - 5
rtl/inc/system.inc

@@ -185,31 +185,31 @@ function do_isdevice(handle:thandle):boolean;forward;
 {$endif cpuavr}
 {$endif cpuavr}
 
 
 
 
-procedure fillchar(var x;count : SizeInt;value : boolean);{$ifdef SYSTEMINLINE}inline;{$endif}
+procedure fillchar(var x;count : SizeInt;value : boolean);
 begin
 begin
   fillchar(x,count,byte(value));
   fillchar(x,count,byte(value));
 end;
 end;
 
 
 
 
-procedure fillchar(var x;count : SizeInt;value : char);{$ifdef SYSTEMINLINE}inline;{$endif}
+procedure fillchar(var x;count : SizeInt;value : char);
 begin
 begin
   fillchar(x,count,byte(value));
   fillchar(x,count,byte(value));
 end;
 end;
 
 
 
 
-procedure FillByte (var x;count : SizeInt;value : byte ); {$ifdef SYSTEMINLINE}inline;{$endif}
+procedure FillByte (var x;count : SizeInt;value : byte );
 begin
 begin
   FillChar (X,Count,VALUE);
   FillChar (X,Count,VALUE);
 end;
 end;
 
 
 
 
-function IndexChar(Const buf;len:SizeInt;b:char):SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
+function IndexChar(Const buf;len:SizeInt;b:char):SizeInt;
 begin
 begin
   IndexChar:=IndexByte(Buf,Len,byte(B));
   IndexChar:=IndexByte(Buf,Len,byte(B));
 end;
 end;
 
 
 
 
-function CompareChar(Const buf1,buf2;len:SizeInt):SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
+function CompareChar(Const buf1,buf2;len:SizeInt):SizeInt;
 begin
 begin
   CompareChar:=CompareByte(buf1,buf2,len);
   CompareChar:=CompareByte(buf1,buf2,len);
 end;
 end;

+ 19 - 19
rtl/inc/systemh.inc

@@ -474,29 +474,29 @@ ThreadVar
   {$endif}
   {$endif}
 {$endif}
 {$endif}
 
 
-Procedure Move(const source;var dest;count:SizeInt);{$ifdef INLINEGENERICS}inline;{$endif}
-Procedure FillChar(var x;count:SizeInt;Value:Byte);{$ifdef INLINEGENERICS}inline;{$endif}
-Procedure FillChar(var x;count:SizeInt;Value:Boolean);{$ifdef SYSTEMINLINE}inline;{$endif}
-Procedure FillChar(var x;count:SizeInt;Value:Char);{$ifdef SYSTEMINLINE}inline;{$endif}
-procedure FillByte(var x;count:SizeInt;value:byte);{$ifdef SYSTEMINLINE}inline;{$endif}
+Procedure Move(const source;var dest;count:SizeInt);
+Procedure FillChar(var x;count:SizeInt;Value:Byte);
+Procedure FillChar(var x;count:SizeInt;Value:Boolean);
+Procedure FillChar(var x;count:SizeInt;Value:Char);
+procedure FillByte(var x;count:SizeInt;value:byte);
 Procedure FillWord(var x;count:SizeInt;Value:Word);
 Procedure FillWord(var x;count:SizeInt;Value:Word);
 procedure FillDWord(var x;count:SizeInt;value:DWord);
 procedure FillDWord(var x;count:SizeInt;value:DWord);
-function  IndexChar(const buf;len:SizeInt;b:char):SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
-function  IndexByte(const buf;len:SizeInt;b:byte):SizeInt;{$ifdef INLINEGENERICS}inline;{$endif}
+function  IndexChar(const buf;len:SizeInt;b:char):SizeInt;
+function  IndexByte(const buf;len:SizeInt;b:byte):SizeInt;
 function  Indexword(const buf;len:SizeInt;b:word):SizeInt;
 function  Indexword(const buf;len:SizeInt;b:word):SizeInt;
 function  IndexDWord(const buf;len:SizeInt;b:DWord):SizeInt;
 function  IndexDWord(const buf;len:SizeInt;b:DWord):SizeInt;
-function  CompareChar(const buf1,buf2;len:SizeInt):SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
-function  CompareByte(const buf1,buf2;len:SizeInt):SizeInt;{$ifdef INLINEGENERICS}inline;{$endif}
+function  CompareChar(const buf1,buf2;len:SizeInt):SizeInt;
+function  CompareByte(const buf1,buf2;len:SizeInt):SizeInt;
 function  CompareWord(const buf1,buf2;len:SizeInt):SizeInt;
 function  CompareWord(const buf1,buf2;len:SizeInt):SizeInt;
 function  CompareDWord(const buf1,buf2;len:SizeInt):SizeInt;
 function  CompareDWord(const buf1,buf2;len:SizeInt):SizeInt;
 procedure MoveChar0(const buf1;var buf2;len:SizeInt);
 procedure MoveChar0(const buf1;var buf2;len:SizeInt);
 function  IndexChar0(const buf;len:SizeInt;b:char):SizeInt;
 function  IndexChar0(const buf;len:SizeInt;b:char):SizeInt;
-function  CompareChar0(const buf1,buf2;len:SizeInt):SizeInt;{$ifdef INLINEGENERICS}inline;{$endif}
+function  CompareChar0(const buf1,buf2;len:SizeInt):SizeInt;
 procedure prefetch(const mem);[internproc:fpc_in_prefetch_var];
 procedure prefetch(const mem);[internproc:fpc_in_prefetch_var];
-procedure ReadBarrier;{$ifdef INLINEGENERICS}inline;{$endif}
-procedure ReadDependencyBarrier;{$ifdef INLINEGENERICS}inline;{$endif}
-procedure ReadWriteBarrier;{$ifdef INLINEGENERICS}inline;{$endif}
-procedure WriteBarrier;{$ifdef INLINEGENERICS}inline;{$endif}
+procedure ReadBarrier;
+procedure ReadDependencyBarrier;
+procedure ReadWriteBarrier;
+procedure WriteBarrier;
 
 
 
 
 {****************************************************************************
 {****************************************************************************
@@ -780,11 +780,11 @@ function get_caller_frame(framebp:pointer):pointer;[INTERNPROC:fpc_in_get_caller
 function get_frame:pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
 function get_frame:pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
 {$ENDIF}
 {$ENDIF}
 
 
-function get_caller_addr(framebp:pointer):pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
-function get_caller_frame(framebp:pointer):pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
+function get_caller_addr(framebp:pointer):pointer;
+function get_caller_frame(framebp:pointer):pointer;
 
 
 Function IOResult:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
 Function IOResult:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
-Function Sptr:Pointer;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_ptr];
+Function Sptr:Pointer;[internconst:fpc_in_const_ptr];
 
 
 {$ifdef FPC_HAS_FEATURE_PROCESSES}
 {$ifdef FPC_HAS_FEATURE_PROCESSES}
 Function GetProcessID:SizeUInt;
 Function GetProcessID:SizeUInt;
@@ -873,8 +873,8 @@ Procedure SysInitExceptions;
 procedure SysInitStdIO;
 procedure SysInitStdIO;
 {$endif FPC_HAS_FEATURE_CONSOLEIO}
 {$endif FPC_HAS_FEATURE_CONSOLEIO}
 {$ifndef FPUNONE}
 {$ifndef FPUNONE}
-Procedure SysResetFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
-Procedure SysInitFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
+Procedure SysResetFPU;
+Procedure SysInitFPU;
 {$endif}
 {$endif}
 
 
 {*****************************************************************************
 {*****************************************************************************

+ 2 - 2
rtl/wince/system.pp

@@ -216,7 +216,7 @@ function MessageBox(w1:longint;l1,l2:PWideChar;w2:longint):longint;
 procedure memmove(dest, src: pointer; count: longint);
 procedure memmove(dest, src: pointer; count: longint);
    cdecl; external 'coredll' name 'memmove';
    cdecl; external 'coredll' name 'memmove';
 
 
-procedure Move(const source;var dest;count:SizeInt);[public, alias: 'FPC_MOVE']; {$ifdef SYSTEMINLINE}inline;{$endif}
+procedure Move(const source;var dest;count:SizeInt);[public, alias: 'FPC_MOVE'];
 begin
 begin
   if count > 0 then
   if count > 0 then
     memmove(@dest, @source, count);
     memmove(@dest, @source, count);
@@ -226,7 +226,7 @@ end;
 function memcmp(buf1, buf2: pointer; count: longint): longint;
 function memcmp(buf1, buf2: pointer; count: longint): longint;
    cdecl; external 'coredll' name 'memcmp';
    cdecl; external 'coredll' name 'memcmp';
 
 
-function CompareByte(Const buf1,buf2;len:SizeInt):SizeInt; {$ifdef SYSTEMINLINE}inline;{$endif}
+function CompareByte(Const buf1,buf2;len:SizeInt):SizeInt;
 begin
 begin
   CompareByte := memcmp(@buf1, @buf2, len);
   CompareByte := memcmp(@buf1, @buf2, len);
 end;
 end;