* 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}
{$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
saveesi,saveedi : longint;
asm
@ -188,7 +188,7 @@ end;
{$ifndef 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
{A push is prefered over a local variable because a local
@ -229,7 +229,7 @@ end;
{$ifndef 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
saveedi : longint;
asm
@ -266,7 +266,7 @@ end;
{$ifndef 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
saveedi : longint;
asm

View File

@ -21,10 +21,10 @@
{$ifndef 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 }
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
if count <= 0 then
exit;
@ -35,9 +35,9 @@ end;
{$ifndef 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
if count <= 0 then
exit;
@ -48,7 +48,7 @@ end;
{$ifndef 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
if count <= 0 then
exit;

View File

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

View File

@ -139,12 +139,12 @@ function CheckInitialStkLen(stklen : SizeUInt) : SizeUInt; forward;
{$define SYSPROCDEFINED}
{$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
fillchar(x,count,byte(value));
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
fillchar(x,count,byte(value));
end;

View File

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

View File

@ -80,7 +80,7 @@ function Sptr : Longint;
{$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
asm
move.l 8(a6), a0 { destination }
@ -232,7 +232,7 @@ end;
{$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+12 = destination }
{ base pointer+16 = number of bytes to move}
@ -289,7 +289,7 @@ end;
{$define FPC_SYSTEM_HAS_FILLWORD}
procedure fillword(out x;count : longint;value : word);
procedure fillword(var x;count : longint;value : word);
begin
asm
move.l 8(a6), a0 { destination }

File diff suppressed because it is too large Load Diff

View File

@ -91,7 +91,7 @@ function Sptr:Pointer;assembler;nostackframe;
{$ifndef 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:
%l0 temp. to do copying