Skip to content
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

Have RegexInterpreter work over ReadOnlySpan<char> instead of strings. #62165

Merged
merged 3 commits into from
Dec 1, 2021

Conversation

joperezr
Copy link
Member

Contributes to #59629

After chatting with @stephentoub offline, the approach we want to take to add support of spans on Regex will start by having the current engines move to working over Spans instead of strings. Once we have moved all engines do this, then we can add public surface area that takes in user spans, as opposed to strings.

This first PR is making it so the RegexInterpreter engine no longer uses the runtext string, other than in FindFirstChar and Go methods for getting the actual Span out, which is used in the rest of the implementation.

cc: @stephentoub @danmoseley

@ghost
Copy link

ghost commented Nov 30, 2021

Tagging subscribers to this area: @eerhardt, @dotnet/area-system-text-regularexpressions
See info in area-owners.md if you want to be subscribed.

Issue Details

Contributes to #59629

After chatting with @stephentoub offline, the approach we want to take to add support of spans on Regex will start by having the current engines move to working over Spans instead of strings. Once we have moved all engines do this, then we can add public surface area that takes in user spans, as opposed to strings.

This first PR is making it so the RegexInterpreter engine no longer uses the runtext string, other than in FindFirstChar and Go methods for getting the actual Span out, which is used in the rest of the implementation.

cc: @stephentoub @danmoseley

Author: joperezr
Assignees: -
Labels:

area-System.Text.RegularExpressions

Milestone: -

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we're off :)

@joperezr joperezr merged commit 6af8b24 into dotnet:main Dec 1, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Dec 31, 2021
@joperezr joperezr deleted the RegexIntepreterSpans branch April 6, 2022 16:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants