forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Regex compiler to be trimmed (dotnet/corefx#41075)
Today an app that just does: ```C# Console.WriteLine(Regex.IsMatch("12345", "0*[1-9][0-9]*")); ``` and is trimmed will end up publishing a 105K System.Text.RegularExpression.dll, including the regex compiler for when the RegexOptions.Compiled is used. We can refactor the constructors such that the compiler only ends up getting rooted when one of the ctors that takes options is used. After this PR, if you don't pass RegexOptions, the 105K drops to 85K. Commit migrated from dotnet/corefx@31a5bba
- Loading branch information
1 parent
59d799a
commit c235d72
Showing
4 changed files
with
76 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters