-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[mono] Optimize and clean-up System.Reflection.Emit.ILGenerator
.
#65251
Conversation
…s and clean it up.
… stream. An allocation is saved when emitting instructions with floating-point arguments.
Tagging subscribers to this area: @dotnet/area-system-reflection-emit Issue DetailsI noticed that the
|
How much work would it be to instead unify on coreclr's ILGenerator, moving that to shared and only specializing for runtime where there's a real need for divergence? |
That's a nice idea but not something at least I intend to do any time soon. Better open a new issue to not forget it. |
it's probably not too much work. The CoreCLR implementation uses I have some notes in a Paper doc |
src/mono/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.Mono.cs
Outdated
Show resolved
Hide resolved
src/mono/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.Mono.cs
Outdated
Show resolved
Hide resolved
Thank you! |
I noticed that the
ILGenerator
class in Mono uses an object stack to store integers, boxing them for no reason, and that some code that emits numbers in the code stream can be simplified with the help of members of theBinaryPrimitives
class. This PR fixes both things.