Discussion: Rvalue refs and a Move construtor for D
Manu
turkeyman at gmail.com
Fri Sep 6 17:46:51 UTC 2019
On Thu, Sep 5, 2019 at 4:00 PM kinke via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> On Thursday, 5 September 2019 at 22:28:44 UTC, Manu wrote:
> > On Thu, Sep 5, 2019 at 2:55 PM kinke via Digitalmars-d
> > <digitalmars-d at puremagic.com> wrote:
> >>
> >> On Thursday, 5 September 2019 at 21:31:59 UTC, Manu wrote:
> >> > We lose by-val calling semantics, which are more efficient
> >> > for
> >> > small
> >> > struct's (most things), and certain classes of
> >> > wide-registers in
> >> > various architectures (impossible to codify the proper rules
> >> > in
> >> > the
> >> > language).
> >>
> >> No, I've explicitly stated that this obviously only affects
> >> non-PODs and large PODs. On Win64, `large` is already anything
> >> > 8 bytes. Of course we don't want to pass an int by ref.
> >
> > You dismissed the second half of my sentence.
>
> Didn't seem relevant, as these are all ABI details, and I am
> aware of this. My generalization wrt. > 8 bytes on Win64 wasn't
> totally accurate; vectors > 8 bytes are indeed passed in a vector
> register. [I have implemented this for LDC - still not fully 100%
> __vectorcall compatible.]
It's relevant because the calling convention needs to be defined, and
it's volatile with respect to architecture.
I don't think defining a custom ABI this way is a good path. It's just
different problems, and ABI problems are always bad problems.
More information about the Digitalmars-d
mailing list