Skip to content

BypassReadyToRun when initializing ProbabilisticMap #115811

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

Merged
merged 3 commits into from
Jun 14, 2025

Conversation

MihaZupan
Copy link
Member

Closes #89979

The set of supported intrinsics impacts how the structure is laid out in memory, so the init logic must never disagree with the search logic.

@MihaZupan MihaZupan added this to the 10.0.0 milestone May 21, 2025
@MihaZupan MihaZupan self-assigned this May 21, 2025
@Copilot Copilot AI review requested due to automatic review settings May 21, 2025 00:58
Copy link
Contributor

@Copilot Copilot AI left a 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 ensures that the SetCharBit and IsCharBitSet methods in ProbabilisticMap bypass ReadyToRun compilation so that intrinsic support checks remain consistent between initialization and search.

  • Expanded comment explaining why these methods must bypass R2R
  • Applied [BypassReadyToRun] to both SetCharBit and IsCharBitSet
Comments suppressed due to low confidence (1)

src/libraries/System.Private.CoreLib/src/System/SearchValues/ProbabilisticMap.cs:79

  • Consider adding unit tests that simulate both intrinsic-supported and fallback code paths for SetCharBit and IsCharBitSet to verify behavior remains identical under tiered compilation and that the bypass attribute doesn't introduce inconsistencies.
[BypassReadyToRun]

@MihaZupan MihaZupan merged commit 3cabc21 into dotnet:main Jun 14, 2025
141 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ProbabilisticMap and CompExactlyDependsOn
2 participants