- Notifications
You must be signed in to change notification settings - Fork5.2k
JIT: Avoid boxing ArgumentNullException.ThrowIfNull arguments in Tier-0#104815
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Tagging subscribers to this area:@JulieLeeMSFT,@jakobbotsch |
AndyAyersMS left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I was thinking we'd catch this inimpBoxPatternMatch to avoid creating and then removing all the BOX IR, but that would require recognizing and intrinsic from its IL, which I guess could be clunky. This works too.
AndyAyersMS commentedJul 12, 2024
No worries, I hadn't gotten around to this yet. |
Uh oh!
There was an error while loading.Please reload this page.
EgorBo commentedJul 12, 2024
The problem with that, - we'd need to do a redundant "resolveToken" call on |
EgorBo commentedJul 14, 2024
@jakobbotsch@AndyAyersMS could you please review the Nullable<> part? |
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Closes#104512
Example:
Current codegen for
Test<int>in Tier0:New codegen for
Test<int>in Tier0:@AndyAyersMS I hope I didn't step on your foot since it's was assigned to you, it's just that it looked trivial and I decided to file a quick fix 🙂
In theory, we could solve this by a limitted version of inlining in tier0, but that is tricky and may regress startup time/lead to unnecessary type load events, etc.