-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Remove class constraint from Interlocked.{Compare}Exchange #104558
Conversation
Tagging subscribers to this area: @mangod9 |
3b6379c
to
0ad780b
Compare
...ibraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/Parallel.ForEachAsync.cs
Show resolved
Hide resolved
...s/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/ComObject.cs
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Threading/Interlocked.cs
Outdated
Show resolved
Hide resolved
c8afae7
to
f1ed396
Compare
a729caf
to
b23c285
Compare
b23c285
to
1bff925
Compare
1bff925
to
8a57ce2
Compare
30acb0b
to
116f650
Compare
@lambdageek @steveisok Are there any Mono-specific concerns related to this change? |
3ae4df4
to
1d192f9
Compare
Are there new/existing tests for the throwing behavior? If mono is green, one of two things is wrong (I'm on a phone and can't check):
/cc @kg |
Yes:
The mono legs are green (or at least the failures in the wasm legs are unrelated). Are you saying something is definitely wrong, or are you saying if something were wrong and going unnoticed it would be those? From what I could tell, mono's intrinsic implementations here already only support a subset of what the APIs do and already fall back to the managed implementations for other cases, and the throwing behavior is handled in the managed implementation. Did I misunderstand how things fit together? |
I think we should keep an eye on the perf runs - I wonder if generic sharing will see a perf regression. Also startup perf on the interpreter might be affected since it doesn't do many optimizations in Tier0.
No, I think it's fine. In JIT/AOT we handle two cases: In the interpreter we only seem to handle tl;dr:
|
oh, in case it wasn't clear: I don't think we should hold up this PR due to #104558 (comment) - just that we have some follow-up work |
Thanks, @lambdageek. In that case, I think the remaining blocker is just figuring out why I'm getting some invalid program exceptions with native aot :) |
Pushed out a fix for that. There was also a problem in crossgen2 but there it was just a deoptimization since we skip compiling methods with invalid IL and leave it to JIT. |
Thank you, @MichalStrehovsky! It would have taken me a while to discover the existence of TryGetIntrinsicMethodIL vs TryGetPerInstantiationIntrinsicMethodIL. |
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.
LGTM!
Thanks, all. |
#65184