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! |
jtschuster
left a comment
There was a problem hiding this comment.
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.