-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Intrinsify CreateSpan
in static constructor interpreter
#81747
Conversation
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsIntroduction of This adds intrinsic treatment to Cc @dotnet/ilc-contrib
|
Is it possible to somehow test this behavior? the fact that a constructor is pre-evaluated in a console test |
Yeah - the test in this PR is doing it |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: Jan Kotas <[email protected]>
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
Introduction of
CreateSpan
and its use in CoreLib regressed the number of types we can preinitialize. To add insult to injury, we were also hitting throwing paths in the cctor interpreter because the patterns generated by the C# compiler got lumped into uninteresting IL-only sequences we treated as invalid IL (the cctor interpreter should really only throw for invalid IL, but sometimes we throw for valid-but-uncommon IL too). As a result, even a hello world was hitting half a dozen first chance exceptions.This adds intrinsic treatment to
CreateSpan
. We also need to treatReadOnlySpan
specially because of #78681. That issue is basically a rewrite of the interpreter memory model and likely won't be addressed anytime soon.Cc @dotnet/ilc-contrib