* reverted r2037 because of braindead "out" semantics for refcounted

types

git-svn-id: trunk@2045 -
This commit is contained in:
Jonas Maebe 2005-12-24 01:06:05 +00:00
parent d6559f594d
commit 5b9f58ef73
8 changed files with 1192 additions and 1192 deletions

View File

@ -104,7 +104,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_MOVE} {$ifndef FPC_SYSTEM_HAS_MOVE}
{$define FPC_SYSTEM_HAS_MOVE} {$define FPC_SYSTEM_HAS_MOVE}
procedure Move(const source;out dest;count:SizeInt);[public, alias: 'FPC_MOVE'];assembler; procedure Move(const source;var dest;count:SizeInt);[public, alias: 'FPC_MOVE'];assembler;
var var
saveesi,saveedi : longint; saveesi,saveedi : longint;
asm asm
@ -188,7 +188,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_FILLCHAR} {$ifndef FPC_SYSTEM_HAS_FILLCHAR}
{$define FPC_SYSTEM_HAS_FILLCHAR} {$define FPC_SYSTEM_HAS_FILLCHAR}
Procedure FillChar(out x;count:SizeInt;value:byte);assembler; Procedure FillChar(var x;count:SizeInt;value:byte);assembler;
asm asm
{A push is prefered over a local variable because a local {A push is prefered over a local variable because a local
@ -229,7 +229,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_FILLWORD} {$ifndef FPC_SYSTEM_HAS_FILLWORD}
{$define FPC_SYSTEM_HAS_FILLWORD} {$define FPC_SYSTEM_HAS_FILLWORD}
procedure fillword(out x;count : SizeInt;value : word);assembler; procedure fillword(var x;count : SizeInt;value : word);assembler;
var var
saveedi : longint; saveedi : longint;
asm asm
@ -266,7 +266,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_FILLDWORD} {$ifndef FPC_SYSTEM_HAS_FILLDWORD}
{$define FPC_SYSTEM_HAS_FILLDWORD} {$define FPC_SYSTEM_HAS_FILLDWORD}
procedure filldword(out x;count : SizeInt;value : dword);assembler; procedure filldword(var x;count : SizeInt;value : dword);assembler;
var var
saveedi : longint; saveedi : longint;
asm asm

View File

@ -21,10 +21,10 @@
{$ifndef FPC_SYSTEM_HAS_MOVE} {$ifndef FPC_SYSTEM_HAS_MOVE}
{$define FPC_SYSTEM_HAS_MOVE} {$define FPC_SYSTEM_HAS_MOVE}
procedure bcopy(const source;out dest;count:sizeuint); cdecl; external 'c' name 'bcopy'; procedure bcopy(const source;var dest;count:sizeuint); cdecl; external 'c' name 'bcopy';
{ we need this separate move declaration because we can't add a "public, alias" to the above } { we need this separate move declaration because we can't add a "public, alias" to the above }
procedure Move(const source;out dest;count:sizeint); [public, alias: 'FPC_MOVE'];{$ifdef SYSTEMINLINE}inline;{$endif} procedure Move(const source;var dest;count:sizeint); [public, alias: 'FPC_MOVE'];{$ifdef SYSTEMINLINE}inline;{$endif}
begin begin
if count <= 0 then if count <= 0 then
exit; exit;
@ -35,9 +35,9 @@ end;
{$ifndef FPC_SYSTEM_HAS_FILLCHAR} {$ifndef FPC_SYSTEM_HAS_FILLCHAR}
{$define FPC_SYSTEM_HAS_FILLCHAR} {$define FPC_SYSTEM_HAS_FILLCHAR}
procedure memset(out x; value: byte; count: sizeuint); cdecl; external 'c'; procedure memset(var x; value: byte; count: sizeuint); cdecl; external 'c';
Procedure FillChar(out x;count: sizeint;value:byte);{$ifdef SYSTEMINLINE}inline;{$endif} Procedure FillChar(var x;count: sizeint;value:byte);{$ifdef SYSTEMINLINE}inline;{$endif}
begin begin
if count <= 0 then if count <= 0 then
exit; exit;
@ -48,7 +48,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_FILLBYTE} {$ifndef FPC_SYSTEM_HAS_FILLBYTE}
{$define FPC_SYSTEM_HAS_FILLBYTE} {$define FPC_SYSTEM_HAS_FILLBYTE}
procedure FillByte (out x;count : sizeint;value : byte );{$ifdef SYSTEMINLINE}inline;{$endif} procedure FillByte (var x;count : sizeint;value : byte );{$ifdef SYSTEMINLINE}inline;{$endif}
begin begin
if count <= 0 then if count <= 0 then
exit; exit;

View File

@ -22,7 +22,7 @@ type
pstring = ^shortstring; pstring = ^shortstring;
{$ifndef FPC_SYSTEM_HAS_MOVE} {$ifndef FPC_SYSTEM_HAS_MOVE}
procedure Move(const source;out dest;count:SizeInt);[public, alias: 'FPC_MOVE']; procedure Move(const source;var dest;count:SizeInt);[public, alias: 'FPC_MOVE'];
type type
bytearray = array [0..high(sizeint)-1] of byte; bytearray = array [0..high(sizeint)-1] of byte;
var var
@ -45,7 +45,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_FILLCHAR} {$ifndef FPC_SYSTEM_HAS_FILLCHAR}
Procedure FillChar(out x;count:SizeInt;value:byte); Procedure FillChar(var x;count:SizeInt;value:byte);
type type
longintarray = array [0..high(sizeint) div 4-1] of longint; longintarray = array [0..high(sizeint) div 4-1] of longint;
bytearray = array [0..high(sizeint)-1] of byte; bytearray = array [0..high(sizeint)-1] of byte;
@ -74,7 +74,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_FILLBYTE} {$ifndef FPC_SYSTEM_HAS_FILLBYTE}
procedure FillByte (out x;count : SizeInt;value : byte ); procedure FillByte (var x;count : SizeInt;value : byte );
begin begin
FillChar (X,Count,CHR(VALUE)); FillChar (X,Count,CHR(VALUE));
end; end;
@ -82,7 +82,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_FILLWORD} {$ifndef FPC_SYSTEM_HAS_FILLWORD}
procedure fillword(out x;count : SizeInt;value : word); procedure fillword(var x;count : SizeInt;value : word);
type type
longintarray = array [0..high(sizeint) div 4-1] of longint; longintarray = array [0..high(sizeint) div 4-1] of longint;
wordarray = array [0..high(sizeint) div 2-1] of word; wordarray = array [0..high(sizeint) div 2-1] of word;
@ -109,7 +109,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_FILLDWORD} {$ifndef FPC_SYSTEM_HAS_FILLDWORD}
procedure FillDWord(out x;count : SizeInt;value : DWord); procedure FillDWord(var x;count : SizeInt;value : DWord);
type type
longintarray = array [0..high(sizeint) div 4-1] of longint; longintarray = array [0..high(sizeint) div 4-1] of longint;
begin begin
@ -287,7 +287,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_MOVECHAR0} {$ifndef FPC_SYSTEM_HAS_MOVECHAR0}
procedure MoveChar0(Const buf1;out buf2;len:SizeInt); procedure MoveChar0(Const buf1;var buf2;len:SizeInt);
var var
I : longint; I : longint;
begin begin

View File

@ -139,12 +139,12 @@ function CheckInitialStkLen(stklen : SizeUInt) : SizeUInt; forward;
{$define SYSPROCDEFINED} {$define SYSPROCDEFINED}
{$endif cpuarm} {$endif cpuarm}
procedure fillchar(out x;count : SizeInt;value : boolean);{$ifdef SYSTEMINLINE}inline;{$endif} procedure fillchar(var x;count : SizeInt;value : boolean);{$ifdef SYSTEMINLINE}inline;{$endif}
begin begin
fillchar(x,count,byte(value)); fillchar(x,count,byte(value));
end; end;
procedure fillchar(out x;count : SizeInt;value : char);{$ifdef SYSTEMINLINE}inline;{$endif} procedure fillchar(var x;count : SizeInt;value : char);{$ifdef SYSTEMINLINE}inline;{$endif}
begin begin
fillchar(x,count,byte(value)); fillchar(x,count,byte(value));
end; end;

View File

@ -367,13 +367,13 @@ ThreadVar
{$endif} {$endif}
{$endif} {$endif}
Procedure Move(const source;out dest;count:SizeInt);{$ifdef INLINEGENERICS}inline;{$endif} Procedure Move(const source;var dest;count:SizeInt);{$ifdef INLINEGENERICS}inline;{$endif}
Procedure FillChar(out x;count:SizeInt;Value:Boolean);{$ifdef SYSTEMINLINE}inline;{$endif} Procedure FillChar(var x;count:SizeInt;Value:Boolean);{$ifdef SYSTEMINLINE}inline;{$endif}
Procedure FillChar(out x;count:SizeInt;Value:Char);{$ifdef SYSTEMINLINE}inline;{$endif} Procedure FillChar(var x;count:SizeInt;Value:Char);{$ifdef SYSTEMINLINE}inline;{$endif}
Procedure FillChar(out x;count:SizeInt;Value:Byte);{$ifdef INLINEGENERICS}inline;{$endif} Procedure FillChar(var x;count:SizeInt;Value:Byte);{$ifdef INLINEGENERICS}inline;{$endif}
procedure FillByte(out x;count:SizeInt;value:byte);{$ifdef INLINEGENERICS}inline;{$endif} procedure FillByte(var x;count:SizeInt;value:byte);{$ifdef INLINEGENERICS}inline;{$endif}
Procedure FillWord(out x;count:SizeInt;Value:Word); Procedure FillWord(var x;count:SizeInt;Value:Word);
procedure FillDWord(out x;count:SizeInt;value:DWord); procedure FillDWord(var x;count:SizeInt;value:DWord);
function IndexChar(const buf;len:SizeInt;b:char):SizeInt; function IndexChar(const buf;len:SizeInt;b:char):SizeInt;
function IndexByte(const buf;len:SizeInt;b:byte):SizeInt;{$ifdef INLINEGENERICS}inline;{$endif} function IndexByte(const buf;len:SizeInt;b:byte):SizeInt;{$ifdef INLINEGENERICS}inline;{$endif}
function Indexword(const buf;len:SizeInt;b:word):SizeInt; function Indexword(const buf;len:SizeInt;b:word):SizeInt;
@ -382,7 +382,7 @@ function CompareChar(const buf1,buf2;len:SizeInt):SizeInt;
function CompareByte(const buf1,buf2;len:SizeInt):SizeInt;{$ifdef INLINEGENERICS}inline;{$endif} function CompareByte(const buf1,buf2;len:SizeInt):SizeInt;{$ifdef INLINEGENERICS}inline;{$endif}
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;out 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;{$ifdef INLINEGENERICS}inline;{$endif}
procedure prefetch(const mem);[internproc:fpc_in_prefetch_var]; procedure prefetch(const mem);[internproc:fpc_in_prefetch_var];

View File

@ -80,7 +80,7 @@ function Sptr : Longint;
{$define FPC_SYSTEM_HAS_FILLCHAR} {$define FPC_SYSTEM_HAS_FILLCHAR}
procedure FillChar(out x;count:longint;value:byte);[public,alias: 'FPC_FILL_OBJECT']; procedure FillChar(var x;count:longint;value:byte);[public,alias: 'FPC_FILL_OBJECT'];
begin begin
asm asm
move.l 8(a6), a0 { destination } move.l 8(a6), a0 { destination }
@ -232,7 +232,7 @@ end;
{$define FPC_SYSTEM_HAS_MOVE} {$define FPC_SYSTEM_HAS_MOVE}
procedure move(const source;out dest;count : longint); procedure move(var source;var dest;count : longint);
{ base pointer+8 = source } { base pointer+8 = source }
{ base pointer+12 = destination } { base pointer+12 = destination }
{ base pointer+16 = number of bytes to move} { base pointer+16 = number of bytes to move}
@ -289,7 +289,7 @@ end;
{$define FPC_SYSTEM_HAS_FILLWORD} {$define FPC_SYSTEM_HAS_FILLWORD}
procedure fillword(out x;count : longint;value : word); procedure fillword(var x;count : longint;value : word);
begin begin
asm asm
move.l 8(a6), a0 { destination } move.l 8(a6), a0 { destination }

View File

@ -209,7 +209,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_MOVE} {$ifndef FPC_SYSTEM_HAS_MOVE}
{$define FPC_SYSTEM_HAS_MOVE} {$define FPC_SYSTEM_HAS_MOVE}
procedure Move(const source;out dest;count:longint);[public, alias: 'FPC_MOVE'];assembler; nostackframe; procedure Move(const source;var dest;count:longint);[public, alias: 'FPC_MOVE'];assembler; nostackframe;
asm asm
{ count <= 0 ? } { count <= 0 ? }
cmpwi cr0,r5,0 cmpwi cr0,r5,0
@ -436,7 +436,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_FILLCHAR} {$ifndef FPC_SYSTEM_HAS_FILLCHAR}
{$define FPC_SYSTEM_HAS_FILLCHAR} {$define FPC_SYSTEM_HAS_FILLCHAR}
Procedure FillChar(out x;count:longint;value:byte);assembler; Procedure FillChar(var x;count:longint;value:byte);assembler;
{ input: x in r3, count in r4, value in r5 } { input: x in r3, count in r4, value in r5 }
{$ifndef FPC_ABI_AIX} {$ifndef FPC_ABI_AIX}
@ -573,7 +573,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_FILLDWORD} {$ifndef FPC_SYSTEM_HAS_FILLDWORD}
{$define FPC_SYSTEM_HAS_FILLDWORD} {$define FPC_SYSTEM_HAS_FILLDWORD}
procedure filldword(out x;count : longint;value : dword); procedure filldword(var x;count : longint;value : dword);
assembler; nostackframe; assembler; nostackframe;
asm asm
{ registers: { registers:

View File

@ -91,7 +91,7 @@ function Sptr:Pointer;assembler;nostackframe;
{$ifndef FPC_SYSTEM_HAS_MOVE} {$ifndef FPC_SYSTEM_HAS_MOVE}
{$define FPC_SYSTEM_HAS_MOVE} {$define FPC_SYSTEM_HAS_MOVE}
procedure Move(const source;out dest;count:longint);[public, alias: 'FPC_MOVE'];assembler; procedure Move(const source;var dest;count:longint);[public, alias: 'FPC_MOVE'];assembler;
{ {
Registers: Registers:
%l0 temp. to do copying %l0 temp. to do copying