-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
Yes, benchmarks to double check would be good. |
Note that the Enum implementation overall is not particularly great. #22161 has good ideas how to make it better, but it uses generics too much. Once we get to sorting this out, I expect that it will change a lot. |
From a quick glance that implementation looks mono-friendly |
But I expect that the ties (FCalls, etc.) it is going to have with the rest of the runtime will be very different. |
I thought we don't put methods marked InternalCall into shared partition. Also |
@MichalStrehovsky I removed the internalcalls from the shared part but I can't remove RuntimeType stuff without it I won't be able to share 95% of code with mono. |
@jkotas
New - my branch |
14b5b8b
to
3ca4f4c
Compare
That is not that surprising given how it is implemented. I do not think we want to take this regression. |
@jkotas yeah I undid that change |
You can follow the pattern taken with |
Thoughts about this? |
Improving CoreRT sharing was nice to have and not required so it can be done later, right? |
Right, but should we use consistent patterns for this? |
Both files would stay excluded for CoreRT, but this is a structure (putting things requiring RuntimeType into separate dot files) we already have in place. Doing this later just messes up git history for the individual lines. IMHO it's better to do the break in one go. |
What will be in shared can be shared with CoreRT too, probably not much but code like
|
I did a search and replace of How would people feel if we just replace |
@jkotas @MichalStrehovsky I tried to share some non-RuntimeType related stuff with CoreRT in my recent commits (tested on CoreRT locally). |
How about the replacement of |
You may be able to do this by doing |
@jkotas @MichalStrehovsky done! Here is the Enum.CoreRT.cs I tested with these changes. |
Could you please share link to CoreRT commit or send WIP PR to CoreRT repo that we will cherry pick once the change is mirrored? |
@jkotas ok, so here is the PR dotnet/corert#7180 (looks green, the failing lanes as far as I understand are not related) |
So the implement the caching in CoreRT, make |
Thanks! Let me know if you are going to finish the CoreRT side. If not, I can take it from here. |
Signed-off-by: dotnet-bot <[email protected]>
Signed-off-by: dotnet-bot <[email protected]>
Signed-off-by: dotnet-bot <[email protected]>
Signed-off-by: dotnet-bot <[email protected]>
Signed-off-by: dotnet-bot <[email protected]>
Signed-off-by: dotnet-bot <[email protected]>
Commit migrated from dotnet/coreclr@d6449a2
Also, I replaced half-native
CompareTo
with managed version from CoreRT, is it ok or I should attach benchmarks? (if it looks good - I'll delete the native impl for InternalCompare)CoreRT implementation uses
EETypePtr
here and there inEnum
so it's not easy to reuse this implementation (I managed to extract ~40% of common code between CoreCLR and CoreRT and 95% between CoreCLR and Mono).Naive Enum.Mono.cs implementation.
/cc @marek-safar @jkotas