1 type derived from StateMachineFieldSymbol
Microsoft.CodeAnalysis.CSharp (1)
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (1)
89internal sealed class StateMachineFieldSymbolForRegularParameter : StateMachineFieldSymbol
4 instantiations of StateMachineFieldSymbol
Microsoft.CodeAnalysis.CSharp (4)
Lowering\SyntheticBoundNodeFactory.cs (4)
173var result = new StateMachineFieldSymbol(CurrentType, type, name, isPublic, isThis); 181var result = new StateMachineFieldSymbol(CurrentType, TypeWithAnnotations.Create(type), name, isPublic, isThis); 197var result = new StateMachineFieldSymbol(CurrentType, type, name, synthesizedKind, slotIndex, isPublic: false); 205var result = new StateMachineFieldSymbol(CurrentType, type, name, slotDebugInfo, slotIndex, isPublic: false);
52 references to StateMachineFieldSymbol
Microsoft.CodeAnalysis.CSharp (52)
CodeGen\EmitStatement.cs (3)
817foreach (var field in scope.Fields) 1161var stateMachineField = left.FieldSymbol as StateMachineFieldSymbol;
Compiler\MethodCompiler.cs (1)
1795foreach (StateMachineFieldSymbol field in
Generated\BoundNodes.xml.Generated.cs (6)
3369public BoundStateMachineScope(SyntaxNode syntax, ImmutableArray<StateMachineFieldSymbol> fields, BoundStatement statement, bool hasErrors = false) 3380public ImmutableArray<StateMachineFieldSymbol> Fields { get; } 3386public BoundStateMachineScope Update(ImmutableArray<StateMachineFieldSymbol> fields, BoundStatement statement) 11384ImmutableArray<StateMachineFieldSymbol> fields = this.VisitSymbols<StateMachineFieldSymbol>(node.Fields); 13548ImmutableArray<StateMachineFieldSymbol> fields = GetUpdatedArray(node, node.Fields);
Lowering\AsyncRewriter\AsyncIteratorMethodToStateMachineRewriter.cs (1)
93protected override BoundStatement GenerateCleanupForExit(ImmutableArray<StateMachineFieldSymbol> rootHoistedLocals)
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (4)
146ImmutableArray<StateMachineFieldSymbol> rootScopeHoistedLocals; 218BoundCatchBlock generateExceptionHandling(LocalSymbol exceptionLocal, ImmutableArray<StateMachineFieldSymbol> rootHoistedLocals) 269protected virtual BoundStatement GenerateCleanupForExit(ImmutableArray<StateMachineFieldSymbol> rootHoistedLocals) 275foreach (var hoistedLocal in rootHoistedLocals)
Lowering\StateMachineRewriter\CapturedSymbol.cs (2)
49public readonly StateMachineFieldSymbol HoistedField; 51public CapturedToStateMachineFieldReplacement(StateMachineFieldSymbol hoistedField, bool isReusable)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (21)
70private Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>? _lazyAvailableReusableHoistedFields; 99private readonly RefInitializationHoister<StateMachineFieldSymbol, BoundFieldAccess> _refInitializationHoister; 167_refInitializationHoister = new RefInitializationHoister<StateMachineFieldSymbol, BoundFieldAccess>(F, OriginalMethod, TypeMap); 308var hoistedLocalsWithDebugScopes = ArrayBuilder<StateMachineFieldSymbol>.GetInstance(); 372foreach (var field in ((CapturedToExpressionSymbolReplacement<StateMachineFieldSymbol>)proxy).HoistedSymbols) 407internal BoundBlock MakeStateMachineScope(ImmutableArray<StateMachineFieldSymbol> hoistedLocals, BoundStatement statement) 415internal static bool TryUnwrapBoundStateMachineScope(ref BoundStatement statement, out ImmutableArray<StateMachineFieldSymbol> hoistedLocals) 430hoistedLocals = ImmutableArray<StateMachineFieldSymbol>.Empty; 466private StateMachineFieldSymbol GetOrAllocateReusableHoistedField(TypeSymbol type, out bool reused, LocalSymbol? local = null) 468ArrayBuilder<StateMachineFieldSymbol>? fields; 471var field = fields.Last(); 480StateMachineFieldSymbol createdField; 496private void FreeReusableHoistedField(StateMachineFieldSymbol field) 498ArrayBuilder<StateMachineFieldSymbol> fields; 503_lazyAvailableReusableHoistedFields = new Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 506_lazyAvailableReusableHoistedFields.Add(field.Type, fields = new ArrayBuilder<StateMachineFieldSymbol>()); 542var hoistedLocalsWithDebugScopes = ArrayBuilder<StateMachineFieldSymbol>.GetInstance(); 660static StateMachineFieldSymbol createHoistedSymbol(TypeSymbol type, MethodToStateMachineRewriter @this, LocalSymbol assignedLocal) 662StateMachineFieldSymbol hoistedSymbol; 711static BoundFieldAccess createHoistedAccess(StateMachineFieldSymbol fieldSymbol, MethodToStateMachineRewriter @this)
Lowering\StateMachineRewriter\StateMachineRewriter.cs (5)
180StateMachineFieldSymbol field = null; 240var proxyField = F.StateMachineField(containingType, GeneratedNames.ThisProxyFieldName(), isPublic: true, isThis: true); 245var initialThis = containingType.IsStructType() ? 255var proxyField = F.StateMachineFieldForRegularParameter(typeMap.SubstituteType(parameter.Type).Type, parameter.Name, parameter, isPublic: !PreserveInitialParameterValuesAndThreadId); 260var field = F.StateMachineFieldForRegularParameter(typeMap.SubstituteType(parameter.Type).Type, GeneratedNames.StateMachineParameterProxyFieldName(parameter.Name), parameter, isPublic: true);
Lowering\SyntheticBoundNodeFactory.cs (9)
170public StateMachineFieldSymbol StateMachineField(TypeWithAnnotations type, string name, bool isPublic = false, bool isThis = false) 173var result = new StateMachineFieldSymbol(CurrentType, type, name, isPublic, isThis); 178public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, bool isPublic = false, bool isThis = false) 181var result = new StateMachineFieldSymbol(CurrentType, TypeWithAnnotations.Create(type), name, isPublic, isThis); 186public StateMachineFieldSymbol StateMachineFieldForRegularParameter(TypeSymbol type, string name, ParameterSymbol parameter, bool isPublic) 194public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex) 197var result = new StateMachineFieldSymbol(CurrentType, type, name, synthesizedKind, slotIndex, isPublic: false); 202public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, LocalSlotDebugInfo slotDebugInfo, int slotIndex) 205var result = new StateMachineFieldSymbol(CurrentType, type, name, slotDebugInfo, slotIndex, isPublic: false);