13 instantiations of BoundFieldAccess
Microsoft.CodeAnalysis.CSharp (13)
Binder\Binder_Deconstruct.cs (1)
949return new BoundFieldAccess(syntax,
BoundTree\VariablePendingInference.cs (1)
100return new BoundFieldAccess(this.Syntax,
Compiler\MethodBodySynthesizer.cs (2)
278BoundFieldAccess fieldAccess = new BoundFieldAccess( 380BoundFieldAccess boundBackingField = new BoundFieldAccess(syntax,
Generated\BoundNodes.xml.Generated.cs (1)
7288var result = new BoundFieldAccess(this.Syntax, receiverOpt, fieldSymbol, constantValueOpt, resultKind, isByValue, isDeclaration, type, this.HasErrors);
Lowering\ClosureConversion\ClosureConversion.cs (2)
693BoundExpression left = new BoundFieldAccess(syntax, new BoundLocal(syntax, framePointer, null, frameType), frameParent, null); 1057receiver = new BoundFieldAccess(syntax, null, field, constantValueOpt: null);
Lowering\InitializerRewriter.cs (1)
100new BoundFieldAccess(syntax,
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
241BoundFieldAccess fieldAccess = new BoundFieldAccess(
Lowering\LocalRewriter\LocalRewriter_Field.cs (1)
33new BoundFieldAccess(syntax, rewrittenReceiver, fieldSymbol, constantValueOpt, resultKind, type);
Lowering\LocalRewriter\LocalRewriter_HostObjectMemberReference.cs (1)
20return new BoundFieldAccess(syntax, thisReference, hostObjectReference, constantValueOpt: null);
Lowering\StateMachineRewriter\CapturedSymbol.cs (2)
43return new BoundFieldAccess(node, frame, field, constantValueOpt: null); 61return new BoundFieldAccess(node, frame, field, constantValueOpt: null);
161 references to BoundFieldAccess
Microsoft.CodeAnalysis.CSharp (161)
Binder\Binder.ValueChecks.cs (13)
801if (receiver is BoundFieldAccess fieldAccess && fieldAccess.FieldSymbol.IsFixedSizeBuffer) 926var fieldAccess = (BoundFieldAccess)expr; 1317private bool CheckFieldValueKind(SyntaxNode node, BoundFieldAccess fieldAccess, BindValueKind valueKind, bool checkingReceiver, BindingDiagnosticBag diagnostics) 1472private SafeContext GetFieldRefEscape(BoundFieldAccess fieldAccess, SafeContext scopeOfTheContainingExpression) 1495private bool CheckFieldRefEscape(SyntaxNode node, BoundFieldAccess fieldAccess, SafeContext escapeFrom, SafeContext escapeTo, BindingDiagnosticBag diagnostics) 3397return GetFieldRefEscape((BoundFieldAccess)expr, scopeOfTheContainingExpression); 3722var fieldAccess = (BoundFieldAccess)expr; 4120var fieldAccess = (BoundFieldAccess)expr; 4830var fieldAccess = (BoundFieldAccess)expr;
Binder\Binder_Attributes.cs (2)
815var fa = (BoundFieldAccess)assignment.Left;
Binder\Binder_Expressions.cs (2)
5872var fieldSymbol = ((BoundFieldAccess)boundMember).FieldSymbol; 6127BoundFieldAccess fieldAccess => fieldAccess.FieldSymbol,
Binder\Binder_Invocation.cs (1)
114symbol = ((BoundFieldAccess)boundExpression).FieldSymbol;
Binder\Binder_Operators.cs (3)
2578BoundFieldAccess fieldAccess = (BoundFieldAccess)expr; 2689if (underlyingExpr is BoundFieldAccess fieldAccess && fieldAccess.FieldSymbol.IsFixedSizeBuffer)
Binder\Binder_Statements.cs (2)
1252var fa = (BoundFieldAccess)initializerOpt;
BoundTree\BoundExpressionExtensions.cs (1)
31return ((BoundFieldAccess)node).FieldSymbol.RefKind;
BoundTree\BoundNode_Source.cs (1)
267case BoundFieldAccess fieldAccess:
BoundTree\BoundTreeVisitors.cs (1)
122return VisitFieldAccess(node as BoundFieldAccess, arg);
BoundTree\Constructors.cs (2)
49public BoundFieldAccess Update( 72return ((BoundFieldAccess)receiver).IsByValue;
CodeGen\CodeGenerator_HasHome.cs (2)
109return FieldAccessHasHome((BoundFieldAccess)expression, addressKind, containingSymbol, peVerifyCompatEnabled, stackLocalsOpt); 172BoundFieldAccess fieldAccess,
CodeGen\EmitAddress.cs (5)
53return EmitFieldAddress((BoundFieldAccess)expression, addressKind); 368var fieldAccess = (BoundFieldAccess)value; 436private LocalDefinition EmitFieldAddress(BoundFieldAccess fieldAccess, AddressKind addressKind) 543private LocalDefinition EmitInstanceFieldAddress(BoundFieldAccess fieldAccess, AddressKind addressKind)
CodeGen\EmitExpression.cs (17)
150EmitFieldLoad((BoundFieldAccess)expression, used); 737Debug.Assert(argument.Type.IsDynamic() || argument is BoundFieldAccess { FieldSymbol.RefKind: not RefKind.None }, "passing args byref should not clone them into temps"); 1118private void EmitFieldLoad(BoundFieldAccess fieldAccess, bool used) 1152private void EmitFieldLoadNoIndirection(BoundFieldAccess fieldAccess, bool used) 1244var fieldAccess = (BoundFieldAccess)receiver; 1298var fieldAccess = (BoundFieldAccess)receiver; 1564return ((BoundFieldAccess)receiver).FieldSymbol.IsCapturedFrame; 2139var field = (BoundFieldAccess)current; 2661var fieldAccess = (BoundFieldAccess)left; 2781var left = (BoundFieldAccess)assignmentTarget; 3065EmitFieldStore((BoundFieldAccess)expression, assignment.IsRef); 3273private void EmitFieldStore(BoundFieldAccess fieldAccess, bool refAssign)
CodeGen\EmitStatement.cs (2)
1156var left = (BoundFieldAccess)exceptionSource;
CodeGen\Optimizer.cs (3)
1018right is BoundFieldAccess fieldAccess && 1102return !((BoundFieldAccess)lhs).FieldSymbol.IsStatic; 1339public override BoundNode VisitFieldAccess(BoundFieldAccess node)
Compiler\MethodBodySynthesizer.cs (3)
188var fieldAccess = new BoundFieldAccess(syntax, thisReference, field, ConstantValue.NotAvailable) { WasCompilerGenerated = true }; 278BoundFieldAccess fieldAccess = new BoundFieldAccess( 380BoundFieldAccess boundBackingField = new BoundFieldAccess(syntax,
FlowAnalysis\AbstractFlowPass.cs (3)
587BoundFieldAccess node1 = (BoundFieldAccess)node; 2224public override BoundNode VisitFieldAccess(BoundFieldAccess node)
FlowAnalysis\DataFlowsOutWalker.cs (2)
129var fieldAccess = (BoundFieldAccess)node;
FlowAnalysis\DefiniteAssignment.cs (14)
793var fieldAccess = (BoundFieldAccess)n; 965var fieldAccess = (BoundFieldAccess)n; 1074var fieldAccess = (BoundFieldAccess)expr; 1405var fieldAccess = (BoundFieldAccess)node; 1489var fieldAccess = (BoundFieldAccess)expression; 1518if (!isRef && node is BoundFieldAccess { FieldSymbol.RefKind: not RefKind.None } fieldAccess) 2603var field = (BoundFieldAccess)expr; 2695public override BoundNode VisitFieldAccess(BoundFieldAccess node)
FlowAnalysis\NullableWalker.cs (4)
1948var fieldAccess = (BoundFieldAccess)expr; 10037BoundFieldAccess field => GetFieldAnnotations(field.FieldSymbol), 10655public override BoundNode? VisitFieldAccess(BoundFieldAccess node)
FlowAnalysis\ReadWriteWalker.cs (7)
144NoteReceiverRead((BoundFieldAccess)expr); 148private void NoteReceiverWritten(BoundFieldAccess expr) 158private void NoteReceiverRead(BoundFieldAccess expr) 170private void NoteReceiverReadOrWritten(BoundFieldAccess expr, HashSet<Symbol> readOrWritten) 218NoteReceiverReadOrWritten((BoundFieldAccess)receiver, readOrWritten); 253var fieldAccess = node as BoundFieldAccess;
Generated\BoundNodes.xml.Generated.cs (10)
7284public BoundFieldAccess Update(BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type) 7288var result = new BoundFieldAccess(this.Syntax, receiverOpt, fieldSymbol, constantValueOpt, resultKind, isByValue, isDeclaration, type, this.HasErrors); 9214return VisitFieldAccess((BoundFieldAccess)node, arg); 9495public virtual R VisitFieldAccess(BoundFieldAccess node, A arg) => this.DefaultVisit(node, arg); 9731public virtual BoundNode? VisitFieldAccess(BoundFieldAccess node) => this.DefaultVisit(node); 10596public override BoundNode? VisitFieldAccess(BoundFieldAccess node) 11929public override BoundNode? VisitFieldAccess(BoundFieldAccess node) 14413public override BoundNode? VisitFieldAccess(BoundFieldAccess node) 14417BoundFieldAccess updatedNode; 16702public override TreeDumperNode VisitFieldAccess(BoundFieldAccess node, object? arg) => new TreeDumperNode("fieldAccess", null, new TreeDumperNode[]
Lowering\AsyncRewriter\AsyncIteratorMethodToStateMachineRewriter.cs (2)
141BoundFieldAccess promiseField = F.InstanceField(_asyncIteratorInfo.PromiseOfValueOrEndField); 169var combinedTokens = F.Field(F.This(), _asyncIteratorInfo.CombinedTokensField);
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (2)
233BoundFieldAccess combinedTokens = F.Field(F.This(), _combinedTokensField); 377BoundFieldAccess promiseField = F.InstanceField(_promiseOfValueOrEndField);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (3)
210var fieldAccess = (BoundFieldAccess)node; 808private BoundExpression VisitFieldAccess(BoundFieldAccess node)
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
755CheckFieldAddress((BoundFieldAccess)operand, consumerOpt: null);
Lowering\DiagnosticsPass_Warnings.cs (11)
34CheckFieldAddress((BoundFieldAccess)argument, method); 56private void CheckFieldAddress(BoundFieldAccess fieldAccess, Symbol consumerOpt) 80private void CheckFieldAsReceiver(BoundFieldAccess fieldAccess) 99CheckFieldAsReceiver((BoundFieldAccess)receiverOpt); 106internal static bool IsNonAgileFieldAccess(BoundFieldAccess fieldAccess, CSharpCompilation compilation) 133private static bool IsInstanceFieldAccessWithNonThisReceiver(BoundFieldAccess fieldAccess) 208var field1 = (BoundFieldAccess)expr1; 209var field2 = (BoundFieldAccess)expr2; 930public override BoundNode VisitFieldAccess(BoundFieldAccess node)
Lowering\LocalRewriter\DelegateCacheRewriter.cs (1)
54var boundCacheField = _factory.Field(receiver: null, cacheField);
Lowering\LocalRewriter\LocalRewriter.cs (4)
318var result = new BoundFieldAccess(node.Syntax, new BoundThisReference(node.Syntax, primaryCtor.ContainingType), field, ConstantValue.NotAvailable, LookupResultKind.Viable, node.Type); 924var lhsField = ((BoundFieldAccess)assignment.Left).FieldSymbol; 1067var fieldAccess = (BoundFieldAccess)expr;
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
639var fieldAccess = (BoundFieldAccess)originalLHS;
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
241BoundFieldAccess fieldAccess = new BoundFieldAccess(
Lowering\LocalRewriter\LocalRewriter_Field.cs (2)
11public override BoundNode VisitFieldAccess(BoundFieldAccess node) 24BoundFieldAccess? oldNodeOpt = null)
Lowering\LocalRewriter\LocalRewriter_PointerElementAccess.cs (1)
22if (receiver is BoundFieldAccess fieldAccess && fieldAccess.FieldSymbol.IsFixedSizeBuffer)
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
757if (expr is BoundFieldAccess fieldAccess)
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
496return !((BoundFieldAccess)expression).FieldSymbol.IsStatic;
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
646var callSiteFieldAccess = _factory.Field(null, callSiteField);
Lowering\MethodToClassRewriter.cs (1)
552public override BoundNode VisitFieldAccess(BoundFieldAccess node)
Lowering\SpillSequenceSpiller.cs (7)
405var field = (BoundFieldAccess)expression; 880var field = (BoundFieldAccess)left; 917BoundExpression fieldWithSpilledReceiver(BoundFieldAccess field, ref BoundSpillSequenceBuilder leftBuilder, bool isAssignmentTarget) 948else if (field.ReceiverOpt is BoundFieldAccess receiverField) 1212public override BoundNode VisitFieldAccess(BoundFieldAccess node)
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
242case BoundFieldAccess { FieldSymbol: { IsStatic: false, ContainingType: { IsValueType: true } }, ReceiverOpt: BoundExpression receiver }: 293public override BoundNode VisitFieldAccess(BoundFieldAccess node)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (3)
601var field = (BoundFieldAccess)expr; 715var replacement = F.Field(F.This(), hoistedField);
Lowering\SyntheticBoundNodeFactory.cs (2)
241public BoundFieldAccess Field(BoundExpression? receiver, FieldSymbol f) 246public BoundFieldAccess InstanceField(FieldSymbol f)
Operations\CSharpOperationFactory.cs (2)
46return CreateBoundFieldAccessOperation((BoundFieldAccess)boundNode); 572internal IOperation CreateBoundFieldAccessOperation(BoundFieldAccess boundFieldAccess, bool createDeclaration = true)
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (4)
56var itemFieldReference = f.Field(f.This(), itemField); 68var itemFieldReference = f.Field(f.This(), itemField); 80var moveNextCalledFieldReference = f.Field(f.This(), moveNextCalledField); 99var moveNextCalledFieldReference = f.Field(f.This(), moveNextCalledField);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (7)
475var fieldReference = f.Field(f.This(), field); 507var fieldReference = f.Field(f.This(), field); 559var fieldReference = f.Field(f.This(), field); 595var fieldReference = f.Field(f.This(), field); 652var fieldReference = f.Field(f.This(), field); 686var fieldReference = f.Field(f.This(), field); 736SyntheticBoundNodeFactory f, BoundFieldAccess fieldReference, BoundParameter parameterReference)