Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (13)
147bodyBuilder.Add(F.Assignment(F.Local(cachedState), F.Field(F.This(), stateField)));
167var stateDone = F.Assignment(F.Field(F.This(), stateField), F.Literal(StateMachineState.FinishedState));
228F.ExpressionStatement(F.AssignmentExpression(F.Field(F.This(), stateField), F.Literal(StateMachineState.FinishedState)));
257F.Field(F.This(), _asyncMethodBuilderField),
280builder.Add(F.Assignment(F.Field(F.This(), hoistedLocal), F.NullOrDefault(hoistedLocal.Type)));
293F.Field(F.This(), _asyncMethodBuilderField),
485F.Field(F.This(), awaiterField),
519? F.Field(F.This(), awaiterField)
520: F.Convert(awaiterTemp.Type, F.Field(F.This(), awaiterField))));
523F.Assignment(F.Field(F.This(), awaiterField), F.NullOrDefault(awaiterField.Type)));
584F.Field(F.This(), _asyncMethodBuilderField),
596F.Field(F.This(), _asyncMethodBuilderField),
636F.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)
117F.Assignment(F.Local(cachedState), F.Field(F.This(), stateField)),
122F.Assignment(F.Field(F.This(), stateField), F.Literal(StateMachineState.NotStartedOrRunningState)),
177F.Assignment(F.Local(stateLocal), F.Field(F.This(), stateField)),
341F.Assignment(F.Field(F.This(), _current), rewrittenExpression),
342F.Assignment(F.Field(F.This(), stateField), F.Literal(stateNumber)),
346F.Assignment(F.Field(F.This(), stateField), F.Literal(_currentFinallyFrame.finalizeState)));
411F.Assignment(F.Field(F.This(), stateField), F.Literal(frame.parent.finalizeState)),
429bodyStatements.Add(F.Assignment(F.Field(F.This(), stateField), F.Literal(frame.finalizeState)));