4 instantiations of StateMachineFieldSymbol
Microsoft.CodeAnalysis.CSharp (4)
Lowering\SyntheticBoundNodeFactory.cs (4)
220var result = new StateMachineFieldSymbol(CurrentType, type, name, isPublic, isThis); 228var result = new StateMachineFieldSymbol(CurrentType, TypeWithAnnotations.Create(type), name, isPublic, isThis); 236var result = new StateMachineFieldSymbol(CurrentType, type, name, synthesizedKind, slotIndex, isPublic: false); 244var result = new StateMachineFieldSymbol(CurrentType, type, name, slotDebugInfo, slotIndex, isPublic: false);
46 references to StateMachineFieldSymbol
Microsoft.CodeAnalysis.CSharp (46)
CodeGen\EmitStatement.cs (3)
792foreach (var field in scope.Fields) 1136var stateMachineField = left.FieldSymbol as StateMachineFieldSymbol;
Compiler\MethodCompiler.cs (1)
1696foreach (StateMachineFieldSymbol field in
Generated\BoundNodes.xml.Generated.cs (4)
3258public BoundStateMachineScope(SyntaxNode syntax, ImmutableArray<StateMachineFieldSymbol> fields, BoundStatement statement, bool hasErrors = false) 3269public ImmutableArray<StateMachineFieldSymbol> Fields { get; } 3275public BoundStateMachineScope Update(ImmutableArray<StateMachineFieldSymbol> fields, BoundStatement statement) 12902ImmutableArray<StateMachineFieldSymbol> fields = GetUpdatedArray(node, node.Fields);
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (4)
139ImmutableArray<StateMachineFieldSymbol> rootScopeHoistedLocals; 232protected BoundCatchBlock GenerateExceptionHandling(LocalSymbol exceptionLocal, ImmutableArray<StateMachineFieldSymbol> hoistedLocals) 267protected BoundStatement GenerateHoistedLocalsCleanup(ImmutableArray<StateMachineFieldSymbol> hoistedLocals) 273foreach (var hoistedLocal in hoistedLocals)
Lowering\StateMachineRewriter\CapturedSymbol.cs (4)
49public readonly StateMachineFieldSymbol HoistedField; 51public CapturedToStateMachineFieldReplacement(StateMachineFieldSymbol hoistedField, bool isReusable) 68public readonly ImmutableArray<StateMachineFieldSymbol> HoistedFields; 70public CapturedToExpressionSymbolReplacement(BoundExpression replacement, ImmutableArray<StateMachineFieldSymbol> hoistedFields, bool isReusable)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (17)
70private Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>? _lazyAvailableReusableHoistedFields; 299var hoistedLocalsWithDebugScopes = ArrayBuilder<StateMachineFieldSymbol>.GetInstance(); 362foreach (var field in ((CapturedToExpressionSymbolReplacement)proxy).HoistedFields) 397internal BoundBlock MakeStateMachineScope(ImmutableArray<StateMachineFieldSymbol> hoistedLocals, BoundStatement statement) 405internal static bool TryUnwrapBoundStateMachineScope(ref BoundStatement statement, out ImmutableArray<StateMachineFieldSymbol> hoistedLocals) 420hoistedLocals = ImmutableArray<StateMachineFieldSymbol>.Empty; 451private StateMachineFieldSymbol GetOrAllocateReusableHoistedField(TypeSymbol type, out bool reused, LocalSymbol local = null) 453ArrayBuilder<StateMachineFieldSymbol> fields; 456var field = fields.Last(); 474private void FreeReusableHoistedField(StateMachineFieldSymbol field) 476ArrayBuilder<StateMachineFieldSymbol> fields; 481_lazyAvailableReusableHoistedFields = new Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 484_lazyAvailableReusableHoistedFields.Add(field.Type, fields = new ArrayBuilder<StateMachineFieldSymbol>()); 500var hoistedFields = ArrayBuilder<StateMachineFieldSymbol>.GetInstance(); 547ArrayBuilder<StateMachineFieldSymbol> hoistedFields, 644StateMachineFieldSymbol hoistedField; 715var hoistedLocalsWithDebugScopes = ArrayBuilder<StateMachineFieldSymbol>.GetInstance();
Lowering\StateMachineRewriter\StateMachineRewriter.cs (5)
177StateMachineFieldSymbol field = null; 236var proxyField = F.StateMachineField(containingType, GeneratedNames.ThisProxyFieldName(), isPublic: true, isThis: true); 241var initialThis = containingType.IsStructType() ? 251var proxyField = F.StateMachineField(typeMap.SubstituteType(parameter.Type).Type, parameter.Name, isPublic: !PreserveInitialParameterValuesAndThreadId); 256var field = F.StateMachineField(typeMap.SubstituteType(parameter.Type).Type, GeneratedNames.StateMachineParameterProxyFieldName(parameter.Name), isPublic: true);
Lowering\SyntheticBoundNodeFactory.cs (8)
217public StateMachineFieldSymbol StateMachineField(TypeWithAnnotations type, string name, bool isPublic = false, bool isThis = false) 220var result = new StateMachineFieldSymbol(CurrentType, type, name, isPublic, isThis); 225public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, bool isPublic = false, bool isThis = false) 228var result = new StateMachineFieldSymbol(CurrentType, TypeWithAnnotations.Create(type), name, isPublic, isThis); 233public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex) 236var result = new StateMachineFieldSymbol(CurrentType, type, name, synthesizedKind, slotIndex, isPublic: false); 241public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, LocalSlotDebugInfo slotDebugInfo, int slotIndex) 244var result = new StateMachineFieldSymbol(CurrentType, type, name, slotDebugInfo, slotIndex, isPublic: false);