| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Just as info: with .NET 8 alot of throw-helpers come inbox (ArgumentOutOfRange, ObjectDisposed, etc.). |
Sorry, something went wrong.
|
Maybe we should already add the net8.0 TFM and make this a shim. |
Sorry, something went wrong.
|
I'm marking the PR as ready for review. There are going to be multiple parts to make it easire to review. Adding .NET 8 TFM and referencing inbox throw-helpers should probably be done in a separate pr. One interesting thing I've encountered while working on this PR is that jit generates a lot of code for string interpolation even if the argument is a constant (though nameof works fine). |
Sorry, something went wrong.
Interesting... The nameof case shows that it does the right thing for at least some constants, but for fails with ushort.MaxValue... Maybe because it's a non-string and so requires a conversion, and Roslyn doesn't do that? I'd flag this on https://github.com/dotnet/roslyn (assuming there's not already an issue) Aside from that there are some test failures... |
Sorry, something went wrong.
Some issue with downloading PG, gonna restart... |
Sorry, something went wrong.
For codegen look at what Roslyn generated. For strings in interpolation holes C# 10 has the feature of "constant interpolated strings". |
Sorry, something went wrong.
It seems like integers (and I guess that includes uint) aren't a constant interpolated string because of a formatting differences across cultures? |
Sorry, something went wrong.
Ah yeah, that makes sense. Though if memory serves, there's a way to specify invariant culture inside the interpolation, and that could be done at compile-time. |
Sorry, something went wrong.
There was a problem hiding this comment.
Am fine with this, though I wonder if it's worth systematically doing this for the entire codebase... In other words, there are methods which are never going to get inlined anyway (because they're big), and so doing this there doesn't seem to have much value; in some places it also makes code readability worse (because we can't throw from expression context).
Sorry, something went wrong.
Yeah, I'm definitely not going to remove them from everywhere any time soon) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Contributes to #2237
Draft until I check the code jit compiles.