-
Notifications
You must be signed in to change notification settings - Fork 4.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
JIT should support custom ClassLayout
instances with GC refs
#103362
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
I have a version of this for boxed value classes but I think a full solution requires that this also wrap most/all uses of class handles, so we can transparently describe types that currently have no VM model. We may also need to separate class identity from layout or something, eg a boxed value class has a different layout than the value class but conceptually similar identity. |
When I worked on #83036 I found that we didn't actually have that many dependencies on the class handle: having layouts with class handles for parameters and IL locals seemed to be enough. I think we can keep that invariant around and allow other locals to have custom layouts without much additional required effort, but I may be wrong. |
If you look at the first two or three commits in #103361 you can see what I started with, before switching to KVP (and might bring back, given KVP's auto layout issue). |
Similar to the support for block layouts we should generalize the support to support arbitrary GC refs. This would be beneficial for object stack allocation to represent some layouts (like boxes). It would also potentially allow describing some more efficient handling of remainders in physical promotion.
We may also want to add the ability to describe the significant ranges of the layout such that physical promotion can efficiently handle padding in these custom layouts.
The text was updated successfully, but these errors were encountered: