Skip to content

Avoid RegexWriter for RegexOptions.Compiled, RegexOptions.NonBacktracking, and source generator #62450

Closed

Description

@stephentoub

RegexWriter is used to convert a RegexNode tree into a series of opcodes and operands. These used to be used by all of the engines, but they're now only used for RegexInterpreter. With a bit of refactoring, we can avoid using RegexWriter at all for anything other than the interpreter.

Activity

  1. added this to the 7.0.0 milestone on Dec 6, 2021
  2. ghost added
    untriaged
    on Dec 6, 2021
  3. removed
    untriaged
    on Dec 6, 2021
  4. joperezr commented on Dec 15, 2021

    @joperezr
    Member

    Started to look a little onto this. Seeps like there is still small dependencies here and there on the NonBacktracking and Compiled engines for the emitted code. For example, the compiled engine makes some decisions based on the FindOptimizations object located inside the RegexCode. That said, we can easily refactor the FindOptimizations out of the RegexCode since creating it really only needs the culture and regex tree. Same goes for other things currently held by RegexCode like CapSize, Caps and TrackCount.

  5. self-assigned this
    on Feb 28, 2022
  6. ghost added
    in-pr
    on Mar 1, 2022
  7. ghost removed
    in-pr
    on Mar 2, 2022
  8. ghost locked as resolved and limited conversation to collaborators on Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions