22 instantiations of BoundLocal
Microsoft.CodeAnalysis.CSharp (22)
Binder\Binder_Deconstruct.cs (1)
910return new BoundLocal(syntax, localSymbol, BoundLocalDeclarationKind.WithExplicitType, constantValueOpt: null, isNullableUnknown: false, type: declTypeWithAnnotations.Type, hasErrors: hasErrors);
Binder\UsingStatementBinder.cs (1)
197: new BoundLocal(syntax, declarationsOpt[0].LocalSymbol, null, type) { WasCompilerGenerated = true };
BoundTree\VariablePendingInference.cs (1)
76return new BoundLocal(this.Syntax, localSymbol, BoundLocalDeclarationKind.WithInferredType, constantValueOpt: null, isNullableUnknown: false, type: type.Type, hasErrors: this.HasErrors || inferenceFailed).WithWasConverted();
Compiler\MethodBodySynthesizer.cs (1)
435boundTmps[i] = new BoundLocal(syntax, tmps[i], null, delegateType) { WasCompilerGenerated = true };
Generated\BoundNodes.xml.Generated.cs (1)
4544var result = new BoundLocal(this.Syntax, localSymbol, declarationKind, constantValueOpt, isNullableUnknown, type, this.HasErrors);
Lowering\ClosureConversion\ClosureConversion.cs (5)
632return new BoundLocal(syntax, localFrame, null, localFrame.Type); 680new BoundLocal(syntax, framePointer, null, frameType), 693BoundExpression left = new BoundFieldAccess(syntax, new BoundLocal(syntax, framePointer, null, frameType), frameParent, null); 776value = new BoundLocal(syntax, localToUse, null, localToUse.Type); 785static (frameType1, arg) => new BoundLocal(arg.syntax, arg.framePointer, null, arg.framePointer.Type),
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (1)
327BoundExpression boundRhs = new BoundLocal(syntax, rhsTemp, null, exprType);
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (1)
392var localBound = new BoundLocal(target.Syntax, localSymbol, constantValueOpt: null, type: outputPlaceholder.Type)
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
1234return new BoundLocal(syntax,
Lowering\LocalRewriter\LocalRewriter_LocalDeclaration.cs (1)
59new BoundLocal(
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
447BoundExpression boundTemp = new BoundLocal(
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (1)
221BoundLocal boundLocal = new BoundLocal(declarationSyntax, localSymbol, localDeclaration.InitializerOpt.ConstantValueOpt, localType);
Lowering\MethodToClassRewriter.cs (1)
449return new BoundLocal(node.Syntax, replacementLocal, node.ConstantValueOpt, replacementLocal.Type, node.HasErrors);
Lowering\SyntheticBoundNodeFactory.cs (3)
982return new BoundLocal(Syntax, local, null, local.Type) { WasCompilerGenerated = true }; 1678var local = new BoundLocal( 1723return new BoundLocal(node.Syntax, temp, constantValueOpt: null, type: node.Type) { WasCompilerGenerated = true };
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (2)
482var scriptLocal = new BoundLocal( 574var submissionLocal = new BoundLocal(
314 references to BoundLocal
Microsoft.CodeAnalysis.CSharp (314)
Binder\Binder.ValueChecks.cs (12)
837var local = (BoundLocal)expr; 1042private bool CheckLocalValueKind(SyntaxNode node, BoundLocal local, BindValueKind valueKind, bool checkingReceiver, BindingDiagnosticBag diagnostics) 1087private bool CheckLocalRefEscape(SyntaxNode node, BoundLocal local, uint escapeTo, bool checkingReceiver, BindingDiagnosticBag diagnostics) 2389if (argument is BoundDeconstructValuePlaceholder { VariableSymbol: not null } or BoundLocal { DeclarationKind: not BoundLocalDeclarationKind.None }) 2767BoundLocal { DeclarationKind: not BoundLocalDeclarationKind.None } l => l.LocalSymbol, 3395return GetLocalScopes(((BoundLocal)expr).LocalSymbol).RefEscapeScope; 3716var local = (BoundLocal)expr; 4110return GetLocalScopes(((BoundLocal)expr).LocalSymbol).ValEscapeScope; 4802var localSymbol = ((BoundLocal)expr).LocalSymbol; 5767var local = ((BoundLocal)expression).LocalSymbol;
Binder\Binder_Deconstruct.cs (1)
642BoundLocal { DeclarationKind: BoundLocalDeclarationKind.WithExplicitType or BoundLocalDeclarationKind.WithInferredType, LocalSymbol: var symbol } => symbol,
Binder\Binder_Operators.cs (2)
2669BoundLocal localAccess = (BoundLocal)expr;
Binder\DecisionDagBuilder.cs (1)
1716var bindings = cd.Bindings.Select(bpb => $"{(bpb.VariableAccess is BoundLocal l ? l.LocalSymbol.Name : "<var>")}={tempName(bpb.TempContainingValue)}");
Binder\LockOrUsingBinder.cs (1)
62lockedOrDisposedVariables = lockedOrDisposedVariables.Add(((BoundLocal)expression).LocalSymbol);
Binder\RefSafetyAnalysis.cs (1)
427public override BoundNode? VisitLocal(BoundLocal node)
BoundTree\BoundExpression.cs (1)
308public BoundLocal Update(LocalSymbol localSymbol, ConstantValue? constantValueOpt, TypeSymbol type)
BoundTree\BoundExpressionExtensions.cs (1)
25return ((BoundLocal)node).LocalSymbol.RefKind;
BoundTree\BoundImplicitIndexerAccess.cs (1)
20Debug.Assert(LengthOrCountAccess is BoundPropertyAccess or BoundArrayLength or BoundLocal or BoundBadExpression);
BoundTree\BoundNode.cs (1)
694public override BoundNode? VisitLocal(BoundLocal node)
BoundTree\BoundNode_Source.cs (1)
190case BoundLocal local:
BoundTree\BoundTreeVisitors.cs (1)
102return VisitLocal(node as BoundLocal, arg);
BoundTree\Constructors.cs (1)
75var localSymbol = ((BoundLocal)receiver).LocalSymbol;
CodeGen\EmitAddress.cs (4)
35return EmitLocalAddress((BoundLocal)expression, addressKind); 265private LocalDefinition EmitLocalAddress(BoundLocal localAccess, AddressKind addressKind) 358var local = (BoundLocal)value;
CodeGen\EmitExpression.cs (17)
131EmitLocalLoad((BoundLocal)expression, used); 444(receiver.Kind == BoundKind.Local && IsStackLocal(((BoundLocal)receiver).LocalSymbol)) || 1292return ((BoundLocal)receiver).LocalSymbol.RefKind != RefKind.None; 1390private void EmitLocalLoad(BoundLocal local, bool used) 1568return ((BoundLocal)receiver).LocalSymbol.SynthesizedKind == SynthesizedLocalKind.FrameCache; 2104BoundLocal { LocalSymbol.IsKnownToReferToTempIfReferenceType: true } or 2214return ((BoundLocal)receiver).LocalSymbol.RefKind != RefKind.None; 2732var local = left as BoundLocal; 2762return ((BoundLocal)left).LocalSymbol.RefKind == RefKind.None; 2811var left = (BoundLocal)assignmentTarget; 3006if (lhs.Kind == BoundKind.Local && ((BoundLocal)lhs).LocalSymbol.SynthesizedKind.IsLongLived()) 3076BoundLocal local = (BoundLocal)expression; 3941var local = (BoundLocal)expr;
CodeGen\EmitStatement.cs (5)
536(receiver.Kind == BoundKind.Local && IsStackLocal(((BoundLocal)receiver).LocalSymbol)) || 1146var exceptionSourceLocal = (BoundLocal)exceptionSource; 1282var local = ((BoundLocal)expression).LocalSymbol; 1745private LocalDefinition GetLocal(BoundLocal localExpression)
CodeGen\Optimizer.cs (15)
402private BoundLocal _assignmentLocal; 762if (value != null && value.Kind == BoundKind.Local && ((BoundLocal)value).LocalSymbol == local) 834public override BoundNode VisitLocal(BoundLocal node) 851public override BoundNode VisitLocal(BoundLocal node) 926var assignmentLocal = _assignmentLocal; 1049if (((BoundLocal)lhs).LocalSymbol.RefKind != RefKind.None) 1221if (unwrappedSequence is BoundLocal { LocalSymbol: { RefKind: not RefKind.None } localSymbol }) 1427var localSym = ((BoundLocal)boundExpression).LocalSymbol; 1640if (unwrappedSequence is BoundLocal { LocalSymbol: { } localSymbol }) 1699RecordVarWrite(((BoundLocal)exceptionSourceOpt).LocalSymbol); 1937((BoundLocal)top.Item1).LocalSymbol == local; 2123public override BoundNode VisitLocal(BoundLocal node) 2152var left = node.Left as BoundLocal; 2301var sourceLocal = ((BoundLocal)exceptionSource).LocalSymbol;
Compilation\CSharpSemanticModel.cs (1)
2055case BoundLocal local:
Compiler\AnonymousTypeMethodBodySynthesizer.cs (1)
118BoundLocal boundLocal = F.StoreToTemp(F.As(F.Parameter(_parameters[0]), anonymousType), out assignmentToTemp);
Compiler\MethodBodySynthesizer.cs (2)
430BoundLocal[] boundTmps = new BoundLocal[numTemps];
FlowAnalysis\AbstractFlowPass.cs (3)
561VisitLvalue((BoundLocal)node); 618protected virtual void VisitLvalue(BoundLocal node) 1282public override BoundNode VisitLocal(BoundLocal node)
FlowAnalysis\DataFlowsOutWalker.cs (1)
151return ((BoundLocal)node).LocalSymbol;
FlowAnalysis\DefiniteAssignment.cs (9)
829NoteRead(((BoundLocal)n).LocalSymbol); 980_usedVariables.Add(((BoundLocal)n).LocalSymbol); 1016NoteWrite(((BoundLocal)n).LocalSymbol, value, read: read, isRef: isRef); 1399unassignedSlot = GetOrCreateSlot(((BoundLocal)node).LocalSymbol); 1497var result = ((BoundLocal)expression).LocalSymbol; 1570var local = (BoundLocal)node; 2351public override BoundNode VisitLocal(BoundLocal node) 2597CheckAssigned(((BoundLocal)expr).LocalSymbol, node);
FlowAnalysis\LocalDataFlowPass.cs (1)
219return GetOrCreateSlot(((BoundLocal)node).LocalSymbol);
FlowAnalysis\NullableWalker.cs (5)
3013public override BoundNode? VisitLocal(BoundLocal node) 7545if (argument is BoundLocal local && local.DeclarationKind == BoundLocalDeclarationKind.WithInferredType) 7991if (argument is BoundLocal { DeclarationKind: BoundLocalDeclarationKind.WithInferredType } || IsTargetTypedExpression(argument)) 10090case BoundLocal { LocalSymbol.RefKind: RefKind.None }: 10274if (variable.Expression is BoundLocal { DeclarationKind: BoundLocalDeclarationKind.WithInferredType } local)
FlowAnalysis\NullableWalker_Patterns.cs (1)
681if (variableAccess is BoundLocal { LocalSymbol: SourceLocalSymbol local } boundLocal)
FlowAnalysis\ReadWriteWalker.cs (1)
188readOrWritten.Add(((BoundLocal)receiver).LocalSymbol);
FlowAnalysis\VariablesDeclaredWalker.cs (2)
172protected override void VisitLvalue(BoundLocal node) 177public override BoundNode VisitLocal(BoundLocal node)
Generated\BoundNodes.xml.Generated.cs (10)
4540public BoundLocal Update(LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type) 4544var result = new BoundLocal(this.Syntax, localSymbol, declarationKind, constantValueOpt, isNullableUnknown, type, this.HasErrors); 9067return VisitLocal((BoundLocal)node, arg); 9421public virtual R VisitLocal(BoundLocal node, A arg) => this.DefaultVisit(node, arg); 9657public virtual BoundNode? VisitLocal(BoundLocal node) => this.DefaultVisit(node); 10233public override BoundNode? VisitLocal(BoundLocal node) => null; 11471public override BoundNode? VisitLocal(BoundLocal node) 13544public override BoundNode? VisitLocal(BoundLocal node) 13547BoundLocal updatedNode; 15986public override TreeDumperNode VisitLocal(BoundLocal node, object? arg) => new TreeDumperNode("local", null, new TreeDumperNode[]
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (2)
322BoundLocal pendingValue = null; 681public override BoundNode VisitLocal(BoundLocal node)
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (2)
337var versionLocal = F.Local(versionSymbol); 389var instLocal = F.Local(instSymbol);
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
487public override BoundNode VisitLocal(BoundLocal node)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
843var parameterReference = _bound.Local(param); 894var parameterReference = _bound.Local(param);
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
181public override BoundNode VisitLocal(BoundLocal node) 493private void CheckOutDeclaration(BoundLocal local)
Lowering\DiagnosticsPass_Warnings.cs (6)
37var local = (BoundLocal)argument; 204var local1 = (BoundLocal)expr1; 205var local2 = (BoundLocal)expr2;
Lowering\Instrumentation\Instrumenter.cs (1)
222Debug.Assert(original.Left is BoundLocal { LocalSymbol.SynthesizedKind: SynthesizedLocalKind.UserDefined } or BoundParameter);
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (5)
358Debug.Assert(original.Left is BoundLocal { LocalSymbol.SynthesizedKind: SynthesizedLocalKind.UserDefined } or BoundParameter); 366if (original.Right is BoundLocal { LocalSymbol.SynthesizedKind: SynthesizedLocalKind.UserDefined } rightLocal) 411if (node is BoundLocal { LocalSymbol: var localSymbol }) 455var addressOf = value is BoundLocal or BoundParameter ? 564BoundLocal? temp = null;
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (2)
168var state = F.Local(stateLocal); 251private BoundStatement EmitFinallyFrame(IteratorFinallyFrame frame, BoundLocal state)
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
543if (binding.VariableAccess is BoundLocal l)
Lowering\LocalRewriter\LocalRewriter_Await.cs (1)
48var tempAccess = _factory.StoreToTemp(rewrittenAwait, out BoundAssignmentOperator tempAssignment, syntaxOpt: rewrittenAwait.Syntax,
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (13)
84var boundTemp = _factory.StoreToTemp(loweredLeft, out tempAssignment); 651BoundLocal? temp; 655var local = _factory.StoreToTemp(loweredLeft, out assignment); 1029BoundLocal boundTempX = _factory.StoreToTemp(xNonNull ?? loweredLeft, out BoundAssignmentOperator tempAssignmentX); 1030BoundLocal boundTempY = _factory.StoreToTemp(yNonNull ?? loweredRight, out BoundAssignmentOperator tempAssignmentY); 1201BoundLocal boundTempX = _factory.StoreToTemp(xNonNull ?? loweredLeft, out tempAssignmentX); 1203BoundLocal boundTempY = _factory.StoreToTemp(yNonNull ?? loweredRight, out tempAssignmentY); 1495var tempAccess = _factory.StoreToTemp(operand, out tempAssignment, kind: kind); 1719BoundLocal boundTemp = _factory.StoreToTemp(notAlwaysNull, out tempAssignment); 1776BoundLocal boundTempX = _factory.StoreToTemp(leftNonNull ?? left, out tempAssignmentX); 1778BoundLocal boundTempY = _factory.StoreToTemp(rightNonNull ?? right, out tempAssignmentY); 1830BoundLocal boundTempX = _factory.StoreToTemp(loweredLeft, out tempAssignmentX); 1832BoundLocal boundTempY = _factory.StoreToTemp(loweredRight, out tempAssignmentY);
Lowering\LocalRewriter\LocalRewriter_Call.cs (13)
296var receiverTemp = _factory.StoreToTemp(receiverOpt, out var assignmentToTemp); 670BoundLocal? receiverTemp = null; 830BoundLocal? receiverTemp, 858BoundLocal local; 871BoundSequence { Value: BoundLocal l } => l, 872BoundLocal l => l, // Can happen for discard arguments 931private void ReferToTempIfReferenceTypeReceiver(BoundLocal receiverTemp, ref BoundAssignmentOperator assignmentToTemp, out BoundAssignmentOperator? extraRefInitialization, ArrayBuilder<LocalSymbol> temps) 945BoundLocal cache = _factory.Local(_factory.SynthesizedLocal(receiverType)); 952var intermediateRef = _factory.Local(_factory.SynthesizedLocal(receiverType, refKind: RefKind.Ref)); 1385var temp = _factory.StoreToTemp( 1471temporariesBuilder.Add(((BoundLocal)s.Left).LocalSymbol); 1629var localRefKind = ((BoundLocal)argument).LocalSymbol.RefKind; 1640BoundLocal boundTemp = _factory.StoreToTemp(argument, out boundAssignmentToTemp);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (21)
336BoundLocal temp = _factory.StoreToTemp(rewrittenReceiver, out assignmentToTemp); 376BoundExpression? rewriteCollectionInitializer(BoundLocal rewrittenReceiver, BoundExpression expressionElement) 550var temp = _factory.StoreToTemp(element, out var assignment); 566BoundLocal inlineArrayLocal = _factory.StoreToTemp(new BoundDefaultExpression(syntax, inlineArrayType), out assignmentToTemp); 713var localsBuilder = ArrayBuilder<BoundLocal>.GetInstance(); 719BoundLocal indexTemp = _factory.StoreToTemp( 726BoundLocal arrayTemp = _factory.StoreToTemp( 938ArrayBuilder<BoundLocal> localsBuilder, 939BoundLocal indexTemp, 955Debug.Assert((object)spreadOperandAsSpan != rewrittenSpreadOperand || spreadOperandAsSpan is BoundLocal { LocalSymbol.SynthesizedKind: SynthesizedLocalKind.LoweringTemp }); 960localsBuilder.Add((BoundLocal)spreadOperandAsSpan); 983var localsBuilder = ArrayBuilder<BoundLocal>.GetInstance(); 1008BoundLocal? knownLengthTemp = null; 1042BoundLocal listTemp = _factory.StoreToTemp(rewrittenReceiver, out assignmentToTemp); 1058BoundLocal spanTemp = _factory.StoreToTemp(_factory.Call(receiver: null, asSpan, listTemp), out assignmentToTemp); 1066BoundLocal indexTemp = _factory.StoreToTemp( 1170ArrayBuilder<BoundLocal> locals, 1177BoundLocal temp = _factory.StoreToTemp(rewrittenExpression, out assignmentToTemp); 1186ArrayBuilder<BoundLocal> rewrittenExpressions, 1229private BoundExpression GetKnownLengthExpression(ImmutableArray<BoundNode> elements, int numberIncludingLastSpread, ArrayBuilder<BoundLocal> rewrittenExpressions) 1297var iterationLocal = _factory.Local(iterationVariable);
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (17)
65var isEvent = _factory.StoreToTemp(_dynamicFactory.MakeDynamicIsEventTest(memberAccess.Name, memberAccess.Receiver).ToExpression(), out BoundAssignmentOperator isEventAssignment); 71eventTemps.Add(((BoundLocal)lhsRead).LocalSymbol); 72var storeNonEvent = _factory.StoreToTemp(_factory.Conditional(_factory.Not(isEvent), receiverAssignment, _factory.Null(receiverAssignment.Type), receiverAssignment.Type), out BoundAssignmentOperator nonEventStore); 80eventTemps.Add(((BoundLocal)loweredRight).LocalSymbol); 205var receiverTemp = _factory.StoreToTemp(rewrittenReceiver, out assignmentToTemp, refKind: variableRepresentsLocation ? RefKind.Ref : RefKind.None); 237var receiverTemp = _factory.StoreToTemp(rewrittenReceiver, out assignmentToTemp); 357var boundTemp = _factory.StoreToTemp(array, out storeToTemp); 381temps.Add(((BoundLocal)tempAssignment.Left).LocalSymbol); 448var variableTemp = _factory.StoreToTemp(arrayAccess, out assignmentToTemp, refKind: RefKind.Ref); 495var receiverTemp = _factory.StoreToTemp(rewrittenReceiver, out assignmentToTemp); 508var temp = _factory.StoreToTemp(VisitExpression(indexerAccess.Receiver), out assignmentToTemp); 526var temp = _factory.StoreToTemp(VisitExpression(arguments[i]), out assignmentToTemp, indexerAccess.ArgumentRefKindsOpt.RefKinds(i) != RefKind.None ? RefKind.Ref : RefKind.None); 754var variableTemp = _factory.StoreToTemp(rewrittenVariable, out assignmentToTemp2, refKind: RefKind.Ref); 783var arrayTemp = _factory.StoreToTemp(loweredExpression, out assignmentToArrayTemp); 786var boundTempArray = arrayTemp; 794var temp = _factory.StoreToTemp(loweredIndices[i], out assignmentToTemp); 858return localsMayBeAssignedOrCaptured || ((BoundLocal)expression).LocalSymbol.RefKind != RefKind.None;
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (3)
963var savedTuple = _factory.StoreToTemp(rewrittenOperand, out assignmentToTemp); 1166var boundTemp = _factory.StoreToTemp(operand, out tempAssignment); 1434BoundLocal boundTemp = _factory.StoreToTemp(rewrittenOperand, out tempAssignment);
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (4)
168case BoundLocal { LocalSymbol: { RefKind: RefKind.None } localSymbol }: 349BoundLocal savedTuple = _factory.StoreToTemp(expression, out assignmentToTemp); 392var localBound = new BoundLocal(target.Syntax, localSymbol, constantValueOpt: null, type: outputPlaceholder.Type) 427var temp = _factory.StoreToTemp(loweredArg, out store);
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
90BoundLocal? boundTemp = null;
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
334BoundLocal? nullableBoundTemp = null;
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (24)
160BoundLocal boundEnumeratorVar = MakeBoundLocal(forEachSyntax, enumeratorVar, enumeratorType); 312BoundLocal boundEnumeratorVar, 427BoundLocal boundDisposableVar = MakeBoundLocal(forEachSyntax, disposableVar, idisposableTypeSymbol); 636BoundLocal boundArrayVar = MakeBoundLocal(forEachSyntax, collectionTemp, collectionType); 642BoundLocal boundPositionVar = MakeBoundLocal(forEachSyntax, positionVar, intType); 708private delegate BoundExpression GetForEachStatementAsForItem<TArg>(LocalRewriter rewriter, SyntaxNode syntax, ForEachEnumeratorInfo enumeratorInfo, BoundLocal boundArrayVar, BoundLocal boundPositionVar, TArg arg); 709private delegate BoundExpression GetForEachStatementAsForLength<TArg>(LocalRewriter rewriter, SyntaxNode syntax, BoundLocal boundArrayVar, TArg arg); 715getItem: static (LocalRewriter rewriter, SyntaxNode syntax, ForEachEnumeratorInfo enumeratorInfo, BoundLocal boundArrayVar, BoundLocal boundPositionVar, (MethodSymbol indexerGet, MethodSymbol lengthGet) arg) => 724getLength: static (LocalRewriter rewriter, SyntaxNode syntax, BoundLocal boundArrayVar, (MethodSymbol indexerGet, MethodSymbol lengthGet) arg) => 754BoundLocal boundLocal = rewriter._factory.StoreToTemp(rewrittenExpression, out BoundAssignmentOperator? valueStore); 767return static (LocalRewriter rewriter, SyntaxNode syntax, ForEachEnumeratorInfo enumeratorInfo, BoundLocal boundArrayVar, BoundLocal boundPositionVar, object? _) => 793return static (LocalRewriter rewriter, SyntaxNode syntax, BoundLocal boundArrayVar, object? _) => 925BoundLocal boundArrayVar = MakeBoundLocal(forEachSyntax, arrayVar, arrayType); 931BoundLocal boundPositionVar = MakeBoundLocal(forEachSyntax, positionVar, intType); 1074BoundLocal boundArrayVar = MakeBoundLocal(forEachSyntax, arrayVar, arrayType); 1088BoundLocal[] boundUpperVar = new BoundLocal[rank]; 1110BoundLocal[] boundPositionVar = new BoundLocal[rank]; 1232private static BoundLocal MakeBoundLocal(CSharpSyntaxNode syntax, LocalSymbol local, TypeSymbol type) 1252private BoundStatement MakePositionIncrement(CSharpSyntaxNode syntax, BoundLocal boundPositionVar, TypeSymbol intType)
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (18)
274localsBuilder.Insert(0, ((BoundLocal)possiblyRefCapturedReceiver).LocalSymbol); 297result = _factory.Sequence(ImmutableArray.Create(((BoundLocal)rewrittenReceiver).LocalSymbol), 501var receiverLocal = F.StoreToTemp( 542locals.Add(((BoundLocal)makeOffsetInput).LocalSymbol); 601var integerTemp = F.StoreToTemp(integerArgument, out BoundAssignmentOperator integerStore); 615var integerTemp = F.StoreToTemp(integerArgument, out BoundAssignmentOperator integerStore); 803var receiverLocal = F.StoreToTemp( 927localsBuilder.Add(((BoundLocal)startMakeOffsetInput).LocalSymbol); 938localsBuilder.Add(((BoundLocal)endMakeOffsetInput).LocalSymbol); 952var lengthLocal = F.StoreToTemp(lengthAccess, out var lengthStore); 965var startLocal = F.StoreToTemp(startExpr, out var startStore); 970var rangeSizeLocal = F.StoreToTemp(rangeSizeExpr, out var rangeSizeStore); 1013startExpr is not BoundLocal { LocalSymbol.SynthesizedKind: not SynthesizedLocalKind.UserDefined }) 1015var startLocal = F.StoreToTemp(startExpr, out var startStore); 1031var rangeLocal = F.StoreToTemp(rewrittenRangeArg, out var rangeStore); 1037var lengthLocal = F.StoreToTemp(lengthAccess, out var lengthStore); 1043var startLocal = F.StoreToTemp( 1054var rangeSizeLocal = F.StoreToTemp(
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (3)
62BoundLocal boundTemp = _factory.StoreToTemp(enterScopeCall, 100BoundLocal boundLockTemp = _factory.StoreToTemp(rewrittenArgument, out assignmentToLockTemp, syntaxOpt: lockSyntax, kind: SynthesizedLocalKind.Lock); 144BoundLocal boundLockTakenTemp = _factory.StoreToTemp(
Lowering\LocalRewriter\LocalRewriter_NullCoalescingAssignmentOperator.cs (2)
96var lhsTemp = _factory.StoreToTemp(lhsRead, out var store); 103var tmp = _factory.StoreToTemp(BoundCall.Synthesized(leftOperand.Syntax, lhsRead, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, getValueOrDefault),
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (2)
146if (unwrappedRight is { ConstantValueOpt: not null } or BoundLocal { LocalSymbol.IsRef: false } or BoundParameter { ParameterSymbol.RefKind: RefKind.None } && 160BoundLocal boundTemp = _factory.StoreToTemp(rewrittenLeft, out tempAssignment);
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (3)
167BoundLocal oldValue = _factory.StoreToTemp(rewrittenReceiver, out BoundAssignmentOperator boundAssignmentToTemp); 213BoundLocal valueTemp = _factory.StoreToTemp(rewrittenRight, out BoundAssignmentOperator boundAssignmentToTemp); 266BoundLocal value = _factory.StoreToTemp(rewrittenExpression, out boundAssignmentToTemp, isKnownToReferToTempIfReferenceType: true);
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (3)
423var rangeTemp = _factory.StoreToTemp(rangeArgument, out BoundAssignmentOperator rangeStore); 455var temp = _factory.StoreToTemp(rewrittenIndex, out store); 642var temp = _factory.StoreToTemp(arg, out store, refKind);
Lowering\LocalRewriter\LocalRewriter_StackAlloc.cs (1)
81var tempAccess = _factory.StoreToTemp(constructorCall, out BoundAssignmentOperator tempAssignment, syntaxOpt: stackAllocNode.Syntax);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (3)
244Value: BoundObjectCreationExpression { Constructor: var objectCreationConstructor, Arguments: [BoundLocal constructorLocal] } 541var temp = factory.StoreToTemp(arg, out var tempAssignment); 727var temp = _factory.StoreToTemp(expr, out var store);
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (5)
35BoundLocal builderTemp = _factory.Local(builderTempSymbol); 40BoundLocal? appendShouldProceedLocal = null; 262public readonly BoundLocal HandlerTemp; 264public InterpolationHandlerResult(ImmutableArray<BoundStatement> statements, BoundLocal handlerTemp, LocalSymbol outTemp, LocalRewriter rewriter) 273public InterpolationHandlerResult(ImmutableArray<BoundExpression> expressions, BoundLocal handlerTemp, LocalSymbol? outTemp, LocalRewriter rewriter)
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (2)
416private BoundLocal MakeTemp(BoundExpression loweredExpression, ArrayBuilder<LocalSymbol> temps, ArrayBuilder<BoundExpression> effects) 418BoundLocal temp = _factory.StoreToTemp(loweredExpression, out BoundAssignmentOperator assignmentToTemp);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (3)
203BoundLocal boundTemp = _factory.StoreToTemp(loweredOperand, out tempAssignment); 489return ((BoundLocal)expression).LocalSymbol.RefKind != RefKind.None; 669BoundLocal boundTemp = _factory.StoreToTemp(rewrittenArgument, out tempAssignment);
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (4)
155BoundLocal boundTemp; 221BoundLocal boundLocal = new BoundLocal(declarationSyntax, localSymbol, localDeclaration.InitializerOpt.ConstantValueOpt, localType); 252BoundLocal boundTemp = _factory.StoreToTemp(tempInit, out tempAssignment, kind: SynthesizedLocalKind.Using); 283BoundLocal local,
Lowering\MethodToClassRewriter.cs (5)
404public sealed override BoundNode VisitLocal(BoundLocal node) 445private BoundNode VisitUnhoistedLocal(BoundLocal node) 489var leftLocal = (BoundLocal)originalLeft; 529BoundLocal tempLocal = factory.StoreToTemp(rewrittenRight, out tempAssignment);
Lowering\SpillSequenceSpiller.cs (14)
210public override BoundNode VisitLocal(BoundLocal node) 359out BoundLocal valueTypeReceiver, 360out BoundLocal referenceTypeReceiver)) 396var local = (BoundLocal)expression; 506var replacement = _F.StoreToTemp( 532out BoundLocal outValueTypeReceiver, 533out BoundLocal outReferenceTypeReceiver) 538Left: BoundLocal { LocalSymbol: { SynthesizedKind: SynthesizedLocalKind.LoweringTemp, RefKind: RefKind.Ref } receiverRefLocal }, 541ValueTypeReceiver: BoundLocal { LocalSymbol: { SynthesizedKind: SynthesizedLocalKind.LoweringTemp, RefKind: RefKind.Ref } } valueTypeReceiver, 550Left: BoundLocal { LocalSymbol: { SynthesizedKind: SynthesizedLocalKind.LoweringTemp, RefKind: RefKind.None } referenceTypeClone }, 551Right: BoundLocal { LocalSymbol: { SynthesizedKind: SynthesizedLocalKind.LoweringTemp, RefKind: RefKind.Ref } originalReceiverReference } 554Value: BoundLocal { LocalSymbol: { SynthesizedKind: SynthesizedLocalKind.LoweringTemp, RefKind: RefKind.None } } referenceTypeReceiver 1056var cache = _F.Local(_F.SynthesizedLocal(receiverType));
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (3)
236case BoundLocal { LocalSymbol: var symbol }: 341if (node is { IsRef: true, Left: BoundLocal { LocalSymbol: LocalSymbol { IsCompilerGenerated: true } local } }) 410public override BoundNode VisitLocal(BoundLocal node)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
816var leftLocal = ((BoundLocal)node.Left).LocalSymbol;
Lowering\SyntheticBoundNodeFactory.cs (8)
438return (InstrumentationState?.IsSuppressed == false && left is BoundLocal { LocalSymbol.SynthesizedKind: SynthesizedLocalKind.UserDefined } or BoundParameter) ? 980public BoundLocal Local(LocalSymbol local) 1594var source = Local(local); 1630public BoundLocal StoreToTemp( 1678var local = new BoundLocal( 1710internal BoundLocal MakeTempForDiscard(BoundDiscardExpression node, ArrayBuilder<LocalSymbol> temps) 1713BoundLocal result = MakeTempForDiscard(node, out temp); 1718internal BoundLocal MakeTempForDiscard(BoundDiscardExpression node, out LocalSymbol temp)
Operations\CSharpOperationFactory.cs (3)
44return CreateBoundLocalOperation((BoundLocal)boundNode); 552internal IOperation CreateBoundLocalOperation(BoundLocal boundLocal, bool createDeclaration = true) 2007IOperation? exceptionDeclarationOrExpression = CreateVariableDeclarator((BoundLocal?)boundCatchBlock.ExceptionSourceOpt);
Operations\CSharpOperationFactory_Methods.cs (1)
93internal IVariableDeclaratorOperation? CreateVariableDeclarator(BoundLocal? boundLocal)
Symbols\Synthesized\Records\SynthesizedRecordToString.cs (3)
60BoundLocal builderLocal = F.Local(builderLocalSymbol); 88static BoundStatement makeAppendString(SyntheticBoundNodeFactory F, BoundLocal builder, string value) 93static BoundStatement makeAppendChar(SyntheticBoundNodeFactory F, BoundLocal builder, char value)
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (2)
482var scriptLocal = new BoundLocal( 574var submissionLocal = new BoundLocal(