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)
228var catchAll = _F.Catch(_F.Local(pendingExceptionLocal), _F.Block());
262statements.Add(_F.Assignment(_F.Local(pendingExceptionLocal), _F.Default(pendingExceptionLocal.Type)));
264statements.Add(_F.Assignment(_F.Local(pendingBranchVar), _F.Default(pendingBranchVar.Type)));
327bodyStatements.Add(_F.Assignment(_F.Local(pendingBranchVar), _F.Literal(i)));
362pendingValue = _F.Local(frame.returnValue);
384_F.Local(returnValue),
395return _F.Switch(_F.Local(pendingBranchVar), cases.ToImmutableAndFree());
430_F.Local(returnValue),
455var objInit = _F.Assignment(_F.Local(obj), _F.Local(pendingExceptionLocal));
469_F.Local(obj),
479BoundStatement rethrow = _F.Throw(_F.Local(obj));
490_F.Local(ex),
491_F.As(_F.Local(obj), ex.Type));
497_F.If(_F.ObjectEqual(_F.Local(ex), _F.Null(ex.Type)), rethrow),
504_F.Local(ex)),
558_F.Local(currentAwaitCatchFrame.pendingCatch),
563_F.Local(currentAwaitCatchFrame.pendingCatch),
618_F.Local(currentAwaitCatchFrame.pendingCaughtException),
620_F.Local(catchTemp)));
623_F.Local(currentAwaitCatchFrame.pendingCatch),
643_F.Local(catchTemp),
689_F.Local(catchTemp),
735_F.Local(currentAwaitCatchFrame.pendingCaughtException)));
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (24)
152bodyBuilder.Add(F.Assignment(F.Local(cachedState), F.Field(F.This(), stateField)));
241F.Local(exceptionLocal),
265? ImmutableArray.Create<BoundExpression>(F.Local(_exprRetValue))
300F.Local(exceptionLocal)));
383F.Local(awaiterTemp),
394F.Local(awaiterTemp),
455F.Local(awaiterTemp),
464return F.Call(F.Local(awaiterTemp), getIsCompletedMethod);
493? F.Local(awaiterTemp)
494: F.Convert(awaiterFieldType, F.Local(awaiterTemp))));
523F.Local(awaiterTemp),
569F.Local(criticalNotifyCompletedTemp),
571F.As(F.Local(awaiterTemp), criticalNotifyCompletedTemp.Type)));
575blockBuilder.Add(F.Assignment(F.Local(thisTemp), F.This()));
580condition: F.ObjectEqual(F.Local(criticalNotifyCompletedTemp), F.Null(criticalNotifyCompletedTemp.Type)),
585F.Local(notifyCompletionTemp),
587F.Convert(notifyCompletionTemp.Type, F.Local(awaiterTemp), Conversion.ExplicitReference)),
594F.Local(notifyCompletionTemp), F.This(thisTemp))),
596F.Local(notifyCompletionTemp),
606F.Local(criticalNotifyCompletedTemp), F.This(thisTemp))))));
610F.Local(criticalNotifyCompletedTemp),
644F.Local(awaiterTemp), F.This(thisTemp));
650ImmutableArray.Create<BoundExpression>(F.AssignmentExpression(F.Local(thisTemp), F.This())),
668F.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)
319prologueBuilder.Add(_factory.ExpressionStatement(_factory.Call(receiver: _factory.Local(_scope.ContextVariable), parameterLogger,
349_factory.Assignment(_factory.Local(_scope.ContextVariable), _factory.Call(receiver: null, entryLogger, entryArgs)) : _factory.NoOp(NoOpStatementFlavor.Default);
353_factory.ExpressionStatement(_factory.Call(receiver: _factory.Local(_scope.ContextVariable), returnLogger)) : _factory.NoOp(NoOpStatementFlavor.Default);
407receiver: _factory.Local(_scope.ContextVariable),
493LocalSymbol local => _factory.Local(local),
538receiver: _factory.Local(_scope.ContextVariable),
615receiver: _factory.Local(_scope.ContextVariable),
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (6)
122F.Assignment(F.Local(cachedState), F.Field(F.This(), stateField)),
179var state = F.Local(stateLocal);
183F.Assignment(F.Local(stateLocal), F.Field(F.This(), stateField)),
212F.Assignment(this.F.Local(_methodValue), this.F.Literal(true)),
214F.Return(this.F.Local(_methodValue)));
320F.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));
366factory.Local(pinnedTemp),
373factory.Local(pinnedTemp),
423BoundStatement localInit = InstrumentLocalDeclarationIfNecessary(localDecl, localSymbol, factory.Assignment(factory.Local(localSymbol), pinAndGetPtr));
462BoundStatement stringTempInit = factory.Assignment(factory.Local(pinnedTemp), initializerExpr);
467factory.Local(pinnedTemp),
473factory.Assignment(factory.Local(localSymbol), convertedStringTemp));
475BoundExpression notNullCheck = _factory.MakeNullCheck(factory.Syntax, factory.Local(localSymbol), BinaryOperatorKind.NotEqual);
488BoundExpression addition = factory.Binary(BinaryOperatorKind.PointerAndIntAddition, localType, factory.Local(localSymbol), helperCall);
489BoundStatement conditionalAdd = factory.If(notNullCheck, factory.Assignment(factory.Local(localSymbol), addition));
526BoundExpression arrayTempInit = factory.AssignmentExpression(factory.Local(pinnedTemp), initializerExpr);
535lengthCall = factory.ArrayLength(factory.Local(pinnedTemp));
542lengthCall = factory.Call(factory.Local(pinnedTemp), lengthMethod);
546lengthCall = new BoundBadExpression(fixedInitializer.Syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(factory.Local(pinnedTemp)), ErrorTypeSymbol.UnknownResultType);
558BoundExpression firstElement = factory.ArrayAccessFirstElement(factory.Local(pinnedTemp));
566BoundExpression consequenceAssignment = factory.AssignmentExpression(factory.Local(localSymbol), convertedFirstElementAddress);
569BoundExpression alternativeAssignment = factory.AssignmentExpression(factory.Local(localSymbol), factory.Null(localType));
Lowering\SpillSequenceSpiller.cs (21)
1009leftBuilder.AddStatement(_F.Assignment(_F.Local(tmp), left));
1011node.OperatorKind == BinaryOperatorKind.LogicalBoolAnd ? _F.Local(tmp) : _F.Not(_F.Local(tmp)),
1012UpdateStatement(builder, _F.Assignment(_F.Local(tmp), right))));
1014return UpdateExpression(leftBuilder, _F.Local(tmp));
1067var cache = _F.Local(_F.SynthesizedLocal(receiverType));
1151UpdateStatement(consequenceBuilder, _F.Assignment(_F.Local(tmp), consequence)),
1152UpdateStatement(alternativeBuilder, _F.Assignment(_F.Local(tmp), alternative))));
1154return conditionBuilder.Update(_F.Local(tmp));
1164conditionBuilder.AddStatement(_F.Assignment(_F.Local(tmp), condition));
1165condition = _F.Local(tmp);
1263leftBuilder.AddStatement(_F.Assignment(_F.Local(tmp), left));
1265_F.ObjectEqual(_F.Local(tmp), _F.Null(left.Type)),
1266UpdateStatement(builder, _F.Assignment(_F.Local(tmp), right))));
1268return UpdateExpression(leftBuilder, _F.Local(tmp));
1327_F.AssignmentExpression(_F.Local(clone), receiver),
1328_F.IsNotNullReference(_F.Local(clone)))
1331receiver = _F.ComplexConditionalReceiver(receiver, _F.Local(clone));
1348var whenNotNullStatement = UpdateStatement(whenNotNullBuilder, _F.Assignment(_F.Local(tmp), whenNotNull));
1357UpdateStatement(whenNullBuilder, _F.Assignment(_F.Local(tmp), whenNullOpt))));
1359return receiverBuilder.Update(_F.Local(tmp));
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)));