-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[browser][coreCLR] use IsCoreCLRInterpreter #123350
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
base: main
Are you sure you want to change the base?
[browser][coreCLR] use IsCoreCLRInterpreter #123350
Conversation
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
jkoritzinsky
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.
runtimevariant was added for Mono because the runtime would be built fundamentally differently depending on variant. That's not the case for how we build CoreCLR, so I don't think using it applies in the same way.
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.
Pull request overview
This PR contributes to issue #123224 by introducing a unified IsInterpreter property in PlatformDetection that combines checks for both Mono and CoreCLR interpreters, and updates test code to use this new property where appropriate.
Changes:
- Introduces
IsInterpreterandIsNotInterpreterproperties inPlatformDetection.csthat combine bothIsMonoInterpreterandIsCoreClrInterpreterchecks - Updates test files to use the new
IsInterpreterproperty or addIsCoreClrInterpreterchecks where appropriate - Improves consistency in interpreter detection across the test suite
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs | Adds IsInterpreter and IsNotInterpreter properties that combine both interpreter types |
| src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Utf8JsonReaderTests.cs | Updates TestDepth test to use IsInterpreter instead of IsMonoInterpreter |
| src/libraries/System.Text.Json/tests/System.Text.Json.Tests/AssemblyInfo.cs | Updates ActiveIssue attribute to use IsInterpreter instead of IsMonoInterpreter |
| src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/JitInfoTests.cs | Adds IsCoreClrInterpreter checks alongside existing IsMonoInterpreter checks |
src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/JitInfoTests.cs
Show resolved
Hide resolved
src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/JitInfoTests.cs
Show resolved
Hide resolved
| } | ||
|
|
||
| if (PlatformDetection.IsMonoInterpreter) | ||
| if (PlatformDetection.IsMonoInterpreter || PlatformDetection.IsCoreClrInterpreter) |
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.
CoreCLR interpreter is compiling methods just like a JIT. Is it expected that the number of methods compiled by interpreter JIT is not included in JitInfo.GetCompiledMethodCount?
| long afterCompiledMethodCount = System.Runtime.JitInfo.GetCompiledMethodCount(); | ||
|
|
||
| if (PlatformDetection.IsMonoInterpreter || PlatformDetection.IsMonoAOT || PlatformDetection.IsReadyToRunCompiled) | ||
| if (PlatformDetection.IsMonoInterpreter || PlatformDetection.IsCoreClrInterpreter || PlatformDetection.IsMonoAOT || PlatformDetection.IsReadyToRunCompiled) |
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 would expect IsReadyToRunCompiled condition to sufficient here. Why is it not enough?
Contributes to #123224