Blocked on dotnet/csharplang#5529
Every generated regex today may potentially generate one or more helper methods, e.g. for pushing and popping from the stack, for evaluating a word character, etc. If there are multiple generated regexes in the same assembly, each of them ends up with their own copy of these functions. We would like to move them into an internal class all of the generated regexes can access, but that then makes them available as well to the rest of the assembly, and we don't want user code elsewhere in the assembly calling into these implementation details. Once C# provides a solution for this, e.g. a "file private" visibility, we should employ it to reduce the duplication.
(In the meantime, we could choose to rely on EditorBrowsableState.Never and name obfuscation and still share the functionality, but it's a risk.)