Repository navigation
Enable Project N reflection stack - #1018
Conversation
The JIT expansion of this intrinsic assumes RuntimeTypeHandle has a single field of type RuntimeType which is not the case right now.
9acca5c to
63984d5
Compare
63984d5 to
cbb0317
Compare
|
There are more places in the JIT that assume layout of RuntimeTypeHandle: E.g. |
|
(You should see asserts about this with debug build of the JIT.) |
Sigh. That one is so subtle that only someone who knows the JIT code base can spot it :(
I did use a CHK version of the JIT to run all the CI tests (including the new one) and I haven't seen it assert. |
|
I have tried to repro the JIT asserts that I was seeing earlier when I have done the work on ldtoken, etc. I do not see them now either. |
|
LGTM - it will need some more work in future. |
Enable Project N reflection stack
Turns out the only JIT assumption about RuntimeTypeHandle having a single field of type RuntimeType that was biting us was the intrinsic expansion of GetTypeFromHandle. Not reporting the intrinsic to the JIT seems to work well enough.
I scanned the rest of the JIT code base but I couldn't find other places where this would be a problem.
Not reporting GetTypeFromHandle means we don't get optimizations around equality comparison, but we can likely live with that for a year or so...