DIP 1014:Hooking D's struct move semantics--Community Review Round 1

kinke noone at nowhere.com
Thu May 17 15:47:14 UTC 2018


On Thursday, 17 May 2018 at 15:23:50 UTC, kinke wrote:
> See IR for https://run.dlang.io/is/1JIsk7.

I should probably emphasize that the LLVM `byval` attribute is 
strange at first sight. Pseudo-IR `void foo(S* byval param); ... 
foo(S* byarg arg);` doesn't mean that the IR callee gets the S* 
pointer from the IR callsite; it means 'memcpy(param, arg, 
S.sizeof)', with `param` being an *implicit* address in foo's 
parameters stack (calculated by LLVM and so exposed to the callee 
only). That's the difficulty for LDC I mentioned earlier.


More information about the Digitalmars-d mailing list