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)
141private Label DefineLabel() => _ilg!.DefineLabel(); 144private void MarkLabel(Label l) => _ilg!.MarkLabel(l); 147protected void Ldstr(string str) => _ilg!.Emit(OpCodes.Ldstr, str); 150protected void Ldc(int i) => _ilg!.Emit(OpCodes.Ldc_I4, i); 153protected void LdcI8(long i) => _ilg!.Emit(OpCodes.Ldc_I8, i); 156protected void Ret() => _ilg!.Emit(OpCodes.Ret); 159protected void Dup() => _ilg!.Emit(OpCodes.Dup); 162private void RemUn() => _ilg!.Emit(OpCodes.Rem_Un); 165private void Ceq() => _ilg!.Emit(OpCodes.Ceq); 168private void CgtUn() => _ilg!.Emit(OpCodes.Cgt_Un); 171private void CltUn() => _ilg!.Emit(OpCodes.Clt_Un); 174private void Pop() => _ilg!.Emit(OpCodes.Pop); 177private void Add() => _ilg!.Emit(OpCodes.Add); 180private void Sub() => _ilg!.Emit(OpCodes.Sub); 183private void Mul() => _ilg!.Emit(OpCodes.Mul); 186private void And() => _ilg!.Emit(OpCodes.And); 189private void Or() => _ilg!.Emit(OpCodes.Or); 192private void Shl() => _ilg!.Emit(OpCodes.Shl); 195private void Shr() => _ilg!.Emit(OpCodes.Shr); 199private void Ldloc(LocalBuilder lt) => _ilg!.Emit(OpCodes.Ldloc, lt); 203private void Ldloca(LocalBuilder lt) => _ilg!.Emit(OpCodes.Ldloca, lt); 206private void LdindU2() => _ilg!.Emit(OpCodes.Ldind_U2); 209private void LdindI4() => _ilg!.Emit(OpCodes.Ldind_I4); 212private void LdindI8() => _ilg!.Emit(OpCodes.Ldind_I8); 215private void Unaligned(byte alignment) => _ilg!.Emit(OpCodes.Unaligned, alignment); 219private void Stloc(LocalBuilder lt) => _ilg!.Emit(OpCodes.Stloc, lt); 222protected void Ldthis() => _ilg!.Emit(OpCodes.Ldarg_0); 225private void Ldarg_1() => _ilg!.Emit(OpCodes.Ldarg_1); 231_ilg!.Emit(OpCodes.Ldfld, ft); 238_ilg!.Emit(OpCodes.Ldflda, ft); 243private void Ldarga_s(int position) => _ilg!.Emit(OpCodes.Ldarga_S, position); 253protected void Stfld(FieldInfo ft) => _ilg!.Emit(OpCodes.Stfld, ft); 256protected void Callvirt(MethodInfo mt) => _ilg!.Emit(OpCodes.Callvirt, mt); 259protected void Call(MethodInfo mt) => _ilg!.Emit(OpCodes.Call, mt); 262private void Brfalse(Label l) => _ilg!.Emit(OpCodes.Brfalse_S, l); 265private void BrfalseFar(Label l) => _ilg!.Emit(OpCodes.Brfalse, l); 268private void BrtrueFar(Label l) => _ilg!.Emit(OpCodes.Brtrue, l); 271private void BrFar(Label l) => _ilg!.Emit(OpCodes.Br, l); 274private void BleFar(Label l) => _ilg!.Emit(OpCodes.Ble, l); 277private void BltFar(Label l) => _ilg!.Emit(OpCodes.Blt, l); 280private void BltUnFar(Label l) => _ilg!.Emit(OpCodes.Blt_Un, l); 283private void BgeFar(Label l) => _ilg!.Emit(OpCodes.Bge, l); 286private void BgeUnFar(Label l) => _ilg!.Emit(OpCodes.Bge_Un, l); 289private void BneFar(Label l) => _ilg!.Emit(OpCodes.Bne_Un, l); 292private void BeqFar(Label l) => _ilg!.Emit(OpCodes.Beq, l); 295private void Brtrue(Label l) => _ilg!.Emit(OpCodes.Brtrue_S, l); 298private void Br(Label l) => _ilg!.Emit(OpCodes.Br_S, l); 301private void Ble(Label l) => _ilg!.Emit(OpCodes.Ble_S, l); 304private void Blt(Label l) => _ilg!.Emit(OpCodes.Blt_S, l); 307private void Bge(Label l) => _ilg!.Emit(OpCodes.Bge_S, l); 310private void BgeUn(Label l) => _ilg!.Emit(OpCodes.Bge_Un_S, l); 313private void Bgt(Label l) => _ilg!.Emit(OpCodes.Bgt_S, l); 316private void Bne(Label l) => _ilg!.Emit(OpCodes.Bne_Un_S, l); 319private void Beq(Label l) => _ilg!.Emit(OpCodes.Beq_S, l); 322private void Ldlen() => _ilg!.Emit(OpCodes.Ldlen); 325private void LdelemI4() => _ilg!.Emit(OpCodes.Ldelem_I4); 328private void StelemI4() => _ilg!.Emit(OpCodes.Stelem_I4); 330private void Switch(Label[] table) => _ilg!.Emit(OpCodes.Switch, table); 333private LocalBuilder DeclareBool() => _ilg!.DeclareLocal(typeof(bool)); 336private LocalBuilder DeclareInt32() => _ilg!.DeclareLocal(typeof(int)); 339private LocalBuilder? DeclareTextInfo() => _ilg!.DeclareLocal(typeof(TextInfo)); 342private LocalBuilder DeclareString() => _ilg!.DeclareLocal(typeof(string)); 344private LocalBuilder DeclareReadOnlySpanChar() => _ilg!.DeclareLocal(typeof(ReadOnlySpan<char>));