-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unused implicit argument for functions that return immediate values #6731
Conversation
@catamorphism alright, good news is with the changes to the build system all tests are passing & everything looks swell but I need some eyes on one particular LOC: It seems like this code is relying on the old behaviour but given it's not breaking anything obvious it's hard for me to know whether this is something I need to be concerned about. Once I get some clarification on that, I'll see if I can put together a test for this. Also, seems like this stuff is going to conflict pretty badly with @nikomatsakis' work on #6661. |
At least from a quick look over the patch, I don't think the conflicts should be too bad. I'm hoping #6661 will land tonight. If it does, ping me on IRC (nmatsakis) and I'll help you through resolving the conflicts if you have trouble. I've tried to cleanup and comment the logic for function calls and in particular foreign function calls, so hopefully it won't be too hard to figure out. |
Hi---thanks for the patch! I added some comments. It looks pretty good, I'd just like to see one minor stylistic fix (not returning the immediate flag but rather using methods on the |
Indeed @pnkfelix was correct. |
Thanks for taking a look at this @nikomatsakis, I've implemented the changes you suggested. LLVM newbie question: will this leak? thomaslee@b7f71e1#L0L1618 (Note I reassign fcx.llenv further down) |
No. |
Fix for #6575. In the trans phase, rustc emits code for a function parameter that goes completely unused in the event the return type of the function in question happens to be an immediate. This patch modifies rustc & parts of rustrt to ensure that the vestigial parameter is no longer present in compiled code.
Fix for #6575. In the trans phase, rustc emits code for a function parameter that goes completely unused in the event the return type of the function in question happens to be an immediate.
This patch modifies rustc & parts of rustrt to ensure that the vestigial parameter is no longer present in compiled code.