mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 17:09:07 +02:00
* do not copy sets in fpc_varset_(un)set if source and dest are the same
This commit is contained in:
parent
c47fc710ba
commit
edaee6f392
@ -94,7 +94,8 @@ procedure fpc_varset_set(const source;var dest; b,size : ptrint); compilerproc;
|
|||||||
type
|
type
|
||||||
tbsetarray = bitpacked array[0..high(sizeint)-1] of 0..1;
|
tbsetarray = bitpacked array[0..high(sizeint)-1] of 0..1;
|
||||||
begin
|
begin
|
||||||
move(source,dest,size);
|
if @source<>@dest then
|
||||||
|
move(source,dest,size);
|
||||||
tbsetarray(dest)[b]:=1;
|
tbsetarray(dest)[b]:=1;
|
||||||
end;
|
end;
|
||||||
{$endif ndef FPC_SYSTEM_HAS_FPC_VARSET_SET_BYTE}
|
{$endif ndef FPC_SYSTEM_HAS_FPC_VARSET_SET_BYTE}
|
||||||
@ -109,7 +110,8 @@ procedure fpc_varset_unset(const source;var dest; b,size : ptrint); compilerproc
|
|||||||
type
|
type
|
||||||
tbsetarray = bitpacked array[0..high(sizeint)-1] of 0..1;
|
tbsetarray = bitpacked array[0..high(sizeint)-1] of 0..1;
|
||||||
begin
|
begin
|
||||||
move(source,dest,size);
|
if @source<>@dest then
|
||||||
|
move(source,dest,size);
|
||||||
tbsetarray(dest)[b]:=0;
|
tbsetarray(dest)[b]:=0;
|
||||||
end;
|
end;
|
||||||
{$endif ndef FPC_SYSTEM_HAS_FPC_VARSET_UNSET_BYTE}
|
{$endif ndef FPC_SYSTEM_HAS_FPC_VARSET_UNSET_BYTE}
|
||||||
|
Loading…
Reference in New Issue
Block a user