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\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_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_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\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));