1 write to _builder
Microsoft.CodeAnalysis.CSharp (1)
CodeGen\CodeGenerator.cs (1)
101_builder = builder;
517 references to _builder
Microsoft.CodeAnalysis.CSharp (517)
CodeGen\CodeGenerator.cs (24)
179result = _builder.LocalSlotManager.DeclareLocal( 227asyncCatchHandlerOffset = _diagnostics.HasAnyErrors() ? -1 : _builder.GetILOffsetFromMarker(_asyncCatchHandlerOffset); 246int yieldOffset = _builder.GetILOffsetFromMarker(yieldPoints[i]); 247int resumeOffset = _builder.GetILOffsetFromMarker(resumePoints[i]); 275_builder.DefineInitialHiddenSequencePoint(); 292_builder.Realize(); 309_builder.MarkLabel(s_returnLabel); 328_builder.EmitLocalLoad(LazyReturnTemp); 329_builder.EmitRet(false); 333_builder.EmitRet(true); 341_builder.EmitToken(symbol, syntaxNode, _diagnostics.DiagnosticBag); 352_builder.EmitToken(methodRef, syntaxNode, _diagnostics.DiagnosticBag, encodeAsRawDefinitionToken ? Cci.MetadataWriter.RawTokenEncoding.RowId : 0); 358_builder.EmitToken(fieldRef, syntaxNode, _diagnostics.DiagnosticBag); 363_builder.EmitToken(_module.Translate(symbol).Signature, syntaxNode, _diagnostics.DiagnosticBag); 392_builder.EmitOpCode(ILOpCode.Nop); 415_builder.EmitOpCode(ILOpCode.Nop); 424ArrayBuilder<RawSequencePoint> sequencePoints = _builder.SeqPointsOpt; 463_builder.EmitConstantValue(ConstantValue.Create(true)); 464_builder.EmitBranch(ILOpCode.Brtrue, label); 466_builder.EmitOpCode(ILOpCode.Nop); 467_builder.MarkLabel(label); 481_builder.SetInitialDebugDocument(_methodBodySyntaxOpt.SyntaxTree); 488_builder.DefineHiddenSequencePoint(); 501_builder.DefineSequencePoint(syntaxTree, span);
CodeGen\EmitAddress.cs (27)
76_builder.EmitLoadArgumentOpcode(0); 80_builder.EmitLoadArgumentAddrOpcode(0); 137_builder.EmitLocalAddress(temp); // ldloca temp 138_builder.EmitOpCode(ILOpCode.Dup); // dup 139_builder.EmitOpCode(ILOpCode.Initobj); // initobj <type> 223_builder.EmitBranch(ILOpCode.Br, doneLabel); 226_builder.AdjustStack(-1); 228_builder.MarkLabel(consequenceLabel); 231_builder.MarkLabel(doneLabel); 246_builder.EmitBranch(ILOpCode.Brtrue, whenValueTypeLabel); 250_builder.EmitBranch(ILOpCode.Br, doneLabel); 251_builder.AdjustStack(-1); 253_builder.MarkLabel(whenValueTypeLabel); 257_builder.MarkLabel(doneLabel); 287_builder.EmitLocalAddress(GetLocal(localAccess)); 303_builder.EmitOpCode(ILOpCode.Dup); 317_builder.EmitOpCode(ILOpCode.Refanyval); 332_builder.EmitLocalStore(value); 333_builder.EmitLocalAddress(value); 400_builder.EmitOpCode(ILOpCode.Readonly); 405_builder.EmitOpCode(ILOpCode.Ldelema); 411_builder.EmitArrayElementAddress(_module.Translate((ArrayTypeSymbol)arrayAccess.Expression.Type), 458_builder.EmitOpCode(ILOpCode.Ldsflda); 482_builder.EmitLoadArgumentAddrOpcode(slot); 486_builder.EmitLoadArgumentOpcode(slot); 558_builder.EmitOpCode(field.RefKind == RefKind.None ? ILOpCode.Ldflda : ILOpCode.Ldfld); 581_builder.EmitOpCode(ILOpCode.Ldflda);
CodeGen\EmitArrayInitializer.cs (43)
58_builder.EmitArrayBlockInitializer(data, inits.Syntax, _diagnostics.DiagnosticBag); 90_builder.EmitOpCode(ILOpCode.Dup); 91_builder.EmitIntConstant(i); 193_builder.EmitOpCode(ILOpCode.Dup); 200_builder.EmitIntConstant(row.Index); 204_builder.EmitIntConstant(i); 557var field = _builder.module.GetFieldForData(data, alignment: 1, wrappedExpression.Syntax, _diagnostics.DiagnosticBag); 558_builder.EmitOpCode(ILOpCode.Ldsflda); 559_builder.EmitToken(field, wrappedExpression.Syntax, _diagnostics.DiagnosticBag); 561_builder.EmitIntConstant(lengthForConstructor); 566_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: -3); 572_builder.EmitOpCode(ILOpCode.Newobj, stackAdjustment: -1); 618var field = _builder.module.GetFieldForData(data, alignment: (ushort)specialElementType.SizeInBytes(), wrappedExpression.Syntax, _diagnostics.DiagnosticBag); 619_builder.EmitOpCode(ILOpCode.Ldtoken); 620_builder.EmitToken(field, wrappedExpression.Syntax, _diagnostics.DiagnosticBag); 621_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: 0); 651var cachingField = _builder.module.GetArrayCachingFieldForData(data, _module.Translate(arrayType), wrappedExpression.Syntax, _diagnostics.DiagnosticBag); 656_builder.EmitOpCode(ILOpCode.Ldsfld); 657_builder.EmitToken(cachingField, wrappedExpression.Syntax, _diagnostics.DiagnosticBag); 658_builder.EmitOpCode(ILOpCode.Dup); 659_builder.EmitBranch(ILOpCode.Brtrue, arrayNotNullLabel); 664_builder.EmitOpCode(ILOpCode.Pop); 665_builder.EmitIntConstant(elementCount); 666_builder.EmitOpCode(ILOpCode.Newarr); 668_builder.EmitArrayBlockInitializer(data, wrappedExpression.Syntax, _diagnostics.DiagnosticBag); 669_builder.EmitOpCode(ILOpCode.Dup); 670_builder.EmitOpCode(ILOpCode.Stsfld); 671_builder.EmitToken(cachingField, wrappedExpression.Syntax, _diagnostics.DiagnosticBag); 675_builder.MarkLabel(arrayNotNullLabel); 676_builder.EmitOpCode(ILOpCode.Newobj, 0); 709Cci.IFieldReference cachingField = _builder.module.GetArrayCachingFieldForConstants(constants, _module.Translate(arrayType), 716_builder.EmitOpCode(ILOpCode.Ldsfld); 717_builder.EmitToken(cachingField, arrayCreation.Syntax, _diagnostics.DiagnosticBag); 718_builder.EmitOpCode(ILOpCode.Dup); 719_builder.EmitBranch(ILOpCode.Brtrue, arrayNotNullLabel); 723_builder.EmitOpCode(ILOpCode.Pop); 725_builder.EmitOpCode(ILOpCode.Dup); 726_builder.EmitOpCode(ILOpCode.Stsfld); 727_builder.EmitToken(cachingField, arrayCreation.Syntax, _diagnostics.DiagnosticBag); 731_builder.MarkLabel(arrayNotNullLabel); 736_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: -2); 742_builder.EmitOpCode(ILOpCode.Newobj, stackAdjustment: 0); 762_builder.EmitOpCode(ILOpCode.Initobj);
CodeGen\EmitConversion.cs (16)
48_builder.EmitIntConstant(0); 49_builder.EmitOpCode(ILOpCode.Conv_u); 85_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: 0); 165_builder.EmitNumericConversion(fromPredefTypeKind, toPredefTypeKind, conversion.Checked); 171_builder.EmitOpCode(ILOpCode.Conv_u); 222_builder.EmitNumericConversion(fromPredefTypeKind, toPredefTypeKind, conversion.Checked); 242_builder.EmitOpCode(ILOpCode.Unbox_any); 274_builder.EmitOpCode(ILOpCode.Castclass); 279_builder.EmitOpCode(ILOpCode.Unbox_any); 308_builder.EmitNumericConversion(fromPredefTypeKind, toPredefTypeKind, conversion.Checked); 327_builder.EmitNullConstant(); 336_builder.EmitOpCode(ILOpCode.Constrained); 357_builder.EmitOpCode(ILOpCode.Dup); 358_builder.EmitOpCode(ILOpCode.Ldvirtftn); 365_builder.EmitOpCode(ILOpCode.Ldftn); 371_builder.EmitOpCode(ILOpCode.Newobj, -1); // pop 2 args and push delegate object
CodeGen\EmitExpression.cs (190)
180_builder.EmitOpCode(ILOpCode.Ldarg_0); 389_builder.EmitBranch(ILOpCode.Brtrue, whenValueTypeLabel); 392_builder.EmitBranch(ILOpCode.Br, doneLabel); 396_builder.AdjustStack(-1); 399_builder.MarkLabel(whenValueTypeLabel); 402_builder.MarkLabel(doneLabel); 473_builder.EmitBranch(ILOpCode.Brtrue, whenNotNullLabel); 477_builder.EmitLocalStore(cloneTemp); 478_builder.EmitLocalAddress(cloneTemp); 479_builder.EmitLocalLoad(cloneTemp); 490_builder.EmitOpCode(ILOpCode.Dup); 502_builder.EmitOpCode(ILOpCode.Dup); 523_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: 0); 527_builder.EmitBranch(ILOpCode.Brtrue, whenNotNullLabel); 539_builder.EmitOpCode(ILOpCode.Pop); 552_builder.EmitBranch(ILOpCode.Br, doneLabel); 560_builder.AdjustStack(+1); 568_builder.AdjustStack(-1); 571_builder.MarkLabel(whenNotNullLabel); 584_builder.MarkLabel(doneLabel); 679_builder.EmitOpCode(ILOpCode.Mkrefany); 691_builder.EmitOpCode(ILOpCode.Refanytype); 692_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: 0); 701_builder.EmitOpCode(ILOpCode.Arglist); 760_builder.EmitOpCode(ILOpCode.Conv_u); 784_builder.EmitOpCode(ILOpCode.Dup); 789_builder.EmitOpCode(ILOpCode.Dup); 811_builder.EmitOpCode(ILOpCode.Ldarg_0); 876_builder.OpenLocalScope(); 891_builder.CloseLocalScope(); 910_builder.OpenLocalScope(); 931_builder.CloseLocalScope(); 1026_builder.EmitOpCode(ILOpCode.Ldelem_i1); 1031_builder.EmitOpCode(ILOpCode.Ldelem_u1); 1035_builder.EmitOpCode(ILOpCode.Ldelem_i2); 1040_builder.EmitOpCode(ILOpCode.Ldelem_u2); 1044_builder.EmitOpCode(ILOpCode.Ldelem_i4); 1048_builder.EmitOpCode(ILOpCode.Ldelem_u4); 1053_builder.EmitOpCode(ILOpCode.Ldelem_i8); 1060_builder.EmitOpCode(ILOpCode.Ldelem_i); 1064_builder.EmitOpCode(ILOpCode.Ldelem_r4); 1068_builder.EmitOpCode(ILOpCode.Ldelem_r8); 1074_builder.EmitOpCode(ILOpCode.Ldelem_ref); 1080_builder.EmitOpCode(ILOpCode.Ldelem); 1088_builder.EmitOpCode(ILOpCode.Readonly); 1091_builder.EmitOpCode(ILOpCode.Ldelema); 1101_builder.EmitArrayElementLoad(_module.Translate((ArrayTypeSymbol)arrayAccess.Expression.Type), arrayAccess.Expression.Syntax, _diagnostics.DiagnosticBag); 1115_builder.EmitOpCode(ILOpCode.Pop); 1162_builder.EmitOpCode(ILOpCode.Volatile); 1164_builder.EmitOpCode(ILOpCode.Ldsfld); 1188_builder.EmitOpCode(ILOpCode.Volatile); 1191_builder.EmitOpCode(ILOpCode.Ldfld); 1237_builder.EmitOpCode(ILOpCode.Unbox); 1251_builder.EmitOpCode(ILOpCode.Ldflda); 1403_builder.EmitLocalLoad(definition); 1422_builder.EmitLoadArgumentOpcode(slot); 1442_builder.EmitOpCode(ILOpCode.Ldind_i1); 1447_builder.EmitOpCode(ILOpCode.Ldind_u1); 1451_builder.EmitOpCode(ILOpCode.Ldind_i2); 1456_builder.EmitOpCode(ILOpCode.Ldind_u2); 1460_builder.EmitOpCode(ILOpCode.Ldind_i4); 1464_builder.EmitOpCode(ILOpCode.Ldind_u4); 1469_builder.EmitOpCode(ILOpCode.Ldind_i8); 1476_builder.EmitOpCode(ILOpCode.Ldind_i); 1480_builder.EmitOpCode(ILOpCode.Ldind_r4); 1484_builder.EmitOpCode(ILOpCode.Ldind_r8); 1490_builder.EmitOpCode(ILOpCode.Ldind_ref); 1494_builder.EmitOpCode(ILOpCode.Ldobj); 1649_builder.EmitOpCode(ILOpCode.Initobj); // initobj <MyStruct> 1673_builder.EmitOpCode(ILOpCode.Constrained); 1677_builder.EmitOpCode(ILOpCode.Call, stackBehavior); 1793_builder.EmitLocalStore(tempOpt); 1794_builder.EmitLocalAddress(tempOpt); 1999_builder.EmitOpCode(ILOpCode.Call, stackBehavior); 2003_builder.EmitOpCode(ILOpCode.Callvirt, stackBehavior); 2007_builder.EmitOpCode(ILOpCode.Constrained); 2009_builder.EmitOpCode(ILOpCode.Callvirt, stackBehavior); 2054_builder.EmitBranch(ILOpCode.Brtrue, whenNotNullLabel); 2061_builder.EmitLocalStore(tempOpt); 2062_builder.EmitLocalAddress(tempOpt); 2066_builder.MarkLabel(whenNotNullLabel); 2330_builder.EmitOpCode(ILOpCode.Conv_ovf_i); 2334_builder.EmitOpCode(ILOpCode.Conv_ovf_i_un); 2353_builder.EmitOpCode(ILOpCode.Ldlen); 2367_builder.EmitNumericConversion(typeFrom, typeTo, @checked: false); 2380_builder.EmitOpCode(ILOpCode.Newarr); 2385_builder.EmitArrayCreation(_module.Translate(arrayType), expression.Syntax, _diagnostics.DiagnosticBag); 2452_builder.EmitOpCode(ILOpCode.Newobj, stackAdjustment); 2677_builder.EmitOpCode(ILOpCode.Initobj); // initobj <MyStruct> 2710_builder.EmitOpCode(ILOpCode.Call, stackAdjustment); 2733if (local != null && !_builder.PossiblyDefinedOutsideOfTry(GetLocal(local))) 2803_builder.EmitLoadArgumentOpcode(ParameterSlot(left)); 2837_builder.EmitLocalLoad(localDefinition); 3027_builder.EmitOpCode(ILOpCode.Dup); 3053_builder.EmitLocalStore(temp); 3090_builder.EmitLocalStore(GetLocal(local)); 3172_builder.EmitLocalAddress(temp); 3176_builder.EmitLocalLoad(temp); 3191_builder.EmitOpCode(ILOpCode.Stobj); 3203_builder.EmitArrayElementStore(_module.Translate(arrayType), syntaxNode, _diagnostics.DiagnosticBag); 3225_builder.EmitOpCode(ILOpCode.Stelem_i1); 3231_builder.EmitOpCode(ILOpCode.Stelem_i2); 3236_builder.EmitOpCode(ILOpCode.Stelem_i4); 3241_builder.EmitOpCode(ILOpCode.Stelem_i8); 3248_builder.EmitOpCode(ILOpCode.Stelem_i); 3252_builder.EmitOpCode(ILOpCode.Stelem_r4); 3256_builder.EmitOpCode(ILOpCode.Stelem_r8); 3262_builder.EmitOpCode(ILOpCode.Stelem_ref); 3266_builder.EmitOpCode(ILOpCode.Stelem); 3279_builder.EmitOpCode(ILOpCode.Volatile); 3290_builder.EmitOpCode(field.IsStatic ? ILOpCode.Stsfld : ILOpCode.Stfld); 3306_builder.EmitStoreArgumentOpcode(slot); 3323_builder.EmitOpCode(ILOpCode.Stind_i1); 3329_builder.EmitOpCode(ILOpCode.Stind_i2); 3334_builder.EmitOpCode(ILOpCode.Stind_i4); 3339_builder.EmitOpCode(ILOpCode.Stind_i8); 3346_builder.EmitOpCode(ILOpCode.Stind_i); 3350_builder.EmitOpCode(ILOpCode.Stind_r4); 3354_builder.EmitOpCode(ILOpCode.Stind_r8); 3360_builder.EmitOpCode(ILOpCode.Stind_ref); 3364_builder.EmitOpCode(ILOpCode.Stobj); 3375_builder.EmitOpCode(ILOpCode.Pop); 3391_builder.EmitOpCode(ILOpCode.Isinst); 3396_builder.EmitOpCode(ILOpCode.Ldnull); 3397_builder.EmitOpCode(ILOpCode.Cgt_un); 3420_builder.EmitOpCode(ILOpCode.Isinst); 3425_builder.EmitOpCode(ILOpCode.Unbox_any); 3441_builder.EmitConstantValue(constantValue); 3449_builder.EmitOpCode(ILOpCode.Ldc_i4_0); 3450_builder.EmitOpCode(ILOpCode.Conv_u); 3454_builder.EmitOpCode(ILOpCode.Ldc_i4_0); 3455_builder.EmitOpCode(ILOpCode.Conv_i); 3486_builder.EmitConstantValue(constantValue); 3496_builder.EmitLocalAddress(temp); // ldloca temp 3497_builder.EmitOpCode(ILOpCode.Initobj); // initobj <MyStruct> 3499_builder.EmitLocalLoad(temp); // ldloc temp 3506_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: 0); //argument off, return value on 3515_builder.EmitOpCode(ILOpCode.Ldtoken); 3523_builder.EmitOpCode(ILOpCode.Sizeof); 3531_builder.EmitOpCode(ILOpCode.Ldtoken); 3551_builder.EmitIntConstant(GetLocal(node.Local).SlotIndex); 3565_builder.EmitIntConstant(node.Parameter.Ordinal); 3578_builder.EmitOpCode(ILOpCode.Ldtoken); 3579_builder.EmitToken(fieldRef, syntax, _diagnostics.DiagnosticBag, Cci.MetadataWriter.RawTokenEncoding.LiftedVariableId); 3585_builder.EmitOpCode(ILOpCode.Ldtoken); 3586_builder.EmitGreatestMethodToken(); 3591_builder.EmitOpCode(ILOpCode.Ldsfld); 3597_builder.EmitOpCode(ILOpCode.Stsfld); 3603_builder.EmitToken( 3613_builder.EmitOpCode(ILOpCode.Ldsflda); 3614_builder.EmitToken( 3624_builder.EmitOpCode(ILOpCode.Call, -1); 3625_builder.EmitToken( 3635_builder.EmitOpCode(ILOpCode.Ldsfld); 3636_builder.EmitToken( 3644_builder.EmitOpCode(ILOpCode.Ldstr); 3645_builder.EmitModuleVersionIdStringToken(); 3650_builder.EmitOpCode(ILOpCode.Ldsfld); 3656_builder.EmitOpCode(ILOpCode.Stsfld); 3662_builder.EmitToken(_module.GetInstrumentationPayloadRoot(node.AnalysisKind, _module.Translate(node.Type, node.Syntax, _diagnostics.DiagnosticBag), node.Syntax, _diagnostics.DiagnosticBag), node.Syntax, _diagnostics.DiagnosticBag); 3668_builder.EmitOpCode(ILOpCode.Ldtoken); 3669_builder.EmitSourceDocumentIndexToken(node.Document); 3674_builder.EmitOpCode(ILOpCode.Ldtoken); 3682_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: 0); //argument off, return value on 3687_builder.EmitOpCode(ILOpCode.Ldtoken); 3689_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: -1); //2 arguments off, return value on 3695_builder.EmitOpCode(ILOpCode.Castclass); 3702_builder.EmitOpCode(ILOpCode.Ldtoken); 3709_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: 0); //argument off, return value on 3714_builder.EmitOpCode(ILOpCode.Ldtoken); 3716_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: -1); //2 arguments off, return value on 3722_builder.EmitOpCode(ILOpCode.Castclass); 3755_builder.EmitNumericConversion(Cci.PrimitiveTypeCode.Int32, toType, @checked: false); 3799_builder.EmitBranch(ILOpCode.Br, doneLabel); 3803_builder.AdjustStack(-1); 3806_builder.MarkLabel(consequenceLabel); 3823_builder.MarkLabel(doneLabel); 3859_builder.EmitOpCode(ILOpCode.Dup); 3868_builder.EmitBranch(ILOpCode.Brtrue, ifLeftNotNullLabel); 3872_builder.EmitOpCode(ILOpCode.Pop); 3886_builder.MarkLabel(ifLeftNotNullLabel); 4001_builder.EmitLocalStore(temp); 4002_builder.EmitLocalLoad(temp); 4010_builder.EmitOpCode(ILOpCode.Box); 4026_builder.EmitLocalStore(temp); 4035_builder.EmitLocalLoad(temp); 4039_builder.EmitOpCode(ILOpCode.Calli, stackBehavior); 4085_builder.EmitOpCode(ILOpCode.Nop); 4111_builder.EmitOpCode(ILOpCode.Constrained); 4115_builder.EmitOpCode(ILOpCode.Ldftn);
CodeGen\EmitOperators.cs (55)
43_builder.EmitOpCode(ILOpCode.Neg); 47_builder.EmitOpCode(ILOpCode.Not); 180_builder.EmitOpCode(ILOpCode.Mul); 184_builder.EmitOpCode(ILOpCode.Add); 188_builder.EmitOpCode(ILOpCode.Sub); 194_builder.EmitOpCode(ILOpCode.Div_un); 198_builder.EmitOpCode(ILOpCode.Div); 205_builder.EmitOpCode(ILOpCode.Rem_un); 209_builder.EmitOpCode(ILOpCode.Rem); 214_builder.EmitOpCode(ILOpCode.Shl); 220_builder.EmitOpCode(ILOpCode.Shr_un); 224_builder.EmitOpCode(ILOpCode.Shr); 229_builder.EmitOpCode(ILOpCode.Shr_un); 233_builder.EmitOpCode(ILOpCode.And); 237_builder.EmitOpCode(ILOpCode.Xor); 241_builder.EmitOpCode(ILOpCode.Or); 277_builder.EmitBranch(ILOpCode.Br, labEnd); 280_builder.AdjustStack(-1); 282_builder.MarkLabel(lazyFallThrough); 283_builder.EmitBoolConstant(stopValue); 284_builder.MarkLabel(labEnd); 384_builder.EmitBranch(sense ? ILOpCode.Brtrue_s : ILOpCode.Brfalse_s, falseLabel); 385_builder.EmitBoolConstant(true); 386_builder.EmitBranch(ILOpCode.Br, endLabel); 388_builder.AdjustStack(-1); 389_builder.MarkLabel(falseLabel); 390_builder.EmitBoolConstant(false); 391_builder.MarkLabel(endLabel); 464_builder.EmitConstantValue(nullOrZero); 465_builder.EmitOpCode(ILOpCode.Cgt_un); 478_builder.EmitConstantValue(nullOrZero); 479_builder.EmitOpCode(ILOpCode.Ceq); 486_builder.EmitOpCode(opCode); 503_builder.EmitBoolConstant(constant == sense); 536_builder.EmitBoolConstant(constantValue.BooleanValue == sense); 554_builder.EmitOpCode(ILOpCode.Ldnull); 555_builder.EmitOpCode(sense ? ILOpCode.Cgt_un : ILOpCode.Ceq); 563_builder.EmitOpCode(ILOpCode.Ldc_i4_0); 564_builder.EmitOpCode(sense ? ILOpCode.Cgt_un : ILOpCode.Ceq); 603_builder.EmitOpCode(ILOpCode.Ldc_i4_0); 607_builder.EmitOpCode(ILOpCode.Conv_i8); 611_builder.EmitOpCode(ILOpCode.Conv_i); 615_builder.EmitOpCode(ILOpCode.Sub_ovf); 682_builder.EmitNumericConversion(Microsoft.Cci.PrimitiveTypeCode.Int32, Microsoft.Cci.PrimitiveTypeCode.UInt8, @checked); 685_builder.EmitNumericConversion(Microsoft.Cci.PrimitiveTypeCode.Int32, Microsoft.Cci.PrimitiveTypeCode.Int8, @checked); 688_builder.EmitNumericConversion(Microsoft.Cci.PrimitiveTypeCode.Int32, Microsoft.Cci.PrimitiveTypeCode.Int16, @checked); 691_builder.EmitNumericConversion(Microsoft.Cci.PrimitiveTypeCode.Int32, Microsoft.Cci.PrimitiveTypeCode.UInt16, @checked); 705_builder.EmitOpCode(ILOpCode.Mul_ovf_un); 709_builder.EmitOpCode(ILOpCode.Mul_ovf); 716_builder.EmitOpCode(ILOpCode.Add_ovf_un); 720_builder.EmitOpCode(ILOpCode.Add_ovf); 727_builder.EmitOpCode(ILOpCode.Sub_ovf_un); 731_builder.EmitOpCode(ILOpCode.Sub_ovf); 758_builder.EmitOpCode(ILOpCode.Ldc_i4_0); 759_builder.EmitOpCode(ILOpCode.Ceq);
CodeGen\EmitStackAllocInitializer.cs (35)
51_builder.EmitOpCode(ILOpCode.Dup); 52_builder.EmitIntConstant(data[0]); 53_builder.EmitIntConstant(data.Length); 54_builder.EmitOpCode(ILOpCode.Initblk, -3); 59var field = _builder.module.GetFieldForData(data, alignment: 1, inits.Syntax, _diagnostics.DiagnosticBag); 60_builder.EmitOpCode(ILOpCode.Dup); 61_builder.EmitOpCode(ILOpCode.Ldsflda); 62_builder.EmitToken(field, inits.Syntax, _diagnostics.DiagnosticBag); 63_builder.EmitIntConstant(data.Length); 64_builder.EmitUnaligned(alignment: 1); 65_builder.EmitOpCode(ILOpCode.Cpblk, -3); 78_builder.EmitOpCode(ILOpCode.Dup); 82var field = _builder.module.GetFieldForData(data, alignment: (ushort)sizeInBytes, syntaxNode, _diagnostics.DiagnosticBag); 83_builder.EmitOpCode(ILOpCode.Ldtoken); 84_builder.EmitToken(field, syntaxNode, _diagnostics.DiagnosticBag); 85_builder.EmitOpCode(ILOpCode.Call, 0); 87_builder.EmitToken(createSpanHelperReference, syntaxNode, _diagnostics.DiagnosticBag); 90_builder.EmitLocalStore(temp); 91_builder.EmitLocalAddress(temp); 94_builder.EmitIntConstant(0); 95_builder.EmitOpCode(ILOpCode.Call, -1); 98_builder.EmitIntConstant(data.Length); 101_builder.EmitUnaligned((sbyte)sizeInBytes); 103_builder.EmitOpCode(ILOpCode.Cpblk, -3); 125_builder.EmitOpCode(ILOpCode.Localloc); 190_builder.EmitOpCode(ILOpCode.Dup); 209_builder.EmitIntConstant(index); 210_builder.EmitOpCode(ILOpCode.Add); 215_builder.EmitOpCode(ILOpCode.Add); 219_builder.EmitIntConstant(index); 220_builder.EmitOpCode(ILOpCode.Conv_i); 222_builder.EmitOpCode(ILOpCode.Mul); 223_builder.EmitOpCode(ILOpCode.Add); 231_builder.EmitOpCode(ILOpCode.Sizeof); 236_builder.EmitIntConstant(elementTypeSizeInBytes);
CodeGen\EmitStatement.cs (127)
111_builder.AssertStackEmpty(); 120int n = _builder.InstructionsEmitted; 122return _builder.InstructionsEmitted - n; 140_builder.EmitOpCode(ILOpCode.Nop); 152_asyncYieldPoints.Add(_builder.AllocateILMarker()); 158_asyncResumePoints.Add(_builder.AllocateILMarker()); 186_builder.EmitThrow(isRethrow: thrown == null); 406_builder.EmitBranch(ILOpCode.Br, dest); 440_builder.MarkLabel(fallThrough); 518_builder.EmitBranch(ilcode, dest, revOpCode); 559_builder.MarkLabel(fallThrough); 595_builder.EmitOpCode(ILOpCode.Isinst); 599_builder.EmitBranch(ilcode, dest); 618_builder.EmitBranch(ilcode, dest); 635_builder.MarkLabel(boundLabelStatement.Label); 640_builder.EmitBranch(ILOpCode.Br, boundGotoStatement.Label); 682_builder.OpenLocalScope(); 700_builder.AssertStackEmpty(); 704_builder.OpenLocalScope(ScopeType.TryCatchFinally); 706_builder.OpenLocalScope(ScopeType.Try); 709_builder.CloseLocalScope(); // try 711_builder.OpenLocalScope(ScopeType.Finally); 719_builder.CloseLocalScope(); // finally 721_builder.CloseLocalScope(); // try-finally 735_builder.CloseLocalScope(); 745_builder.OpenLocalScope(); 765_builder.EmitBranch(ILOpCode.Br, s_returnLabel); 780_builder.CloseLocalScope(); 796_builder.OpenLocalScope(); 805_builder.AddLocalToScope(_builder.LocalSlotManager.GetLocal(local)); 811_builder.CloseLocalScope(); 816_builder.OpenLocalScope(ScopeType.StateMachineVariable); 821_builder.DefineUserDefinedStateMachineHoistedLocal(field.SlotIndex); 826_builder.CloseLocalScope(); 848_builder.InExceptionHandler; 859!_builder.InExceptionHandler; 881_builder.EmitLocalStore(LazyReturnTemp); 890_builder.EmitBranch(ILOpCode.Br, s_returnLabel); 904_builder.EmitLocalStore(LazyReturnTemp); 917_builder.EmitRet(expressionOpt == null); 927_builder.AssertStackEmpty(); 936_builder.OpenLocalScope(ScopeType.TryCatchFinally); 938_builder.OpenLocalScope(ScopeType.Try); 955_builder.CloseLocalScope(); 967_builder.OpenLocalScope(statement.PreferFaultHandler ? ScopeType.Fault : ScopeType.Finally); 971_builder.CloseLocalScope(); 974_builder.CloseLocalScope(); 995_builder.CloseLocalScope(); 1041_builder.AdjustStack(1); // Account for exception on the stack. 1052_builder.OpenLocalScope(ScopeType.Catch, exceptionType); 1085_builder.OpenLocalScope(ScopeType.Filter); 1098_builder.EmitOpCode(ILOpCode.Isinst); 1099_builder.EmitToken(exceptionType, catchBlock.Syntax, _diagnostics.DiagnosticBag); 1100_builder.EmitOpCode(ILOpCode.Dup); 1101_builder.EmitBranch(ILOpCode.Brtrue, typeCheckPassedLabel); 1102_builder.EmitOpCode(ILOpCode.Pop); 1103_builder.EmitIntConstant(0); 1104_builder.EmitBranch(ILOpCode.Br, typeCheckFailedLabel); 1111_builder.MarkLabel(typeCheckPassedLabel); 1130_builder.EmitOpCode(ILOpCode.Unbox_any); 1150_builder.EmitLocalStore(GetLocal(exceptionSourceLocal)); 1164_builder.DefineUserDefinedStateMachineHoistedLocal(stateMachineField.SlotIndex); 1170_builder.EmitLocalStore(temp); 1175_builder.EmitLocalLoad(temp); 1187_builder.EmitOpCode(ILOpCode.Pop); 1192Debug.Assert(_builder.IsStackEmpty); 1203_builder.EmitIntConstant(0); 1204_builder.EmitOpCode(ILOpCode.Cgt_un); 1205_builder.MarkLabel(typeCheckFailedLabel); 1208_builder.MarkFilterConditionEnd(); 1212_builder.EmitOpCode(ILOpCode.Pop); 1217_builder.CloseLocalScope(); 1225_asyncCatchHandlerOffset = _builder.AllocateILMarker(); 1302_builder.EmitLocalStore(temp); 1324_builder.EmitIntegerSwitchJumpTable(switchCaseLabels, fallThroughLabel, key, expression.Type.EnumUnderlyingTypeOrSelf().PrimitiveTypeCode); 1388_builder.EmitLoad(keyTemp); 1389_builder.EmitBranch(ILOpCode.Brfalse, lengthBasedSwitchInfo.LengthBasedJumpTable.NullCaseLabel ?? fallThroughLabel, ILOpCode.Brtrue); 1397_builder.EmitLoadAddress(keyTemp); 1401_builder.EmitLoad(keyTemp); 1403_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: 0); 1405_builder.EmitLocalStore(stringLength); 1409_builder.EmitIntegerSwitchJumpTable( 1424_builder.MarkLabel(charJumpTable.Label); 1429_builder.EmitLoadAddress(keyTemp); 1433_builder.EmitLoad(keyTemp); 1435_builder.EmitIntConstant(charJumpTable.SelectedCharPosition); 1436_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: -1); 1440_builder.EmitOpCode(ILOpCode.Ldind_u2); 1442_builder.EmitLocalStore(charTemp); 1446_builder.EmitIntegerSwitchJumpTable( 1459_builder.MarkLabel(stringJumpTable.Label); 1472_builder.EmitToken(lengthMethodRef, syntaxNode: null, diag); 1514_builder.EmitLoad(key); 1515_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: 0); 1516_builder.EmitToken(stringHashMethodRef, syntaxNode, _diagnostics.DiagnosticBag); 1521_builder.EmitLocalStore(keyHash); 1564_builder.EmitLoad(keyArg); 1565_builder.EmitBranch(ILOpCode.Brfalse, targetLabel, ILOpCode.Brtrue); 1576_builder.EmitLoadAddress(keyArg); 1580_builder.EmitLoad(keyArg); 1581_builder.EmitBranch(ILOpCode.Brfalse, skipToNext, ILOpCode.Brtrue); 1583_builder.EmitLoad(keyArg); 1587_builder.EmitOpCode(ILOpCode.Call, 0); 1589_builder.EmitToken(lengthMethodRef, null, diag); 1593_builder.EmitBranch(ILOpCode.Brfalse, targetLabel, ILOpCode.Brtrue); 1594_builder.MarkLabel(skipToNext); 1609_builder.EmitStringSwitchJumpTable( 1704_builder.EmitLoad(key); 1705_builder.EmitConstantValue(stringConstant); 1706_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: -1); 1707_builder.EmitToken(stringEqualityMethodRef, syntaxNode, _diagnostics.DiagnosticBag); 1710_builder.EmitBranch(ILOpCode.Brtrue, targetLabel, ILOpCode.Brfalse); 1731_builder.EmitLoad(key); 1732_builder.EmitConstantValue(stringConstant); 1733_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: 0); 1734_builder.EmitToken(asSpanRef, syntaxNode, _diagnostics.DiagnosticBag); 1735_builder.EmitOpCode(ILOpCode.Call, stackAdjustment: -1); 1736_builder.EmitToken(sequenceEqualsRef, syntaxNode, _diagnostics.DiagnosticBag); 1739_builder.EmitBranch(ILOpCode.Brtrue, targetLabel, ILOpCode.Brfalse); 1753return _builder.LocalSlotManager.GetLocal(symbol); 1775_builder.AddLocalConstantToScope(localConstantDef); 1816var localDef = _builder.LocalSlotManager.DeclareLocal( 1834_builder.AddLocalToScope(localDef); 1893_builder.LocalSlotManager.FreeLocal(local); 1902return _builder.LocalSlotManager.AllocateSlot( 1912_builder.LocalSlotManager.FreeSlot(temp);