1 write to F
Microsoft.CodeAnalysis.VisualBasic (1)
Lowering\StateMachineRewriter\StateMachineRewriter.vb (1)
63
Me.
F
= New SyntheticBoundNodeFactory(method, method, method.ContainingType, body.Syntax, compilationState, diagnostics)
206 references to F
Microsoft.CodeAnalysis.VisualBasic (206)
Lowering\AsyncRewriter\AsyncRewriter.vb (64)
53
Me._resultType = Me.
F
.SpecialType(SpecialType.System_Void)
54
Me._builderType = Me.
F
.WellKnownType(WellKnownType.System_Runtime_CompilerServices_AsyncVoidMethodBuilder)
57
Me._resultType = Me.
F
.SpecialType(SpecialType.System_Void)
58
Me._builderType = Me.
F
.WellKnownType(WellKnownType.System_Runtime_CompilerServices_AsyncTaskMethodBuilder)
62
Me._builderType = Me.
F
.WellKnownType(WellKnownType.System_Runtime_CompilerServices_AsyncTaskMethodBuilder_T).Construct(Me._resultType)
136
Me.StateField = Me.
F
.StateMachineField(Me.
F
.SpecialType(SpecialType.System_Int32), Me.Method, GeneratedNames.MakeStateMachineStateFieldName(), Accessibility.Public)
137
Me._builderField = Me.
F
.StateMachineField(Me._builderType, Me.Method, GeneratedNames.MakeStateMachineBuilderFieldName(), Accessibility.Public)
144
Me.
F
.Assignment(
145
Me.
F
.Local(stateMachineLocal, True),
146
Me.
F
.[New](StateMachineType.Constructor.AsMember(frameType))))
150
Me.
F
.Assignment(
151
Me.
F
.Local(stateMachineLocal, True),
152
Me.
F
.Null(stateMachineLocal.Type)))
185
If Me.
F
.CurrentType.TypeKind = TypeKind.Class Then
186
Me.
F
.CloseMethod(
F
.Return())
189
Me.
F
.Block(
190
Me.
F
.ExpressionStatement(
192
Me.
F
.Field(Me.
F
.Me(), Me._builderField, False),
195
{Me.
F
.Parameter(Me.
F
.CurrentMethod.Parameters(0))})),
196
Me.
F
.Return()))
201
Me.
F
.CurrentMethod = StateMachineType.Constructor
202
Me.
F
.CloseMethod(
F
.Block(ImmutableArray.Create(
F
.BaseInitialization(),
F
.Return())))
212
Me.
F
.Field(
213
Me.
F
.Local(stateMachineVariable, True),
217
Me.
F
.Assignment(
219
Me.
F
.Literal(StateMachineState.NotStartedOrRunningState)))
223
Dim builderFieldAsLValue As BoundExpression = Me.
F
.Field(Me.
F
.Local(stateMachineVariable, True), constructedBuilderField, True)
229
Me.
F
.Assignment(
235
Me.
F
.ExpressionStatement(
241
Me.
F
.Local(stateMachineVariable, True))))
248
Me.
F
.Return(),
249
Me.
F
.Return(Me.GeneratePropertyGet(builderFieldAsLValue, builderType, "Task"))))
251
Return RewriteBodyIfNeeded(Me.
F
.Block(ImmutableArray(Of LocalSymbol).Empty, bodyBuilder.ToImmutableAndFree()), Me.
F
.TopLevelMethod, Me.Method)
257
F:=
F
,
280
body = Me.
F
.Block(body)
290
F
.CompilationState,
463
Me.
F
.StateMachineField(
483
DirectCast(Me.
F
.[Me](), BoundExpression),
484
Me.
F
.Parameter(parameter).MakeRValue())
486
Me.
F
.AssignmentExpression(
487
Me.
F
.Field(
488
Me.
F
.Local(stateMachineVariable, True),
524
Return Me.
F
.BadExpression(arguments)
528
Dim result = _binder.BindInvocationExpression(Me.
F
.Syntax,
529
Me.
F
.Syntax,
549
Me.Diagnostics.Add(Me.
F
.Syntax, useSiteInfo)
555
group = New BoundMethodGroup(Me.
F
.Syntax,
556
Me.
F
.TypeArguments(typeArgs),
568
Me.
F
.Syntax.GetLocation())
580
Return Me.
F
.BadExpression()
584
Dim result = _binder.BindInvocationExpression(Me.
F
.Syntax,
585
Me.
F
.Syntax,
608
Me.Diagnostics.Add(Me.
F
.Syntax, useSiteInfo)
614
group = New BoundPropertyGroup(Me.
F
.Syntax,
626
Me.
F
.Syntax.GetLocation())
Lowering\IteratorRewriter\IteratorRewriter.vb (95)
139
Me.StateField = Me.
F
.StateMachineField(Me.
F
.SpecialType(SpecialType.System_Int32), Me.Method, GeneratedNames.MakeStateMachineStateFieldName(), Accessibility.Public)
142
_currentField =
F
.StateMachineField(_elementType, Me.Method, GeneratedNames.MakeIteratorCurrentFieldName(), Accessibility.Public)
146
F
.StateMachineField(
F
.SpecialType(SpecialType.System_Int32), Me.Method, GeneratedNames.MakeIteratorInitialThreadIdName(), Accessibility.Public),
164
F
.CurrentMethod = moveNextMethod
181
Dim getEnumeratorGeneric = Me.OpenMethodImplementation(
F
.SpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_elementType),
188
Dim resultVariable =
F
.SynthesizedLocal(StateMachineType) ' iteratorClass result;
192
Dim currentManagedThreadIdProperty As PropertySymbol =
F
.WellKnownMember(Of PropertySymbol)(WellKnownMember.System_Environment__CurrentManagedThreadId, isOptional:=True)
199
managedThreadId =
F
.Call(Nothing, currentManagedThreadIdMethod)
201
managedThreadId =
F
.Property(
F
.Property(WellKnownMember.System_Threading_Thread__CurrentThread), WellKnownMember.System_Threading_Thread__ManagedThreadId)
213
Dim thisInitialized =
F
.GenerateLabel("thisInitialized")
215
F
.If(
217
F
.LogicalAndAlso(
218
F
.IntEqual(
F
.Field(
F
.Me, StateField, False),
F
.Literal(StateMachineState.FinishedState)),
219
F
.IntEqual(
F
.Field(
F
.Me, _initialThreadIdField, False), managedThreadId)),
221
F
.Block(
222
F
.Assignment(
F
.Field(
F
.Me, StateField, True),
F
.Literal(StateMachineState.FirstUnusedState)),
223
F
.Assignment(
F
.Local(resultVariable, True),
F
.Me),
225
F
.Goto(thisInitialized),
226
DirectCast(
F
.StatementList(), BoundStatement))
229
F
.Assignment(
F
.Local(resultVariable, True),
F
.[New](StateMachineType.Constructor,
F
.Literal(0)))
240
F
.Assignment(
241
F
.Field(
F
.Local(resultVariable, True), proxy.AsMember(StateMachineType), True),
242
F
.Field(
F
.Me, copySrc(Method.MeParameter).AsMember(
F
.CurrentType), False)))
246
bodyBuilder.Add(
F
.Label(thisInitialized))
252
F
.Assignment(
253
F
.Field(
F
.Local(resultVariable, True), proxy.AsMember(StateMachineType), True),
254
F
.Field(
F
.Me, copySrc(parameter).AsMember(
F
.CurrentType), False)))
258
bodyBuilder.Add(
F
.Return(
F
.Local(resultVariable, False)))
259
F
.CloseMethod(
F
.Block(ImmutableArray.Create(resultVariable), bodyBuilder.ToImmutableAndFree()))
271
F
.CloseMethod(
F
.Return(
F
.Call(
F
.Me, getEnumeratorGeneric)))
275
Me.OpenPropertyImplementation(
F
.SpecialType(SpecialType.System_Collections_Generic_IEnumerator_T).Construct(_elementType),
279
F
.CloseMethod(
F
.Return(
F
.Field(
F
.Me, _currentField, False)))
286
F
.CloseMethod(
F
.Throw(
F
.[New](
F
.WellKnownType(WellKnownType.System_NotSupportedException))))
298
F
.CloseMethod(
F
.Return(
F
.Field(
F
.Me, _currentField, False)))
302
F
.CurrentMethod = StateMachineType.Constructor
304
bodyBuilder.Add(
F
.BaseInitialization())
305
bodyBuilder.Add(
F
.Assignment(
F
.Field(
F
.Me, StateField, True),
F
.Parameter(
F
.CurrentMethod.Parameters(0)).MakeRValue)) ' this.state = state
309
bodyBuilder.Add(
F
.Assignment(
F
.Field(
F
.Me, _initialThreadIdField, True), managedThreadId))
312
bodyBuilder.Add(
F
.Return())
313
F
.CloseMethod(
F
.Block(bodyBuilder.ToImmutableAndFree()))
320
Return
F
.Return(
F
.Local(stateMachineVariable, False))
328
F
.Assignment(
329
F
.Local(stateMachineLocal, True),
330
F
.[New](StateMachineType.Constructor.AsMember(frameType),
F
.Literal(initialState))))
347
F:=
F
,
375
DirectCast(Me.
F
.Me, BoundExpression),
376
Me.
F
.Parameter(parameter).MakeRValue())
378
Me.
F
.AssignmentExpression(
379
Me.
F
.Field(
380
Me.
F
.Local(stateMachineVariable, True),
Lowering\StateMachineRewriter\StateMachineRewriter.vb (47)
99
Me.
F
.OpenNestedType(Me.StateMachineType)
100
Me.
F
.CompilationState.StateMachineImplementationClass(Me.Method) = Me.StateMachineType
110
Dim variablesToHoist = IteratorAndAsyncCaptureWalker.Analyze(New FlowAnalysisInfo(
F
.CompilationState.Compilation, Me.Method, Me.Body), Me.Diagnostics.DiagnosticBag)
123
Me.
F
.CurrentMethod = Me.Method
128
Dim stateMachineVariable As LocalSymbol =
F
.SynthesizedLocal(frameType)
152
bodyBuilder.Add(
F
.ExpressionStatement(
F
.Sequence(initializers.ToArray())))
158
Return Me.
F
.Block(
167
Dim isDebugBuild As Boolean =
F
.Compilation.Options.OptimizationLevel = OptimizationLevel.Debug
213
Me.
F
.StateMachineField(
226
Me.
F
.StateMachineField(
242
F
.StateMachineField(
253
Me.
F
.StateMachineField(
293
If Not local.SynthesizedKind.IsSlotReusable(
F
.Compilation.Options.OptimizationLevel) Then
306
F
.CompilationState.ModuleBuilderOpt.Translate(fieldType, declaratorSyntax, Diagnostics.DiagnosticBag),
354
Return
F
.StateMachineField(localType, Me.Method, proxyName, New LocalSlotDebugInfo(local.SynthesizedKind, id), slotIndex, Accessibility.Friend)
379
Return Binder.GetSpecialType(
F
.Compilation, type, Me.Body.Syntax, bag)
383
Return Binder.GetWellKnownType(
F
.Compilation, type, Me.Body.Syntax, bag)
387
Return Binder.GetSpecialTypeMember(
F
.Compilation.Assembly, member, Me.Body.Syntax, bag)
391
Return Binder.GetWellKnownTypeMember(
F
.Compilation, member, Me.Body.Syntax, bag)
414
Dim methodToImplement As MethodSymbol = Me.
F
.WellKnownMember(Of MethodSymbol)(interfaceMethod)
420
Dim methodToImplement As MethodSymbol = DirectCast(Me.
F
.SpecialMember(interfaceMethod), MethodSymbol)
426
Dim methodToImplement As MethodSymbol = DirectCast(Me.
F
.SpecialMember(interfaceMethod), MethodSymbol).AsMember(interfaceType)
440
Dim result As New SynthesizedStateMachineDebuggerNonUserCodeMethod(DirectCast(Me.
F
.CurrentType, StateMachineTypeSymbol),
443
Me.
F
.Syntax,
448
Me.
F
.AddMethod(Me.
F
.CurrentType, result)
449
Me.
F
.CurrentMethod = result
454
Dim methodToImplement As MethodSymbol = DirectCast(Me.
F
.SpecialMember(interfaceProperty), PropertySymbol).GetMethod
460
Dim methodToImplement As MethodSymbol = DirectCast(Me.
F
.SpecialMember(interfaceMethod), PropertySymbol).GetMethod.AsMember(interfaceType)
467
Dim prop As New SynthesizedStateMachineProperty(DirectCast(Me.
F
.CurrentType, StateMachineTypeSymbol),
470
Me.
F
.Syntax,
473
Me.
F
.AddProperty(Me.
F
.CurrentType, prop)
476
Me.
F
.AddMethod(Me.
F
.CurrentType, getter)
478
Me.
F
.CurrentMethod = getter
483
Me.
F
.CloseMethod(RewriteBodyIfNeeded(body, Me.
F
.TopLevelMethod, Me.
F
.CurrentMethod))
491
Dim methodToImplement As MethodSymbol = Me.
F
.WellKnownMember(Of MethodSymbol)(interfaceMethod)
497
Dim methodToImplement As MethodSymbol = DirectCast(Me.
F
.SpecialMember(interfaceMethod), MethodSymbol)
507
Dim result As New SynthesizedStateMachineMoveNextMethod(DirectCast(Me.
F
.CurrentType, StateMachineTypeSymbol),
509
Me.
F
.Syntax,
512
Me.
F
.AddMethod(Me.
F
.CurrentType, result)
513
Me.
F
.CurrentMethod = result