[fpc-devel] Copy/move operator

Ben Grasset operator97 at gmail.com
Wed Jun 19 16:21:15 CEST 2019


On Tue, Jun 18, 2019 at 11:08 AM Sven Barth via fpc-devel <
fpc-devel at lists.freepascal.org> wrote:

> Those operators can't be inlined, because they're called from helper code,
> not from the compiler directly. The LLVM backend won't change anything here.
>

Is there any real purpose to implementing `Copy` versus just implementing
`operator :=` (or `operator Implicit` when in {$mode Delphi})? Those can be
inlined, and in practice are used in essentially all the places `Copy` is.
By which I mean, IIRC you never really see calls to `fpc_copy_proc` in the
generated assembler unless you've specifically implemented `Copy` yourself.

>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190619/a4225463/attachment.html>


More information about the fpc-devel mailing list