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