-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Enhance the bound generator concept to remove duplicate parameters and make it more pervasive throughout the system #105597
Conversation
…d make it more pervasive throughout the system.
It would be great to introduce some test which would assert the explicit shape of the output code, so that we feel safer doing refactorings. We had situation that the previous refactoring introduced duplicate statement in the generated code and we have not noticed for quite long time. more details |
I've added a test that validates the exact code output (and fixed a case of non-determinism in the JS generators in the process) |
thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but since this is a big change and just a refactor, we should probably wait until after we snap for 9 to merge
I'll move this and the corresponding issue to .NET 10. |
This reduces the number of places where we need to manually pass around a marshalling generator and its matching
TypePositionInfo
.This PR also simplifies some portions of the JS generators.
Addresses #89033
Moving the generators to also store the stub code context would end up requiring us to rebind in the majority of cases, increasing GC load and not actually improving maintainability much.