This repository has been archived by the owner on Nov 1, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When we turned on generic inlining in RyuJIT, we started inlining things potentially across multiple shared method bodies. There is a pathological case when we may end up inlining a shared instance method on a type that otherwise wasn't allocated in the program - RyuJIT would end up asking questions about things we didn't scan.
This is because scanning happens on canonical method bodies, and dictionary dependencies are only investigated when a specific dictionary is added to the graph. If a type wasn't allocated, there's no generic dictionary to look at.
This is a conservative fix and comes with a small size on disk regression - about 16 kB on Hello World (0 kB for the "minimal Hello World with reflection disabled"), and about 80 kB for ASP.NET.
I investigated preventing RyuJIT from inlining these methods, but RyuJIT is rather uncooperative when it comes to generic inlining. I think this is why UTC operates on runtime determined types directly rather than
__Canon
.