15 instantiations of BoundThisReference
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder_Expressions.cs (1)
2474return new BoundThisReference(node, thisTypeOpt ?? CreateErrorType(), hasErrors) { WasCompilerGenerated = wasCompilerGenerated };
Binder\Binder_Statements.cs (2)
3954BoundExpression 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)
4397var 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)
836var isValueType = ((BoundThisReference)expr).Type.IsValueType; 1283if (parameter is BoundThisReference) 1331!CanModifyReadonlyField(fieldAccess.ReceiverOpt is BoundThisReference, fieldSymbol)) 1878if (!(receiver is BoundThisReference || receiver is BoundBaseReference)) 3380Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything)); 3706Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything)); 4050Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything)); 4747Debug.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)
2453private BoundThisReference BindThis(ThisExpressionSyntax node, BindingDiagnosticBag diagnostics) 2472private BoundThisReference ThisReference(SyntaxNode node, NamedTypeSymbol thisTypeOpt, bool hasErrors = false, bool wasCompilerGenerated = false) 10492case BoundThisReference { WasCompilerGenerated: true }: 10637case 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)
9969public override BoundNode? VisitThisReference(BoundThisReference node)
Generated\BoundNodes.xml.Generated.cs (10)
4393public BoundThisReference Update(TypeSymbol type) 4397var result = new BoundThisReference(this.Syntax, type, this.HasErrors); 9096return VisitThisReference((BoundThisReference)node, arg); 9454public virtual R VisitThisReference(BoundThisReference node, A arg) => this.DefaultVisit(node, arg); 9690public virtual BoundNode? VisitThisReference(BoundThisReference node) => this.DefaultVisit(node); 10266public override BoundNode? VisitThisReference(BoundThisReference node) => null; 11488public override BoundNode? VisitThisReference(BoundThisReference node) 13533public override BoundNode? VisitThisReference(BoundThisReference node) 13540BoundThisReference updatedNode = node.Update(infoAndType.Type!); 15995public 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)
208var result = F.This(); 955public 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)