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