1 write to F
Microsoft.CodeAnalysis.VisualBasic (1)
Lowering\StateMachineRewriter\StateMachineRewriter.StateMachineMethodToClassRewriter.vb (1)
93Me.F = F
371 references to F
Microsoft.CodeAnalysis.VisualBasic (371)
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Await.vb (83)
35Dim awaiterTemp As LocalSymbol = Me.F.SynthesizedLocal(awaiterType, kind:=SynthesizedLocalKind.Awaiter, syntax:=node.Syntax) 41PlaceholderReplacementMap.Add(awaiterInstancePlaceholder, Me.F.Local(awaiterTemp, True)) 77Me.F.If( 78condition:=Me.F.Convert(Me.F.SpecialType(SpecialType.System_Boolean), rewrittenIsCompleted), 79thenClause:=Me.F.StatementList(), 84Me.F.If( 85condition:=Me.F.Not(rewrittenIsCompleted), 91Me.F.AssignmentExpression(Me.F.Local(awaiterTemp, True), Me.F.Null(awaiterTemp.Type)) 97Dim resultTemp As LocalSymbol = Me.F.SynthesizedLocal(rewrittenType) 98onAwaitFinished = Me.F.Sequence(resultTemp, 99Me.F.AssignmentExpression(Me.F.Local(resultTemp, True), rewrittenGetResult), 101Me.F.Local(resultTemp, False)) 106onAwaitFinished = Me.F.Sequence(rewrittenGetResult, clearAwaiterTemp) 109Return builder.BuildSequenceAndFree(Me.F, onAwaitFinished) 120awaiterFieldType = Me.F.SpecialType(SpecialType.System_Object) 128Me.F.Assignment( 129Me.F.Field(Me.F.Me(), Me.StateField, True), 130Me.F.AssignmentExpression(Me.F.Local(Me.CachedState, True), Me.F.Literal(state)))) 133blockBuilder.Add(Me.F.NoOp(NoOpStatementFlavor.AwaitYieldPoint)) 137Me.F.Assignment( 138Me.F.Field(Me.F.Me(), awaiterField, True), 140DirectCast(Me.F.Local(awaiterTemp, False), BoundExpression), 141Me.F.Convert(awaiterFieldType, Me.F.Local(awaiterTemp, False))))) 148Dim builderFieldAsRValue As BoundExpression = Me.F.Field(Me.F.Me(), Me._builder, False) 150Dim ICriticalNotifyCompletion = Me.F.WellKnownType(WellKnownType.System_Runtime_CompilerServices_ICriticalNotifyCompletion) 161Dim asCriticalNotifyCompletion As LocalSymbol = Me.F.SynthesizedLocal(ICriticalNotifyCompletion) 163Me.F.SynthesizedLocal(Me.F.WellKnownType(WellKnownType.System_Runtime_CompilerServices_INotifyCompletion)) 165Dim awaiterTempAsRValue As BoundLocal = Me.F.Local(awaiterTemp, False) 166Dim criticalNotifyCompletionAsLValue As BoundLocal = Me.F.Local(asCriticalNotifyCompletion, True) 167Dim notifyCompletionAsLValue As BoundLocal = Me.F.Local(asNotifyCompletion, True) 172Me.F.TryCast(awaiterTempAsRValue, asCriticalNotifyCompletion.Type), 177Me.F.ExpressionStatement( 182ImmutableArray.Create(Of TypeSymbol)(asCriticalNotifyCompletion.Type, Me.F.Me().Type), 183{criticalNotifyCompletionAsLValue, Me.F.ReferenceOrByrefMe()})) 189Me.F.DirectCast(awaiterTempAsRValue, asNotifyCompletion.Type), 194Me.F.ExpressionStatement( 199ImmutableArray.Create(Of TypeSymbol)(asNotifyCompletion.Type, Me.F.Me().Type), 200{notifyCompletionAsLValue, Me.F.ReferenceOrByrefMe()})) 203Me.F.Block( 206Me.F.If( 207condition:=Me.F.Not(Me.F.ReferenceIsNothing(Me.F.Local(asCriticalNotifyCompletion, False))), 209elseClause:=Me.F.Block( 217Dim useSiteInfo As New CompoundUseSiteInfo(Of AssemblySymbol)(Me.F.Diagnostics, Me.CompilationState.Compilation.Assembly) 225Me.F.Diagnostics.Add(Me.F.Syntax, useSiteInfo) 228Me.F.ExpressionStatement( 233ImmutableArray.Create(Of TypeSymbol)(awaiterType, Me.F.Me().Type), 234{Me.F.Local(awaiterTemp, True), Me.F.ReferenceOrByrefMe()}))) 243blockBuilder.Add(Me.F.Goto(Me._exitLabel)) 246blockBuilder.Add(Me.F.Label(resumeLabel)) 250blockBuilder.Add(Me.F.NoOp(NoOpStatementFlavor.AwaitResumePoint)) 254Me.F.Assignment( 255Me.F.Field(Me.F.Me(), Me.StateField, True), 256Me.F.AssignmentExpression(Me.F.Local(Me.CachedState, True), Me.F.Literal(StateMachineState.NotStartedOrRunningState)))) 262Me.F.Assignment( 263Me.F.Local(awaiterTemp, True), 265DirectCast(Me.F.Field(Me.F.Me(), awaiterField, False), BoundExpression), 266Me.F.Convert(awaiterTemp.Type, Me.F.Field(Me.F.Me(), awaiterField, False))))) 272Me.F.Assignment( 273Me.F.Field(Me.F.Me(), awaiterField, True), 274Me.F.Null(awaiterField.Type))) 276Return Me.F.Block(blockBuilder.ToImmutableAndFree())
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Expressions.vb (73)
80Return builder.BuildSequenceAndFree(Me.F, valueOpt) 90Return Me.F.ExpressionStatement(expression) 150spilledReferenceReceiver = referenceReceiverBuilder.BuildSequenceAndFree(Me.F, spilledReferenceReceiver) 156Dim isValueTypeCheck = Me.F.ReferenceIsNotNothing(Me.F.DirectCast(Me.F.DirectCast(Me.F.Null(), receiverType), 157Me.F.SpecialType(SpecialType.System_Object))) 161builder.AddStatement(Me.F.If(Me.F.Not(isValueTypeCheck), Me.F.StatementList(referenceReceiverSpillSequence.Statements))) 177Return builder.BuildSequenceAndFree(Me.F, 201Return builder.BuildSequenceAndFree(Me.F, 246Dim tempLocal As LocalSymbol = Me.F.SynthesizedLocal(rewritten.Type) 251Me.F.If(condition:=spilledLeft, 253elseClause:=MakeAssignmentStatement(Me.F.Literal(False), tempLocal)), 254Me.F.If(condition:=spilledLeft, 255thenClause:=MakeAssignmentStatement(Me.F.Literal(True), tempLocal), 258Return builder.BuildSequenceAndFree(Me.F, 259Me.F.Local(tempLocal, False)) 263Return builder.BuildSequenceAndFree(Me.F, 313Return builder.BuildSequenceAndFree(Me.F, 377Return Me.F.Sequence(initializersBuilder.ToArrayAndFree) 504Dim tempLocal As LocalSymbol = Me.F.SynthesizedLocal(rewritten.Type) 509Me.F.If( 514sequenceValueOpt = Me.F.Local(tempLocal, False) 517Me.F.If( 525Return builder.BuildSequenceAndFree(Me.F, sequenceValueOpt) 533Return RewriteSpillSequenceIntoBlock(spill, False, Me.F.Assignment(Me.F.Local(temp, True), spill.ValueOpt)) 535Return Me.F.Assignment(Me.F.Local(temp, True), expression) 541Return Me.F.Assignment(Me.F.Local(temp, True), expression) 655spilledReferenceReceiver = referenceReceiverBuilder.BuildSequenceAndFree(Me.F, spilledReferenceReceiver) 661Dim isValueTypeCheck = Me.F.ReferenceIsNotNothing(Me.F.DirectCast(Me.F.DirectCast(Me.F.Null(), receiver.Type), 662Me.F.SpecialType(SpecialType.System_Object))) 666builder.AddStatement(Me.F.If(Me.F.Not(isValueTypeCheck), Me.F.StatementList(referenceReceiverSpillSequence.Statements))) 672nullCheckTarget = New BoundComplexConditionalAccessReceiver(Me.F.Syntax, 679receiverLocal = Me.F.SynthesizedLocal(receiver.Type) 682nullCheckTarget = Me.F.AssignmentExpression(Me.F.Local(receiverLocal, isLValue:=True), receiver.MakeRValue()) 683capturedReceiver = Me.F.Local(receiverLocal, isLValue:=True) 697placeholderReplacement = New BoundComplexConditionalAccessReceiver(Me.F.Syntax, 719condition = Me.F.ReferenceIsNotNothing(nullCheckTarget) 728Dim notReferenceType = Me.F.ReferenceIsNotNothing(Me.F.DirectCast(Me.F.DirectCast(Me.F.Null(), 730Me.F.SpecialType(SpecialType.System_Object))) 732condition = Me.F.LogicalOrElse(notReferenceType, 733Me.F.ReferenceIsNotNothing(Me.F.DirectCast(nullCheckTarget, 734Me.F.SpecialType(SpecialType.System_Object)))) 741Me.F.If(condition:=condition, 744Return builder.BuildSequenceAndFree(Me.F, expression:=Nothing) 747Dim tempLocal As LocalSymbol = Me.F.SynthesizedLocal(type) 751builder.AddStatement(Me.F.If(condition:=condition, 755Return builder.BuildSequenceAndFree(Me.F, expression:=Me.F.Local(tempLocal, False)) 844Return builder.BuildSequenceAndFree(Me.F, 896Return builder.BuildSequenceAndFree(Me.F, 949Dim tempLocal As LocalSymbol = Me.F.SynthesizedLocal(rewritten.Type) 955Me.F.If( 956condition:=Me.F.ReferenceIsNothing(Me.F.Local(tempLocal, False)), 959Return builder.BuildSequenceAndFree(Me.F, 960Me.F.Local(tempLocal, False))
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Spilling.vb (39)
248builder.AddStatement(Me.F.ExpressionStatement(sideEffect)) 276builder.AddStatement(Me.F.ExpressionStatement(array)) 305builder.AddStatement(Me.F.ExpressionStatement(fieldAccess)) 318spilledValueReceiver = valueReceiverBuilder.BuildSequenceAndFree(Me.F, spilledValueReceiver) 323spilledReferenceReceiver = referenceReceiverBuilder.BuildSequenceAndFree(Me.F, spilledReferenceReceiver) 332Dim isValueTypeCheck = Me.F.ReferenceIsNotNothing(Me.F.DirectCast(Me.F.DirectCast(Me.F.Null(), complexReceiver.Type), 333Me.F.SpecialType(SpecialType.System_Object))) 336builder.AddStatement(Me.F.If(Me.F.Not(isValueTypeCheck), Me.F.StatementList(referenceReceiverSpillSequence.Statements))) 344Dim isValueTypeCheck = Me.F.ReferenceIsNotNothing(Me.F.DirectCast(Me.F.DirectCast(Me.F.Null(), complexReceiver.Type), 345Me.F.SpecialType(SpecialType.System_Object))) 348builder.AddStatement(Me.F.If(isValueTypeCheck, Me.F.StatementList(valueReceiverSpillSequence.Statements))) 355Dim isValueTypeCheck = Me.F.ReferenceIsNotNothing(Me.F.DirectCast(Me.F.DirectCast(Me.F.Null(), complexReceiver.Type), 356Me.F.SpecialType(SpecialType.System_Object))) 361builder.AddStatement(Me.F.If(isValueTypeCheck, Me.F.StatementList(valueReceiverSpillSequence.Statements), Me.F.StatementList(referenceReceiverSpillSequence.Statements))) 414Dim initialization As BoundStatement = Me.F.Assignment(Me.F.Field(Me.F.Me(), spillField, True), expr) 422Return Me.F.Field(Me.F.Me(), spillField, False) 441newStatements.Add(Me.F.ExpressionStatement(spill.ValueOpt)) 452newStatements.Add(F.Assignment(F.Field(F.Me(), field, True), F.Null(field.Type))) 458Return Me.F.Block(spill.Locals, newStatements.ToImmutableAndFree())
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Statements.vb (9)
32Return Me.F.Block( 36Me.F.Assignment(Me.F.Local(Me._exprRetValue, True), spill.ValueOpt)), 37Me.F.Goto(Me._exprReturnLabel)) 39Return Me.F.Block( 40Me.F.Assignment( 41Me.F.Local(Me._exprRetValue, True), expression), 42Me.F.Goto(Me._exprReturnLabel)) 46Return F.Goto(Me._exprReturnLabel)
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.vb (43)
86Me._exprRetValue = Me.F.SynthesizedLocal(Me._owner._resultType, SynthesizedLocalKind.StateMachineReturnValue, F.Syntax) 113If Me.SlotAllocatorOpt Is Nothing OrElse Not Me.SlotAllocatorOpt.TryGetPreviousAwaiterSlotIndex(F.CompilationState.ModuleBuilderOpt.Translate(awaiterType, F.Syntax, F.Diagnostics.DiagnosticBag), F.Diagnostics.DiagnosticBag, slotIndex) Then 119result = Me.F.StateMachineField(awaiterType, Me._method, fieldName, SynthesizedLocalKind.AwaiterField, slotIndex, accessibility:=Accessibility.Friend) 129Me.F.CurrentMethod = moveNextMethod 159Me.F.Assignment( 160Me.F.Local(Me.CachedState, True), 161Me.F.Field(Me.F.Me(), Me.StateField, False))) 167Dim exceptionLocal = Me.F.SynthesizedLocal(Me.F.WellKnownType(WellKnownType.System_Exception)) 169Me.F.Try( 170Me.F.Block( 176Me.F.CatchBlocks( 177Me.F.Catch( 179Me.F.Block( 181Me.F.Assignment(Me.F.Field(Me.F.Me(), Me.StateField, True), Me.F.Literal(StateMachineState.FinishedState)), 182Me.F.ExpressionStatement( 184Me.F.Field(Me.F.Me(), Me._builder, False), 187Me.F.Local(exceptionLocal, False))), 188Me.F.Goto(Me._exitLabel)), 192bodyBuilder.Add(Me.F.Label(Me._exprReturnLabel)) 195Dim stateDone = Me.F.Assignment( 196Me.F.Field(Me.F.Me(), Me.StateField, True), 197Me.F.AssignmentExpression(Me.F.Local(Me.CachedState, True), Me.F.Literal(StateMachineState.FinishedState))) 202bodyBuilder.Add(Me.F.SequencePointWithSpan(block, block.EndBlockStatement.Span, stateDone)) 208Me.F.ExpressionStatement( 210Me.F.Field(Me.F.Me(), Me._builder, False), 214{Me.F.Local(Me._exprRetValue, False)}, Array.Empty(Of BoundExpression)())))) 217bodyBuilder.Add(Me.F.Label(Me._exitLabel)) 218bodyBuilder.Add(Me.F.Return()) 221Dim newBody = Me.F.Block( 241Return Me.F.Goto(Me._exitLabel)
Lowering\AsyncRewriter\AsyncRewriter.CapturedSymbolOrExpression.vb (6)
58Return New BoundLiteral(rewriter.F.Syntax, Me._constValue, Me._type) 73Dim syntax As SyntaxNode = rewriter.F.Syntax 76Return rewriter.F.Field(framePointer, proxyFieldParented, isLValue) 128rewriter.F.AssignmentExpression( 157Return rewriter.F.Field(newReceiverOpt, rewriter.VisitFieldSymbol(Me.Field), isLValue) 194Return rewriter.F.ArrayAccess(arrayPointer, isLValue, indices)
Lowering\IteratorRewriter\IteratorRewriter.IteratorMethodToClassRewriter.vb (76)
59F.CurrentMethod = moveNextMethod 64Me._methodValue = Me.F.SynthesizedLocal(F.CurrentMethod.ReturnType, SynthesizedLocalKind.StateMachineReturnValue, F.Syntax) 79F.CloseMethod( 80F.Block( 83F.Assignment(Me.F.Local(Me.CachedState, True), F.Field(F.Me, Me.StateField, False)), 86F.Label(initialLabel), 87F.Assignment(F.Field(F.Me, Me.StateField, True), Me.F.AssignmentExpression(Me.F.Local(Me.CachedState, True), Me.F.Literal(StateMachineState.NotStartedOrRunningState))), 96F.CurrentMethod = disposeMethod 97Dim breakLabel = F.GenerateLabel("break") 101Select F.SwitchSection( 103F.Assignment(F.Field(F.Me, Me.StateField, True), F.Literal(Value)), 104F.Goto(breakLabel))).ToArray() 107F.CloseMethod(F.Block( 108F.Select( 109F.Field(F.Me, Me.StateField, False), 111F.Assignment(F.Field(F.Me, Me.StateField, True), F.Literal(StateMachineState.NotStartedOrRunningState)), 112F.Label(breakLabel), 113F.ExpressionStatement(F.Call(F.Me, moveNextMethod)), 114F.Return() 117F.CloseMethod(F.Return()) 124Return F.StatementList() 129Return F.Block( 131F.Assignment(F.Local(Me._methodValue, True), F.Literal(True)), 132F.Label(Me._exitLabel), 133F.Return(Me.F.Local(Me._methodValue, False)) 139Dim result = F.Literal(Not finished) 143Return F.Return(result) 149Me._exitLabel = F.GenerateLabel("exitLabel") 152Return Me.F.Block( 153Me.F.Assignment(Me.F.Local(Me._methodValue, True), result), 154Me.F.Goto(Me._exitLabel) 198Return F.SequencePoint( 200F.Block( 201F.Assignment(F.Field(F.Me, Me._current, True), DirectCast(Visit(node.Expression), BoundExpression)), 202F.Assignment(F.Field(F.Me, Me.StateField, True), F.AssignmentExpression(F.Local(Me.CachedState, True), F.Literal(stateNumber))), 204F.Label(resumeLabel), 205F.Assignment(F.Field(F.Me, Me.StateField, True), F.AssignmentExpression(F.Local(Me.CachedState, True), F.Literal(StateMachineState.NotStartedOrRunningState))) 218Dim syntax As SyntaxNode = Me.F.Syntax 221Return Me.F.Field(framePointer, proxyFieldParented, origExpression.IsLValue)
Lowering\StateMachineRewriter\StateMachineRewriter.StateMachineMethodToClassRewriter.vb (42)
125Return Me.F.CurrentType.TypeSubstitution 131Return Me.F.CurrentMethod 137Return Me.F.TopLevelMethod 142Dim oldSyntax As SyntaxNode = Me.F.Syntax 143Me.F.Syntax = syntax 144Dim result = Me.F.Me() 146Me.F.Syntax = oldSyntax 191resumeLabel = F.GenerateLabel(ResumeLabelName) 205Select F.SwitchSection(kv.Value, F.Goto(kv.Key)) 207Dim result = F.Select(F.Local(CachedState, isLValue:=False), sections) 218result = F.Block(result, missingStateDispatch) 226Return _resumableStateAllocator.GenerateThrowMissingStateDispatch(F, F.Local(CachedState, isLValue:=False), EncMissingStateErrorCode) 236Dim oldSyntax As SyntaxNode = Me.F.Syntax 237Me.F.Syntax = node.Syntax 239Me.F.Syntax = oldSyntax 292Return Me.F.Block(New BoundStateMachineScope(Me.F.Syntax, hoistedLocals, statement).MakeCompilerGenerated) 344Dim tryBlock As BoundBlock = Me.F.Block(DirectCast(Me.Visit(node.TryBlock), BoundStatement)) 347dispatchLabel = Me.F.GenerateLabel("tryDispatch") 354Dim finalizer As GeneratedLabelSymbol = Me.F.GenerateLabel("finalizer") 357Dim skipFinalizer As GeneratedLabelSymbol = Me.F.GenerateLabel("skipFinalizer") 358tryBlock = Me.F.Block(SyntheticBoundNodeFactory.HiddenSequencePoint(), 360Me.F.Goto(skipFinalizer), 361Me.F.Label(finalizer), 362Me.F.Assignment( 363F.Field(F.Me(), Me.StateField, True), 364F.AssignmentExpression(F.Local(Me.CachedState, True), F.Literal(StateMachineState.NotStartedOrRunningState))), 366Me.F.Label(skipFinalizer), 370tryBlock = Me.F.Block(SyntheticBoundNodeFactory.HiddenSequencePoint(), Me.Dispatch(isOutermost:=False), tryBlock) 387Me.F.Block( 389Me.F.If( 390condition:=Me.F.IntLessThan( 391Me.F.Local(Me.CachedState, False), 392Me.F.Literal(StateMachineState.FirstUnusedState)), 398result = Me.F.Block(SyntheticBoundNodeFactory.HiddenSequencePoint(), Me.F.Label(dispatchLabel), result)