Compiler\MethodBodySynthesizer.Lowered.cs (18)
89F.Assignment(F.Local(hashCode), F.Literal((uint)2166136261)),
90F.Assignment(F.Local(i), F.Literal(0)),
94F.Local(hashCode),
101F.Local(i)),
103F.Local(hashCode)),
106F.Local(i),
108F.Local(i),
113F.Local(i),
116F.Return(F.Local(hashCode))
176F.Assignment(F.Local(hashCode), F.Literal((uint)2166136261)),
177F.Assignment(F.Local(i), F.Literal(0)),
181F.Local(hashCode),
190F.Local(i)),
192F.Local(hashCode)),
195F.Local(i),
197F.Local(i),
202F.Local(i),
209F.Return(F.Local(hashCode))
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (24)
191var catchAll = _F.Catch(_F.Local(pendingExceptionLocal), _F.Block());
225statements.Add(_F.Assignment(_F.Local(pendingExceptionLocal), _F.Default(pendingExceptionLocal.Type)));
227statements.Add(_F.Assignment(_F.Local(pendingBranchVar), _F.Default(pendingBranchVar.Type)));
290bodyStatements.Add(_F.Assignment(_F.Local(pendingBranchVar), _F.Literal(i)));
325pendingValue = _F.Local(frame.returnValue);
347_F.Local(returnValue),
357return _F.Switch(_F.Local(pendingBranchVar), cases.ToImmutableAndFree());
392_F.Local(returnValue),
408var objInit = _F.Assignment(_F.Local(obj), _F.Local(pendingExceptionLocal));
418_F.Local(obj),
426BoundStatement rethrow = _F.Throw(_F.Local(obj));
437_F.Local(ex),
438_F.As(_F.Local(obj), ex.Type));
444_F.If(_F.ObjectEqual(_F.Local(ex), _F.Null(ex.Type)), rethrow),
451_F.Local(ex)),
505_F.Local(currentAwaitCatchFrame.pendingCatch),
510_F.Local(currentAwaitCatchFrame.pendingCatch),
558_F.Local(currentAwaitCatchFrame.pendingCaughtException),
560_F.Local(catchTemp)));
563_F.Local(currentAwaitCatchFrame.pendingCatch),
583_F.Local(catchTemp),
629_F.Local(catchTemp),
675_F.Local(currentAwaitCatchFrame.pendingCaughtException)));
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (24)
147bodyBuilder.Add(F.Assignment(F.Local(cachedState), F.Field(F.This(), stateField)));
236F.Local(exceptionLocal),
260? ImmutableArray.Create<BoundExpression>(F.Local(_exprRetValue))
295F.Local(exceptionLocal)));
377F.Local(awaiterTemp),
388F.Local(awaiterTemp),
449F.Local(awaiterTemp),
458return F.Call(F.Local(awaiterTemp), getIsCompletedMethod);
487? F.Local(awaiterTemp)
488: F.Convert(awaiterFieldType, F.Local(awaiterTemp))));
517F.Local(awaiterTemp),
563F.Local(criticalNotifyCompletedTemp),
565F.As(F.Local(awaiterTemp), criticalNotifyCompletedTemp.Type)));
569blockBuilder.Add(F.Assignment(F.Local(thisTemp), F.This()));
574condition: F.ObjectEqual(F.Local(criticalNotifyCompletedTemp), F.Null(criticalNotifyCompletedTemp.Type)),
579F.Local(notifyCompletionTemp),
581F.Convert(notifyCompletionTemp.Type, F.Local(awaiterTemp), Conversion.ExplicitReference)),
588F.Local(notifyCompletionTemp), F.This(thisTemp))),
590F.Local(notifyCompletionTemp),
600F.Local(criticalNotifyCompletedTemp), F.This(thisTemp))))));
604F.Local(criticalNotifyCompletedTemp),
638F.Local(awaiterTemp), F.This(thisTemp));
644ImmutableArray.Create<BoundExpression>(F.AssignmentExpression(F.Local(thisTemp), F.This())),
662F.Assignment(F.Local(_exprRetValue), (BoundExpression)Visit(node.ExpressionOpt)),
Lowering\AsyncRewriter\AsyncRewriter.cs (7)
209F.Local(stateMachineLocal),
231F.Field(F.Local(stateMachineVariable), _builderField.AsMember(frameType)),
241F.Field(F.Local(stateMachineVariable), stateField.AsMember(frameType)),
250F.Field(F.Local(stateMachineVariable), instanceIdField.AsMember(frameType)),
263F.Field(F.Local(stateMachineVariable), _builderField.AsMember(frameType)),
265ImmutableArray.Create<BoundExpression>(F.Local(stateMachineVariable)))));
271F.Field(F.Local(stateMachineVariable), _builderField.AsMember(frameType)),
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (7)
315prologueBuilder.Add(_factory.ExpressionStatement(_factory.Call(receiver: _factory.Local(_scope.ContextVariable), parameterLogger,
345_factory.Assignment(_factory.Local(_scope.ContextVariable), _factory.Call(receiver: null, entryLogger, entryArgs)) : _factory.NoOp(NoOpStatementFlavor.Default);
349_factory.ExpressionStatement(_factory.Call(receiver: _factory.Local(_scope.ContextVariable), returnLogger)) : _factory.NoOp(NoOpStatementFlavor.Default);
403receiver: _factory.Local(_scope.ContextVariable),
488LocalSymbol local => _factory.Local(local),
533receiver: _factory.Local(_scope.ContextVariable),
596receiver: _factory.Local(_scope.ContextVariable),
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (6)
117F.Assignment(F.Local(cachedState), F.Field(F.This(), stateField)),
174var state = F.Local(stateLocal);
178F.Assignment(F.Local(stateLocal), F.Field(F.This(), stateField)),
207F.Assignment(this.F.Local(_methodValue), this.F.Literal(true)),
209F.Return(this.F.Local(_methodValue)));
315F.Assignment(this.F.Local(_methodValue), result),
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (21)
39cleanup[i] = _factory.Assignment(_factory.Local(pinnedTemp), _factory.Null(pinnedTemp.Type));
44cleanup[i] = _factory.Assignment(_factory.Local(pinnedTemp), _factory.NullRef(pinnedTemp.TypeWithAnnotations), isRef: true);
272BoundStatement pinnedTempInit = factory.Assignment(factory.Local(pinnedTemp), initializerExpr, isRef: true);
277factory.Local(pinnedTemp),
285factory.Assignment(factory.Local(localSymbol), pointerValue));
364factory.Local(pinnedTemp),
371factory.Local(pinnedTemp),
421BoundStatement localInit = InstrumentLocalDeclarationIfNecessary(localDecl, localSymbol, factory.Assignment(factory.Local(localSymbol), pinAndGetPtr));
460BoundStatement stringTempInit = factory.Assignment(factory.Local(pinnedTemp), initializerExpr);
465factory.Local(pinnedTemp),
471factory.Assignment(factory.Local(localSymbol), convertedStringTemp));
473BoundExpression notNullCheck = _factory.MakeNullCheck(factory.Syntax, factory.Local(localSymbol), BinaryOperatorKind.NotEqual);
486BoundExpression addition = factory.Binary(BinaryOperatorKind.PointerAndIntAddition, localType, factory.Local(localSymbol), helperCall);
487BoundStatement conditionalAdd = factory.If(notNullCheck, factory.Assignment(factory.Local(localSymbol), addition));
524BoundExpression arrayTempInit = factory.AssignmentExpression(factory.Local(pinnedTemp), initializerExpr);
533lengthCall = factory.ArrayLength(factory.Local(pinnedTemp));
540lengthCall = factory.Call(factory.Local(pinnedTemp), lengthMethod);
544lengthCall = new BoundBadExpression(fixedInitializer.Syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(factory.Local(pinnedTemp)), ErrorTypeSymbol.UnknownResultType);
556BoundExpression firstElement = factory.ArrayAccessFirstElement(factory.Local(pinnedTemp));
564BoundExpression consequenceAssignment = factory.AssignmentExpression(factory.Local(localSymbol), convertedFirstElementAddress);
567BoundExpression alternativeAssignment = factory.AssignmentExpression(factory.Local(localSymbol), factory.Null(localType));
Lowering\SpillSequenceSpiller.cs (21)
998leftBuilder.AddStatement(_F.Assignment(_F.Local(tmp), left));
1000node.OperatorKind == BinaryOperatorKind.LogicalBoolAnd ? _F.Local(tmp) : _F.Not(_F.Local(tmp)),
1001UpdateStatement(builder, _F.Assignment(_F.Local(tmp), right))));
1003return UpdateExpression(leftBuilder, _F.Local(tmp));
1056var cache = _F.Local(_F.SynthesizedLocal(receiverType));
1140UpdateStatement(consequenceBuilder, _F.Assignment(_F.Local(tmp), consequence)),
1141UpdateStatement(alternativeBuilder, _F.Assignment(_F.Local(tmp), alternative))));
1143return conditionBuilder.Update(_F.Local(tmp));
1153conditionBuilder.AddStatement(_F.Assignment(_F.Local(tmp), condition));
1154condition = _F.Local(tmp);
1252leftBuilder.AddStatement(_F.Assignment(_F.Local(tmp), left));
1254_F.ObjectEqual(_F.Local(tmp), _F.Null(left.Type)),
1255UpdateStatement(builder, _F.Assignment(_F.Local(tmp), right))));
1257return UpdateExpression(leftBuilder, _F.Local(tmp));
1316_F.AssignmentExpression(_F.Local(clone), receiver),
1317_F.IsNotNullReference(_F.Local(clone)))
1320receiver = _F.ComplexConditionalReceiver(receiver, _F.Local(clone));
1337var whenNotNullStatement = UpdateStatement(whenNotNullBuilder, _F.Assignment(_F.Local(tmp), whenNotNull));
1346UpdateStatement(whenNullBuilder, _F.Assignment(_F.Local(tmp), whenNullOpt))));
1348return receiverBuilder.Update(_F.Local(tmp));
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (8)
252var result = F.Switch(F.Local(cachedState), sections.ToImmutableArray());
273=> _resumableStateAllocator.GenerateThrowMissingStateDispatch(F, F.Local(cachedState), EncMissingStateErrorCode);
560return F.Sequence(ImmutableArray.Create(sacrificialTemp), sideEffects.ToImmutableAndFree(), F.AssignmentExpression(F.Local(sacrificialTemp), replacement, isRef: true));
929return F.IntLessThan(F.Local(cachedState), F.Literal(StateMachineState.FirstUnusedState));
938return F.Assignment(F.Field(F.This(), stateField), F.AssignmentExpression(F.Local(cachedState), F.Literal(stateNumber)));
948return F.Assignment(F.Local(this.cachedThis), fetchThis);
960return F.Local(this.cachedThis);
994return F.Local(this.cachedThis);
Lowering\StateMachineRewriter\StateMachineRewriter.cs (7)
320static (frameType1, arg) => arg.F.Local(arg.stateMachineVariable),
334static (frameType1, arg) => arg.F.Local(arg.stateMachineVariable),
429BoundStatement makeIterator = F.Assignment(F.Local(resultVariable), F.New(stateMachineType.Constructor, F.Literal(initialState)));
442F.Assignment(F.Local(resultVariable), F.This()));
474static (stateMachineType, arg) => arg.F.Local(arg.resultVariable),
493static (stateMachineType, arg) => arg.F.Local(arg.resultVariable),
504bodyBuilder.Add(F.Return(F.Local(resultVariable)));