Skip to content

Use char.IsAsciiLetter in the Regex runtime#77559

Merged
stephentoub merged 2 commits intodotnet:mainfrom
eerhardt:RemoveRegexIsAsciiLetter
Oct 28, 2022
Merged

Use char.IsAsciiLetter in the Regex runtime#77559
stephentoub merged 2 commits intodotnet:mainfrom
eerhardt:RemoveRegexIsAsciiLetter

Conversation

@eerhardt
Copy link
Member

Need to move the duplicated IsAsciiLetter method to just the source generator, since the source generator can't reference the char API. That way the runtime doesn't need to pay for a duplicated method.

Need to move the duplicated IsAsciiLetter method to just the source generator, since the source generator can't reference the char API. That way the runtime doesn't need to pay for a duplicated method.
@ghost
Copy link

ghost commented Oct 27, 2022

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

Issue Details

Need to move the duplicated IsAsciiLetter method to just the source generator, since the source generator can't reference the char API. That way the runtime doesn't need to pay for a duplicated method.

Author: eerhardt
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.

LGTM. You could also put the helper in the Stubs.cs file that's next to this one; that's where we've put other polyfills and such things for use in the generator.

Move helepr method to Stubs.cs.
@stephentoub stephentoub merged commit 7479cbe into dotnet:main Oct 28, 2022
@eerhardt eerhardt deleted the RemoveRegexIsAsciiLetter branch October 28, 2022 14:45
@ghost ghost locked as resolved and limited conversation to collaborators Nov 27, 2022
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.

3 participants