Repository navigation
Implement EETypePtr.EETypePtrOf intrinsic - #853
Conversation
|
I tested this by replacing @jkotas PTAL |
| } | ||
| } | ||
|
|
||
| [Intrinsic] |
There was a problem hiding this comment.
Could you please put it under #if CORERT ? nutc does not like things that it does not know about to be marked as intrinsics ... yet.
cb08a53 to
f17c306
Compare
| return obj is Lock; | ||
| #else | ||
| return obj.EETypePtr == typeof(Lock).TypeHandle.ToEETypePtr(); | ||
| return obj.EETypePtr == EETypePtr.EETypePtrOf<Lock>(); |
There was a problem hiding this comment.
I tried removing the CORERT-TODO here, but the intrinsic is still not low level enough and we end up recursing infinitely from the LdToken helper :/
We need to make this inlinable. Not sure why the JIT is not inlining it ... you should be able to find out by building debug ryujit.dll at commit where @kyulee1 snapped it last time. Mark it as forceinline, inline the field fetch so that local is not needed, change the to EEType helper to static method so that the address taken local is not needed ... one of these should help. |
|
Part of the plan to make this inlinable may be to change the following line in CorInfoImpl.Intrinsics.cs to map to the raw value helper: |
- Add support for "LDTOKEN Type" - Add recognition for GetValueInternal intrinsic - Fix fallout from being able to compile more code in Hello World: importing the same P/invoke with a different signature is a thing, NaN.ToString() won't compile, ~ of double doesn't work.
f17c306 to
3d103aa
Compare
|
The updated iteration inlines/expands everything as expected. EETypePtrOf is now a single load of a constant! |
|
LGTM |
|
@dotnet-bot test this please |
Implement EETypePtr.EETypePtrOf intrinsic
Resolves #852.