Fix Issue 21158 - DWARF: function arguments are represented in reverse order#11630
Fix Issue 21158 - DWARF: function arguments are represented in reverse order#11630Luhrel wants to merge 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request and interest in making D better, @Luhrel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#11630" |
|
The argument reversal (ABI-wise) is restricted to |
63136b7 to
cbde9e5
Compare
I think I get it done in the right way now. |
|
The commit title needs to be |
Good to know. |
Have you checked the |
12345swordy
left a comment
There was a problem hiding this comment.
Looks good to me. Any objections @WalterBright ?
5a83be8 to
4d63869
Compare
|
@kinke @WalterBright Any objections to this addition? |
|
I'm still looking for an sret test, preferrably including a combined sret+this testcase, and a test for a nested function receiving an implicit context pointer. |
|
ping @RazvanN7. |
|
It seems that the nested function test is still missing. |
|
@RazvanN7 Should be good now. |
|
Still no sret tests. |
|
Something like: struct S
{
int x;
~this() {}
S foo(int a, float b)
{
// breakpoint here; expected low-level params order: `<sret pointer>, <this pointer>, b, a`
return S(x + a);
}
} |
Oh ok. Now I have no idea how to check if a |
|
You're probably looking for this: Line 749 in 71d410d sfunc.Sfunc.Fflags3 too).
|
|
That flag isn't set in this test case (but the sret argument is there, so I'm a bit confused) 🤔 |
|
It seems that this is the only place where Maybe it does get set but it somehow gets zeroed along the way. Otherwise, there might be another param or combination of params that tells us if a function requires a sret or not. Hope this helps. |
I dug a little bit. In Any ideas @kinke ? |
|
I have no idea about DMD's backend either; after a quick glance, it looks like setting the flag ( Lines 743 to 765 in 218d999 |
No description provided.