-
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
Move GetMethodTable to JIT #105098
Move GetMethodTable to JIT #105098
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
I don't think it's needed in JIT at all, you can just drop the VM side and leave the [Intrinsic] as a hint for the inliner. |
This should also be safer since we avoid the |
we already do a lot of similar casts in BCL, e.g. for arrays.
Jit should be smart enough to figure out that |
This is optimization, and not correctness issue. We don't have time to work on this for .NET 9, so we will review it in .NET 10. |
Reading the field at offset 0 is tricky. The byref pointing to offset 0 is technically invalid byref. The VM treats is as part of the object currently (vs. as part of the preceding object in memory), but I think we should minimize the number of places that depend on this details. I think it is best to keep reading of the method table as a JIT intrinsic like this PR does. Ideally, I would like to get rid of the m_pEEType field in native AOT to make |
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.
LGTM
@dotnet/jit-contrib There seems to be an infrastructure issue with SuperPMI. Could you please take a look? |
/azp run runtime-coreclr superpmi-diffs, runtime-coreclr superpmi-replay |
Azure Pipelines successfully started running 2 pipeline(s). |
Resurrection of #88860 now that the assert is gone since #104976.
Simplifies the VM code and should improve the codegen.