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);
189
var result = new
StateMachineFieldSymbol
(CurrentType, type, name, synthesizedKind, slotIndex, isPublic: false);
197
var result = new
StateMachineFieldSymbol
(CurrentType, type, name, slotDebugInfo, slotIndex, isPublic: false);
45 references to StateMachineFieldSymbol
Microsoft.CodeAnalysis.CSharp (45)
CodeGen\EmitStatement.cs (3)
817
foreach (
var
field in scope.Fields)
1161
var
stateMachineField = left.FieldSymbol as
StateMachineFieldSymbol
;
Compiler\MethodCompiler.cs (1)
1661
foreach (
StateMachineFieldSymbol
field in
Generated\BoundNodes.xml.Generated.cs (4)
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)
13369
ImmutableArray<
StateMachineFieldSymbol
> fields = GetUpdatedArray(node, node.Fields);
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (4)
139
ImmutableArray<
StateMachineFieldSymbol
> rootScopeHoistedLocals;
226
protected BoundCatchBlock GenerateExceptionHandling(LocalSymbol exceptionLocal, ImmutableArray<
StateMachineFieldSymbol
> hoistedLocals)
261
protected BoundStatement GenerateHoistedLocalsCleanup(ImmutableArray<
StateMachineFieldSymbol
> hoistedLocals)
267
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 (16)
70
private Dictionary<TypeSymbol, ArrayBuilder<
StateMachineFieldSymbol
>>? _lazyAvailableReusableHoistedFields;
299
var hoistedLocalsWithDebugScopes = ArrayBuilder<
StateMachineFieldSymbol
>.GetInstance();
363
foreach (
var
field in ((CapturedToExpressionSymbolReplacement)proxy).HoistedFields)
398
internal BoundBlock MakeStateMachineScope(ImmutableArray<
StateMachineFieldSymbol
> hoistedLocals, BoundStatement statement)
406
internal static bool TryUnwrapBoundStateMachineScope(ref BoundStatement statement, out ImmutableArray<
StateMachineFieldSymbol
> hoistedLocals)
421
hoistedLocals = ImmutableArray<
StateMachineFieldSymbol
>.Empty;
452
private
StateMachineFieldSymbol
GetOrAllocateReusableHoistedField(TypeSymbol type, out bool reused, LocalSymbol local = null)
454
ArrayBuilder<
StateMachineFieldSymbol
> fields;
475
private void FreeReusableHoistedField(
StateMachineFieldSymbol
field)
477
ArrayBuilder<
StateMachineFieldSymbol
> fields;
482
_lazyAvailableReusableHoistedFields = new Dictionary<TypeSymbol, ArrayBuilder<
StateMachineFieldSymbol
>>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability);
485
_lazyAvailableReusableHoistedFields.Add(field.Type, fields = new ArrayBuilder<
StateMachineFieldSymbol
>());
509
var hoistedFields = ArrayBuilder<
StateMachineFieldSymbol
>.GetInstance();
563
ArrayBuilder<
StateMachineFieldSymbol
> hoistedFields,
662
StateMachineFieldSymbol
hoistedField;
733
var hoistedLocalsWithDebugScopes = ArrayBuilder<
StateMachineFieldSymbol
>.GetInstance();
Lowering\StateMachineRewriter\StateMachineRewriter.cs (5)
178
StateMachineFieldSymbol
field = null;
237
var
proxyField = F.StateMachineField(containingType, GeneratedNames.ThisProxyFieldName(), isPublic: true, isThis: true);
242
var
initialThis = containingType.IsStructType() ?
252
var
proxyField = F.StateMachineField(typeMap.SubstituteType(parameter.Type).Type, parameter.Name, isPublic: !PreserveInitialParameterValuesAndThreadId);
257
var
field = F.StateMachineField(typeMap.SubstituteType(parameter.Type).Type, GeneratedNames.StateMachineParameterProxyFieldName(parameter.Name), isPublic: true);
Lowering\SyntheticBoundNodeFactory.cs (8)
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
StateMachineField(TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex)
189
var
result = new StateMachineFieldSymbol(CurrentType, type, name, synthesizedKind, slotIndex, isPublic: false);
194
public
StateMachineFieldSymbol
StateMachineField(TypeSymbol type, string name, LocalSlotDebugInfo slotDebugInfo, int slotIndex)
197
var
result = new StateMachineFieldSymbol(CurrentType, type, name, slotDebugInfo, slotIndex, isPublic: false);