Skip to content

[5.7] Algorithm correctness cherry-picks #418

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

Conversation

natecook1000
Copy link
Member

@natecook1000 natecook1000 commented May 16, 2022

This is a cherry-pick of three algorithms implementation improvements:

This fixes an issue where calling `matches(of:)` with an pattern
that matches an empty substring gets stuck searching the same position
over and over.
When working on overload resolution, it's trickier with these
unnecessary name collisions. This includes a few symbols that might
be public eventually, but we can de-underscore them at that point.
The initial options are stored in the lowered program, and include
all options that are set before the first attempted match. Note that
not all initial options are global - a leading option-setting group
is included in initial options, even though it applies only to a
portion of the overall regex.

Previously, searching via firstMatch or matches(of:) would only
_start_ searches at a character index, even when a regex has
Unicode scalar semantics.
@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000 natecook1000 merged commit cda88e4 into swiftlang:swift/release/5.7 May 20, 2022
@natecook1000 natecook1000 deleted the 5.7/unicode_correctness branch May 20, 2022 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants