119 }).MakeGenericMethod(
typeof(
char));
126 }).MakeGenericMethod(
typeof(
char));
134 }).MakeGenericMethod(
typeof(
char));
148 }).MakeGenericMethod(
typeof(
char));
931 switch (
char.GetUnicodeCategory((
char)
comparison))
1266 index = _boyerMoorePrefix.Pattern.Length - 1;
1328 int num2 = _boyerMoorePrefix.HighASCII - _boyerMoorePrefix.LowASCII + 1;
1333 for (
int k = 0;
k <
span.Length;
k++)
1335 int num8 =
state.thisRef._boyerMoorePrefix.NegativeASCII[
k +
state.thisRef._boyerMoorePrefix.LowASCII];
1338 num8 = state.thisRef._boyerMoorePrefix.Pattern.Length;
1340 else if (
state.thisRef._code.RightToLeft)
1370 int num4 =
int.MaxValue;
1374 int num6 = (_code.RightToLeft ? (_boyerMoorePrefix.Pattern.Length - 1 -
num5) :
num5);
1509 bool flag3 = !
flag2 || _leadingCharClasses.Length > 1;
1792 for (
int j = 0;
j <
num3 - 1;
j++)
1986 if (!flag &&
node.Str.Length > 64)
2005 while (
span.Length >= 4)
2016 while (
span.Length >= 2)
2027 for (
int i = 0;
i <
span.Length;
i++)
2311 else if (
node.Type == 45 &&
n ==
int.MaxValue &&
node.Str ==
"\0\u0001\0\0")
2438 for (
int k = 0;
k <
m4;
k++)
2549 flag2 = node.M == node.N || (node.Next !=
null && node.Next.Type == 32);
2561 if (
node.Next ==
null || (!
node.IsAtomicByParent() && (
node.Next.Type != 28 ||
node.Next.Next !=
null)))
2580 flag2 = node.N == -1;
3280 for (
int i = 0;
i <
text3.Length;
i++)
3896 case "\0\u0001\0\0":
3900 case "\0\0\u0001\t":
3903 case "\0\0\u0001\ufff7":
3911 case "\u0001\0\u0001d":
3918 if (caseInsensitive)
4026 for (
int i = 0;
i < 128;
i++)
4031 dest[
i >> 4] |= (char)(ushort)(1 << (
i & 0xF));
static unsafe void Copy(Array sourceArray, Array destinationArray, int length)
bool TryPop([MaybeNullWhen(false)] out T result)
virtual LocalBuilder DeclareLocal(Type localType)
virtual void MarkLabel(Label loc)
virtual void Emit(OpCode opcode)
virtual Label DefineLabel()
static readonly OpCode Ldloca
static readonly OpCode Brfalse
static readonly OpCode Bge_S
static readonly OpCode Blt_Un
static readonly OpCode Ldc_I8
static readonly OpCode Blt
static readonly OpCode Callvirt
static readonly OpCode Bge_Un
static readonly OpCode Mul
static readonly OpCode Brtrue
static readonly OpCode Br_S
static readonly OpCode Bge_Un_S
static readonly OpCode Or
static readonly OpCode Stloc
static readonly OpCode Bne_Un_S
static readonly OpCode Ldind_I4
static readonly OpCode Ldind_U2
static readonly OpCode Beq_S
static readonly OpCode Bgt
static readonly OpCode Rem_Un
static readonly OpCode Add
static readonly OpCode Ble
static readonly OpCode Blt_S
static readonly OpCode Ldind_I8
static readonly OpCode Ldc_I4
static readonly OpCode Beq
static readonly OpCode Unaligned
static readonly OpCode And
static readonly OpCode Br
static readonly OpCode Shl
static readonly OpCode Stelem_I4
static readonly OpCode Bne_Un
static readonly OpCode Ceq
static readonly OpCode Ldfld
static readonly OpCode Shr
static readonly OpCode Bge
static readonly OpCode Sub
static readonly OpCode Brtrue_S
static readonly OpCode Ldstr
static readonly OpCode Pop
static readonly OpCode Ldelem_I4
static readonly OpCode Switch
static readonly OpCode Call
static readonly OpCode Ret
static readonly OpCode Ldloc
static readonly OpCode Brfalse_S
static readonly OpCode Ldarg_0
static readonly OpCode Clt_Un
static readonly OpCode Neg
static readonly OpCode Bgt_Un_S
static readonly OpCode Dup
static readonly OpCode Ble_S
static readonly OpCode Stfld
static readonly OpCode Bgt_S
static readonly OpCode Ldlen
static readonly OpCode Cgt_Un
readonly int[] NegativeASCII
readonly int[][] NegativeUnicode
readonly bool CaseInsensitive
static int GetSetChars(string set, Span< char > chars)
static bool IsNegated(string set)
static bool TryGetSingleRange(string set, out char lowInclusive, out char highInclusive)
static bool CharInClass(char ch, string set, ref int[] asciiResultCache)
static bool TryGetSingleUnicodeCategory(string set, out UnicodeCategory category, out bool negated)
static char SingletonChar(string set)
static bool IsSingleton(string set)
static CharClassAnalysisResults Analyze(string set)
static int OpcodeSize(int opcode)
readonly bool RightToLeft
BacktrackNote(int flags, Label label, int codepos)
static readonly MethodInfo s_memoryMarshalGetReference
LocalBuilder DeclareString()
static readonly FieldInfo s_runtrackcountField
static readonly MethodInfo s_stringAsSpanMethod
static readonly FieldInfo s_runtextstartField
static readonly MethodInfo s_isMatchedMethod
LocalBuilder _runtrackposLocal
void EmitMatchCharacterClass(string charClass, bool caseInsensitive)
RentedLocalBuilder RentReadOnlySpanCharLocal()
static readonly MethodInfo s_checkTimeoutMethod
static readonly MethodInfo s_isECMABoundaryMethod
RentedLocalBuilder RentInt32Local()
void Ldloca(LocalBuilder lt)
static readonly MethodInfo s_cultureInfoGetTextInfoMethod
static readonly MethodInfo s_stringAsSpanIntIntMethod
static readonly MethodInfo s_spanIndexOfAnyCharChar
readonly bool _persistsAssembly
bool TryGenerateNonBacktrackingGo(RegexNode node)
static readonly MethodInfo s_spanIndexOf
static readonly MethodInfo s_transferCaptureMethod
void InitializeCultureForGoIfNecessary()
static readonly FieldInfo s_runtextendField
LocalBuilder _runtextendLocal
static readonly MethodInfo s_cultureInfoGetCurrentCultureMethod
static readonly MethodInfo s_matchIndexMethod
static readonly MethodInfo s_spanSliceIntMethod
Stack< LocalBuilder > _readOnlySpanCharLocalsPool
int AddUniqueTrack(int i, int flags)
static RegexRunnerFactory Compile(string pattern, RegexCode code, RegexOptions options, bool hasTimeout)
static readonly FieldInfo s_runtextField
static readonly MethodInfo s_charIsWhiteSpaceMethod
RegexCompiler(bool persistsAssembly)
string bool CaseInsensitive[] _leadingCharClasses
int AddBacktrackNote(int flags, Label l, int codepos)
RegexBoyerMoore _boyerMoorePrefix
static readonly FieldInfo s_runtrackposField
static readonly MethodInfo s_stringGetCharsMethod
LocalBuilder DeclareInt32()
void Switch(Label[] table)
static readonly MethodInfo s_charToLowerInvariantMethod
void ReadyReplaceStack(int i)
void PopDiscardStack(int i)
static MethodInfo RegexRunnerMethod(string methname)
LocalBuilder DeclareReadOnlySpanChar()
void Mvlocfld(LocalBuilder lt, FieldInfo ft)
static readonly MethodInfo s_matchLengthMethod
void Ldthisfld(FieldInfo ft)
void GenerateMiddleSection()
LocalBuilder _loopTimeoutCounterLocal
static readonly MethodInfo s_doubleTrackMethod
void Ldloc(LocalBuilder lt)
static readonly MethodInfo s_spanGetItemMethod
LocalBuilder DeclareTextInfo()
void Callvirt(MethodInfo mt)
static readonly MethodInfo s_textInfoToLowerMethod
static readonly MethodInfo s_doubleStackMethod
static readonly MethodInfo s_uncaptureMethod
static readonly MethodInfo s_crawlposMethod
static readonly MethodInfo s_spanSliceIntIntMethod
LocalBuilder _runtextposLocal
void Stloc(LocalBuilder lt)
static bool ParticipatesInCaseConversion(int comparison)
LocalBuilder _runstackLocal
static readonly MethodInfo s_spanStartsWith
LocalBuilder _runtextLocal
static readonly MethodInfo s_spanIndexOfAnyCharCharChar
static readonly FieldInfo s_runstackposField
LocalBuilder _runstackposLocal
static readonly MethodInfo s_captureMethod
void GenerateFindFirstChar()
static readonly MethodInfo s_charIsDigitMethod
void Unaligned(byte alignment)
static readonly FieldInfo s_runtextbegField
static readonly FieldInfo s_runtrackField
static readonly MethodInfo s_isBoundaryMethod
LocalBuilder _runtrackLocal
Stack< LocalBuilder > _int32LocalsPool
static readonly MethodInfo s_stringIndexOfCharInt
void GenerateBacktrackSection()
static readonly MethodInfo s_spanGetLengthMethod
LocalBuilder _runtextbegLocal
void InitLocalCultureInfo()
void PushTrack(LocalBuilder lt)
int AddUniqueTrack(int i)
static readonly FieldInfo s_runtextposField
LocalBuilder DeclareInt32Array()
void Mvfldloc(FieldInfo ft, LocalBuilder lt)
static FieldInfo RegexRunnerField(string fieldname)
static readonly MethodInfo s_charGetUnicodeInfo
LocalBuilder _textInfoLocal
void GenerateForwardSection()
static readonly MethodInfo s_charInClassMethod
void PushStack(LocalBuilder lt)
static readonly FieldInfo s_runstackField
RegexRunnerFactory FactoryInstanceFromCode(string pattern, RegexCode code, RegexOptions options, bool hasTimeout)
readonly int MinRequiredLength
static Type MakeGenericMethodParameter(int position)
Stack< LocalBuilder > _pool
RentedLocalBuilder(Stack< LocalBuilder > pool, LocalBuilder local)