7 writes to _ilg
System.Text.RegularExpressions (7)
System\Text\RegularExpressions\RegexAssemblyCompiler.cs (6)
57
_ilg
= DefineMethod(regexRunnerTypeBuilder, "TryFindNextPossibleStartingPosition", [typeof(ReadOnlySpan<char>)], typeof(bool), out MethodBuilder tryFindNextPossibleStartingPositionMethod);
60
_ilg
= DefineMethod(regexRunnerTypeBuilder, "TryMatchAtCurrentPosition", [typeof(ReadOnlySpan<char>)], typeof(bool), out MethodBuilder tryMatchAtCurrentPositionMethod);
63
_ilg
= DefineMethod(regexRunnerTypeBuilder, "Scan", [typeof(ReadOnlySpan<char>)], null, out _);
70
_ilg
= DefineMethod(regexRunnerFactoryTypeBuilder, "CreateInstance", null, typeof(RegexRunner), out _);
77
_ilg
= defaultCtorBuilder.GetILGenerator();
85
_ilg
= regexTypeBuilder.DefineConstructor(MethodAttributes.Public, CallingConventions.Standard, new Type[] { typeof(TimeSpan) }).GetILGenerator();
System\Text\RegularExpressions\RegexLWCGCompiler.cs (1)
81
_ilg
= dm.GetILGenerator();
75 references to _ilg
System.Text.RegularExpressions (75)
System\Text\RegularExpressions\RegexAssemblyCompiler.cs (12)
95
_ilg
!.Emit(OpCodes.Newobj, type.GetConstructor(Type.EmptyTypes)!);
113
_ilg
!.Emit(OpCodes.Call, typeof(Regex).GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, Type.EmptyTypes, Array.Empty<ParameterModifier>())!);
121
_ilg
!.Emit(OpCodes.Newobj, regexRunnerFactoryType.GetConstructor(Type.EmptyTypes)!);
129
_ilg
.Emit(OpCodes.Ldsfld, RegexField(nameof(Regex.InfiniteMatchTimeout)));
161
_ilg
.Emit(OpCodes.Newarr, typeof(string)); // create new string array
169
_ilg
.Emit(OpCodes.Stelem_Ref);
183
_ilg
!.Emit(OpCodes.Call, defaultCtorBuilder);
184
_ilg
.Emit(OpCodes.Ldarg_1);
187
_ilg
.Emit(OpCodes.Ldarg_1);
196
_ilg
!.Emit(OpCodes.Newobj, typeof(Hashtable).GetConstructor(Type.EmptyTypes)!);
211
_ilg
!.Emit(OpCodes.Box, typeof(int));
219
_ilg
!.Emit(OpCodes.Box, typeof(int));
System\Text\RegularExpressions\RegexCompiler.cs (63)
141
private Label DefineLabel() =>
_ilg
!.DefineLabel();
144
private void MarkLabel(Label l) =>
_ilg
!.MarkLabel(l);
147
protected void Ldstr(string str) =>
_ilg
!.Emit(OpCodes.Ldstr, str);
150
protected void Ldc(int i) =>
_ilg
!.Emit(OpCodes.Ldc_I4, i);
153
protected void LdcI8(long i) =>
_ilg
!.Emit(OpCodes.Ldc_I8, i);
156
protected void Ret() =>
_ilg
!.Emit(OpCodes.Ret);
159
protected void Dup() =>
_ilg
!.Emit(OpCodes.Dup);
162
private void RemUn() =>
_ilg
!.Emit(OpCodes.Rem_Un);
165
private void Ceq() =>
_ilg
!.Emit(OpCodes.Ceq);
168
private void CgtUn() =>
_ilg
!.Emit(OpCodes.Cgt_Un);
171
private void CltUn() =>
_ilg
!.Emit(OpCodes.Clt_Un);
174
private void Pop() =>
_ilg
!.Emit(OpCodes.Pop);
177
private void Add() =>
_ilg
!.Emit(OpCodes.Add);
180
private void Sub() =>
_ilg
!.Emit(OpCodes.Sub);
183
private void Mul() =>
_ilg
!.Emit(OpCodes.Mul);
186
private void And() =>
_ilg
!.Emit(OpCodes.And);
189
private void Or() =>
_ilg
!.Emit(OpCodes.Or);
192
private void Shl() =>
_ilg
!.Emit(OpCodes.Shl);
195
private void Shr() =>
_ilg
!.Emit(OpCodes.Shr);
199
private void Ldloc(LocalBuilder lt) =>
_ilg
!.Emit(OpCodes.Ldloc, lt);
203
private void Ldloca(LocalBuilder lt) =>
_ilg
!.Emit(OpCodes.Ldloca, lt);
206
private void LdindU2() =>
_ilg
!.Emit(OpCodes.Ldind_U2);
209
private void LdindI4() =>
_ilg
!.Emit(OpCodes.Ldind_I4);
212
private void LdindI8() =>
_ilg
!.Emit(OpCodes.Ldind_I8);
215
private void Unaligned(byte alignment) =>
_ilg
!.Emit(OpCodes.Unaligned, alignment);
219
private void Stloc(LocalBuilder lt) =>
_ilg
!.Emit(OpCodes.Stloc, lt);
222
protected void Ldthis() =>
_ilg
!.Emit(OpCodes.Ldarg_0);
225
private void Ldarg_1() =>
_ilg
!.Emit(OpCodes.Ldarg_1);
231
_ilg
!.Emit(OpCodes.Ldfld, ft);
238
_ilg
!.Emit(OpCodes.Ldflda, ft);
243
private void Ldarga_s(int position) =>
_ilg
!.Emit(OpCodes.Ldarga_S, position);
253
protected void Stfld(FieldInfo ft) =>
_ilg
!.Emit(OpCodes.Stfld, ft);
256
protected void Callvirt(MethodInfo mt) =>
_ilg
!.Emit(OpCodes.Callvirt, mt);
259
protected void Call(MethodInfo mt) =>
_ilg
!.Emit(OpCodes.Call, mt);
262
private void Brfalse(Label l) =>
_ilg
!.Emit(OpCodes.Brfalse_S, l);
265
private void BrfalseFar(Label l) =>
_ilg
!.Emit(OpCodes.Brfalse, l);
268
private void BrtrueFar(Label l) =>
_ilg
!.Emit(OpCodes.Brtrue, l);
271
private void BrFar(Label l) =>
_ilg
!.Emit(OpCodes.Br, l);
274
private void BleFar(Label l) =>
_ilg
!.Emit(OpCodes.Ble, l);
277
private void BltFar(Label l) =>
_ilg
!.Emit(OpCodes.Blt, l);
280
private void BltUnFar(Label l) =>
_ilg
!.Emit(OpCodes.Blt_Un, l);
283
private void BgeFar(Label l) =>
_ilg
!.Emit(OpCodes.Bge, l);
286
private void BgeUnFar(Label l) =>
_ilg
!.Emit(OpCodes.Bge_Un, l);
289
private void BneFar(Label l) =>
_ilg
!.Emit(OpCodes.Bne_Un, l);
292
private void BeqFar(Label l) =>
_ilg
!.Emit(OpCodes.Beq, l);
295
private void Brtrue(Label l) =>
_ilg
!.Emit(OpCodes.Brtrue_S, l);
298
private void Br(Label l) =>
_ilg
!.Emit(OpCodes.Br_S, l);
301
private void Ble(Label l) =>
_ilg
!.Emit(OpCodes.Ble_S, l);
304
private void Blt(Label l) =>
_ilg
!.Emit(OpCodes.Blt_S, l);
307
private void Bge(Label l) =>
_ilg
!.Emit(OpCodes.Bge_S, l);
310
private void BgeUn(Label l) =>
_ilg
!.Emit(OpCodes.Bge_Un_S, l);
313
private void Bgt(Label l) =>
_ilg
!.Emit(OpCodes.Bgt_S, l);
316
private void Bne(Label l) =>
_ilg
!.Emit(OpCodes.Bne_Un_S, l);
319
private void Beq(Label l) =>
_ilg
!.Emit(OpCodes.Beq_S, l);
322
private void Ldlen() =>
_ilg
!.Emit(OpCodes.Ldlen);
325
private void LdelemI4() =>
_ilg
!.Emit(OpCodes.Ldelem_I4);
328
private void StelemI4() =>
_ilg
!.Emit(OpCodes.Stelem_I4);
330
private void Switch(Label[] table) =>
_ilg
!.Emit(OpCodes.Switch, table);
333
private LocalBuilder DeclareBool() =>
_ilg
!.DeclareLocal(typeof(bool));
336
private LocalBuilder DeclareInt32() =>
_ilg
!.DeclareLocal(typeof(int));
339
private LocalBuilder? DeclareTextInfo() =>
_ilg
!.DeclareLocal(typeof(TextInfo));
342
private LocalBuilder DeclareString() =>
_ilg
!.DeclareLocal(typeof(string));
344
private LocalBuilder DeclareReadOnlySpanChar() =>
_ilg
!.DeclareLocal(typeof(ReadOnlySpan<char>));