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