1 write to cachedState
Microsoft.CodeAnalysis.CSharp (1)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
127this.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)
84var iteratorDispatch = _iteratorStateAllocator.GenerateThrowMissingStateDispatch(F, F.Local(cachedState), HotReloadExceptionCode.CannotResumeSuspendedIteratorMethod); 231return F.IntEqual(F.Local(cachedState), F.Literal(StateMachineState.NotStartedOrRunningState));
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (2)
147bodyBuilder.Add(F.Assignment(F.Local(cachedState), F.Field(F.This(), stateField))); 192locals.Add(cachedState);
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (3)
113ImmutableArray.Create(cachedState) : 114ImmutableArray.Create(cachedState, cachedThis), 117F.Assignment(F.Local(cachedState), F.Field(F.This(), stateField)),
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (4)
252var result = F.Switch(F.Local(cachedState), sections.ToImmutableArray()); 273=> _resumableStateAllocator.GenerateThrowMissingStateDispatch(F, F.Local(cachedState), EncMissingStateErrorCode); 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)));