You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Raise limits for when to switch from DFA to NFA and for when to fail to build because the predicted NFA size is too large to handle.
- Cache nullability information for each minterm to make computing it cheaper.
- Cache minterm information for all characters that map to a minterm other than zero, avoiding expensive computation per step for each non-ASCII character encountered.
- Reduce inner hot loop overhead for patterns not containing an end Z anchor and for having fewer than 256 minterms (more than that is rare).
- Reduce the frequency of timeout checks that were both costly and unnecessarily frequent to achieve the goal
---------
Co-authored-by: ieviev <ieviev@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Copy file name to clipboardexpand all lines: src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/BitVectorSolver.cs
+2-2
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ internal sealed class BitVectorSolver : ISolver<BitVector>
// Licensed to the .NET Foundation under one or more agreements.
2
+
// The .NET Foundation licenses this file to you under the MIT license.
3
+
4
+
usingSystem.Diagnostics;
5
+
6
+
namespaceSystem.Text.RegularExpressions.Symbolic
7
+
{
8
+
/// <summary>Provides details on how a match may be processed in reverse to find the beginning of a match once a match's existence has been confirmed.</summary>
// Licensed to the .NET Foundation under one or more agreements.
2
+
// The .NET Foundation licenses this file to you under the MIT license.
3
+
4
+
namespaceSystem.Text.RegularExpressions.Symbolic
5
+
{
6
+
/// <summary>Specifies the kind of a <see cref="MatchReversalInfo{TSet}"/>.</summary>
7
+
internalenumMatchReversalKind
8
+
{
9
+
/// <summary>The regex should be run in reverse to find beginning of the match.</summary>
10
+
MatchStart,
11
+
12
+
/// <summary>The end of the pattern is of a fixed length and can be skipped as part of running a regex in reverse to find the beginning of the match.</summary>
13
+
/// <remarks>
14
+
/// Reverse execution is not necessary for a subset of the match.
15
+
/// <see cref="MatchReversalInfo{TSet}.FixedLength"/> will contain the length of the fixed portion.
16
+
/// </remarks>
17
+
PartialFixedLength,
18
+
19
+
/// <summary>The entire pattern is of a fixed length.</summary>
20
+
/// <remarks>
21
+
/// Reverse execution is not necessary to find the beginning of the match.
22
+
/// <see cref="MatchReversalInfo{TSet}.FixedLength"/> will contain the length of the match.
0 commit comments