* move aliases of fpc_copy and fpc_copy_by_move_semantics to aliases and adjust their names to match other aliaes

This commit is contained in:
Sven/Sarah Barth 2024-11-17 14:33:25 +01:00
parent c48d8e9708
commit ecbd0fc0da
2 changed files with 9 additions and 10 deletions

View File

@ -30,6 +30,10 @@ Procedure int_Initialize (Data,TypeInfo: Pointer); [external name 'FPC_INITIALIZ
procedure int_InitializeArray(data,typeinfo : pointer;count : SizeInt); [external name 'FPC_INITIALIZE_ARRAY'];
procedure int_FinalizeArray(data,typeinfo : pointer;count : SizeInt); [external name 'FPC_FINALIZE_ARRAY'];
procedure int_AddRefArray(data,typeinfo : pointer;count : SizeInt); [external name 'FPC_ADDREF_ARRAY'];
Function int_Copy(Src, Dest, TypeInfo : Pointer) : SizeInt;[external name 'FPC_COPY'];
{$ifdef FPC_MANAGED_MOVE}
Function int_Copy_with_move_semantics(Src, Dest, TypeInfo : Pointer) : SizeInt;[external name 'FPC_COPY_WITH_MOVE_SEMANTICS'];
{$endif}
{$if defined(FPC_HAS_FEATURE_RTTI) and not defined(cpujvm)}
type

View File

@ -250,9 +250,6 @@ begin
end;
{ define alias for internal use in the system unit }
Function fpc_Copy_internal (Src, Dest, TypeInfo : Pointer) : SizeInt;[external name 'FPC_COPY'];
Function fpc_Copy (Src, Dest, TypeInfo : Pointer) : SizeInt;[Public,alias : 'FPC_COPY']; compilerproc;
var
copiedsize,
@ -291,7 +288,7 @@ begin
{ Process elements }
for I:=1 to EleCount do
begin
fpc_Copy_internal(Src+Offset,Dest+Offset,Info);
int_Copy(Src+Offset,Dest+Offset,Info);
inc(Offset,copiedsize);
end;
end;
@ -316,7 +313,7 @@ begin
Offset:=PRecordElement(Temp)^.Offset;
if Offset>expectedoffset then
move((Src+expectedoffset)^,(Dest+expectedoffset)^,Offset-expectedoffset);
expectedoffset:=Offset+fpc_Copy_internal(Src+Offset,Dest+Offset,PRecordElement(Temp)^.TypeInfo^);
expectedoffset:=Offset+int_Copy(Src+Offset,Dest+Offset,PRecordElement(Temp)^.TypeInfo^);
Inc(PRecordElement(Temp));
end;
{ elements remaining? }
@ -348,7 +345,7 @@ end;
{ have unintended side-effects }
procedure fpc_Copy_proc (Src, Dest, TypeInfo : Pointer);compilerproc; inline;
begin
fpc_copy_internal(src,dest,typeinfo);
int_copy(src,dest,typeinfo);
end;
@ -367,11 +364,9 @@ begin
int_initialize(Src,TypeInfo);
end;
Function fpc_Copy_with_move_semantics_internal (Src, Dest, TypeInfo : Pointer) : SizeInt;[external name 'FPC_COPY_WITH_MOVE_SEMANTICS'];
procedure fpc_Copy_with_move_semantics_proc (Src, Dest, TypeInfo : Pointer);compilerproc; inline;
begin
fpc_Copy_with_move_semantics_internal(src,dest,typeinfo);
int_Copy_with_move_semantics(src,dest,typeinfo);
end;
{$endif FPC_MANAGED_MOVE}
@ -428,6 +423,6 @@ procedure CopyArray(dest, source, typeInfo: Pointer; count: SizeInt);
begin
if RTTIManagementAndSize(typeinfo, rotCopy, size, manBuiltin)<>manNone then
for i:=0 to count-1 do
fpc_Copy_internal(source+size*i, dest+size*i, typeInfo);
int_Copy(source+size*i, dest+size*i, typeInfo);
end;