Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (13)
145bodyBuilder.Add(F.Assignment(F.Local(cachedState), F.Field(F.This(), stateField)));
165var stateDone = F.Assignment(F.Field(F.This(), stateField), F.Literal(StateMachineState.FinishedState));
219F.Field(F.This(), _asyncMethodBuilderField),
241F.ExpressionStatement(F.AssignmentExpression(F.Field(F.This(), stateField), F.Literal(StateMachineState.FinishedState)));
277builder.Add(F.Assignment(F.Field(F.This(), hoistedLocal), F.NullOrDefault(hoistedLocal.Type)));
290F.Field(F.This(), _asyncMethodBuilderField),
471F.Field(F.This(), awaiterField),
505? F.Field(F.This(), awaiterField)
506: F.Convert(awaiterTemp.Type, F.Field(F.This(), awaiterField))));
509F.Assignment(F.Field(F.This(), awaiterField), F.NullOrDefault(awaiterField.Type)));
570F.Field(F.This(), _asyncMethodBuilderField),
582F.Field(F.This(), _asyncMethodBuilderField),
622F.Field(F.This(), _asyncMethodBuilderField),
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (5)
233BoundFieldAccess combinedTokens = F.Field(F.This(), _combinedTokensField);
338var versionInit = F.Assignment(versionLocal, F.Call(F.Field(F.This(), _promiseOfValueOrEndField), promise_get_Version));
343F.Call(F.Field(F.This(), _promiseOfValueOrEndField), promise_GetStatus, versionLocal),
346thenClause: F.Return(F.New(valueTaskT_ctorValue, F.Call(F.Field(F.This(), _promiseOfValueOrEndField), promise_GetResult, versionLocal))));
670F.Assignment(F.Field(F.This(), stateField), F.Literal(initialState)));
Lowering\AsyncRewriter\AsyncRewriter.cs (6)
183F.Field(F.This(), _builderField),
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)),
271F.Field(F.Local(stateMachineVariable), _builderField.AsMember(frameType)),
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (8)
116F.Assignment(F.Local(cachedState), F.Field(F.This(), stateField)),
121F.Assignment(F.Field(F.This(), stateField), F.Literal(StateMachineState.NotStartedOrRunningState)),
172F.Assignment(F.Local(stateLocal), F.Field(F.This(), stateField)),
335F.Assignment(F.Field(F.This(), _current), rewrittenExpression),
336F.Assignment(F.Field(F.This(), stateField), F.Literal(stateNumber)),
340F.Assignment(F.Field(F.This(), stateField), F.Literal(_currentFinallyFrame.finalizeState)));
405F.Assignment(F.Field(F.This(), stateField), F.Literal(frame.parent.finalizeState)),
423bodyStatements.Add(F.Assignment(F.Field(F.This(), stateField), F.Literal(frame.finalizeState)));