15 instantiations of BoundThisReference
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder_Expressions.cs (1)
2471return new BoundThisReference(node, thisTypeOpt ?? CreateErrorType(), hasErrors) { WasCompilerGenerated = wasCompilerGenerated };
Binder\Binder_Statements.cs (2)
3951BoundExpression receiver = new BoundThisReference(syntax, constructor.ContainingType) { WasCompilerGenerated = true }; 3996BoundExpression receiver = new BoundThisReference(syntax, constructor.ContainingType) { WasCompilerGenerated = true };
Compiler\MethodBodySynthesizer.cs (5)
40BoundExpression receiver = new BoundThisReference(syntax, constructor.ContainingType) { WasCompilerGenerated = true }; 96var thisReference = new BoundThisReference(syntax, submissionConstructor.ContainingType) { WasCompilerGenerated = true }; 184thisReference = new BoundThisReference(syntax, thisSymbol.Type) { WasCompilerGenerated = true }; 280field.IsStatic ? null : new BoundThisReference(syntax, accessor.ThisParameter.Type), 378new BoundThisReference(syntax, thisParameter.Type) { WasCompilerGenerated = true };
Generated\BoundNodes.xml.Generated.cs (1)
4396var result = new BoundThisReference(this.Syntax, type, this.HasErrors);
Lowering\ClosureConversion\ClosureConversion.cs (1)
599return new BoundThisReference(syntax, frameClass);
Lowering\InitializerRewriter.cs (1)
95new BoundThisReference(syntax, field.ContainingType);
Lowering\LocalRewriter\LocalRewriter.cs (1)
318var result = new BoundFieldAccess(node.Syntax, new BoundThisReference(node.Syntax, primaryCtor.ContainingType), field, ConstantValue.NotAvailable, LookupResultKind.Viable, node.Type);
Lowering\LocalRewriter\LocalRewriter_HostObjectMemberReference.cs (1)
19var thisReference = new BoundThisReference(syntax, _factory.CurrentType);
Lowering\LocalRewriter\LocalRewriter_PreviousSubmissionReference.cs (1)
23var thisReference = new BoundThisReference(syntax, _factory.CurrentType);
Lowering\SyntheticBoundNodeFactory.cs (1)
217return new BoundThisReference(Syntax, CurrentFunction.ThisParameter.Type) { WasCompilerGenerated = true };
50 references to BoundThisReference
Microsoft.CodeAnalysis.CSharp (50)
Binder\Binder.ValueChecks.cs (8)
859var isValueType = ((BoundThisReference)expr).Type.IsValueType; 1306if (parameter is BoundThisReference) 1354!CanModifyReadonlyField(fieldAccess.ReceiverOpt is BoundThisReference, fieldSymbol)) 1901if (!(receiver is BoundThisReference || receiver is BoundBaseReference)) 3403Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything)); 3729Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything)); 4073Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything)); 4765Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
Binder\Binder_Deconstruct.cs (1)
942BoundThisReference receiver = ThisReference(designation, this.ContainingType, hasErrors: false,
Binder\Binder_Expressions.cs (4)
2450private BoundThisReference BindThis(ThisExpressionSyntax node, BindingDiagnosticBag diagnostics) 2469private BoundThisReference ThisReference(SyntaxNode node, NamedTypeSymbol thisTypeOpt, bool hasErrors = false, bool wasCompilerGenerated = false) 10491case BoundThisReference { WasCompilerGenerated: true }: 10636case BoundThisReference { WasCompilerGenerated: true }:
BoundTree\BoundNode_Source.cs (1)
262case BoundThisReference thisReference:
BoundTree\BoundTreeVisitors.cs (1)
100return VisitThisReference(node as BoundThisReference, arg);
CodeGen\EmitExpression.cs (6)
168EmitThisReferenceExpression((BoundThisReference)expression); 806private void EmitThisReferenceExpression(BoundThisReference thisRef) 2872var left = (BoundThisReference)assignmentTarget; 3102EmitThisStore((BoundThisReference)expression); 3187private void EmitThisStore(BoundThisReference thisRef)
Compiler\MethodBodySynthesizer.cs (2)
96var thisReference = new BoundThisReference(syntax, submissionConstructor.ContainingType) { WasCompilerGenerated = true }; 376BoundThisReference fieldReceiver = eventSymbol.IsStatic ?
FlowAnalysis\AbstractFlowPass.cs (1)
2037public override BoundNode VisitThisReference(BoundThisReference node)
FlowAnalysis\DefiniteAssignment.cs (1)
2468public override BoundNode VisitThisReference(BoundThisReference node)
FlowAnalysis\NullableWalker.cs (1)
9911public override BoundNode? VisitThisReference(BoundThisReference node)
Generated\BoundNodes.xml.Generated.cs (10)
4392public BoundThisReference Update(TypeSymbol type) 4396var result = new BoundThisReference(this.Syntax, type, this.HasErrors); 9059return VisitThisReference((BoundThisReference)node, arg); 9417public virtual R VisitThisReference(BoundThisReference node, A arg) => this.DefaultVisit(node, arg); 9653public virtual BoundNode? VisitThisReference(BoundThisReference node) => this.DefaultVisit(node); 10229public override BoundNode? VisitThisReference(BoundThisReference node) => null; 11451public override BoundNode? VisitThisReference(BoundThisReference node) 13496public override BoundNode? VisitThisReference(BoundThisReference node) 13503BoundThisReference updatedNode = node.Update(infoAndType.Type!); 15958public override TreeDumperNode VisitThisReference(BoundThisReference node, object? arg) => new TreeDumperNode("thisReference", null, new TreeDumperNode[]
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
499public override BoundNode VisitThisReference(BoundThisReference node)
Lowering\ClosureConversion\ClosureConversion.cs (1)
830public override BoundNode VisitThisReference(BoundThisReference node)
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
165public override BoundNode VisitThisReference(BoundThisReference node)
Lowering\InitializerRewriter.cs (1)
94var boundReceiver = field.IsStatic ? null :
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
843return structThisCanChangeValueBetweenReads && ((BoundThisReference)expression).Type.IsStructType();
Lowering\LocalRewriter\LocalRewriter_HostObjectMemberReference.cs (1)
19var thisReference = new BoundThisReference(syntax, _factory.CurrentType);
Lowering\LocalRewriter\LocalRewriter_PreviousSubmissionReference.cs (1)
23var thisReference = new BoundThisReference(syntax, _factory.CurrentType);
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
304public override BoundNode VisitThisReference(BoundThisReference node) 398public override BoundNode VisitThisReference(BoundThisReference node)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
203var result = F.This(); 937public sealed override BoundNode VisitThisReference(BoundThisReference node)
Lowering\SyntheticBoundNodeFactory.cs (1)
214public BoundThisReference This()
Operations\CSharpOperationFactory.cs (2)
112return CreateBoundThisReferenceOperation((BoundThisReference)boundNode); 1310private IInstanceReferenceOperation CreateBoundThisReferenceOperation(BoundThisReference boundThisReference)