1 write to cachedState
Microsoft.CodeAnalysis.CSharp (1)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
125
this.
cachedState
= F.SynthesizedLocal(F.SpecialType(SpecialType.System_Int32), syntax: F.Syntax, kind: SynthesizedLocalKind.StateMachineCachedState);
11 references to cachedState
Microsoft.CodeAnalysis.CSharp (11)
Lowering\AsyncRewriter\AsyncIteratorMethodToStateMachineRewriter.cs (2)
83
var iteratorDispatch = _iteratorStateAllocator.GenerateThrowMissingStateDispatch(F, F.Local(
cachedState
), HotReloadExceptionCode.CannotResumeSuspendedIteratorMethod);
220
return F.IntEqual(F.Local(
cachedState
), F.Literal(StateMachineState.NotStartedOrRunningState));
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (2)
145
bodyBuilder.Add(F.Assignment(F.Local(
cachedState
), F.Field(F.This(), stateField)));
190
locals.Add(
cachedState
);
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (3)
112
ImmutableArray.Create(
cachedState
) :
113
ImmutableArray.Create(
cachedState
, cachedThis),
116
F.Assignment(F.Local(
cachedState
), F.Field(F.This(), stateField)),
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (4)
247
var result = F.Switch(F.Local(
cachedState
), sections.ToImmutableArray());
268
=> _resumableStateAllocator.GenerateThrowMissingStateDispatch(F, F.Local(
cachedState
), EncMissingStateErrorCode);
911
return F.IntLessThan(F.Local(
cachedState
), F.Literal(StateMachineState.FirstUnusedState));
920
return F.Assignment(F.Field(F.This(), stateField), F.AssignmentExpression(F.Local(
cachedState
), F.Literal(stateNumber)));