16 instantiations of BoundThisReference
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder_Expressions.cs (1)
2276return new BoundThisReference(node, thisTypeOpt ?? CreateErrorType(), hasErrors) { WasCompilerGenerated = wasCompilerGenerated };
Binder\Binder_Statements.cs (2)
3858BoundExpression receiver = new BoundThisReference(syntax, constructor.ContainingType) { WasCompilerGenerated = true }; 3902BoundExpression receiver = new BoundThisReference(syntax, constructor.ContainingType) { WasCompilerGenerated = true };
Compiler\MethodBodySynthesizer.cs (5)
40BoundExpression receiver = new BoundThisReference(syntax, constructor.ContainingType) { WasCompilerGenerated = true }; 95var thisReference = new BoundThisReference(syntax, submissionConstructor.ContainingType) { WasCompilerGenerated = true }; 183thisReference = new BoundThisReference(syntax, thisSymbol.Type) { WasCompilerGenerated = true }; 279field.IsStatic ? null : new BoundThisReference(syntax, accessor.ThisParameter.Type), 375new BoundThisReference(syntax, thisParameter.Type) { WasCompilerGenerated = true };
Generated\BoundNodes.xml.Generated.cs (1)
4285var result = new BoundThisReference(this.Syntax, type, this.HasErrors);
Lowering\ClosureConversion\ClosureConversion.cs (1)
591return new BoundThisReference(syntax, frameClass);
Lowering\InitializerRewriter.cs (1)
95new BoundThisReference(syntax, field.ContainingType);
Lowering\LocalRewriter\LocalRewriter.cs (1)
280var 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)
264return new BoundThisReference(Syntax, CurrentFunction.ThisParameter.Type) { WasCompilerGenerated = true };
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
CompilationContext.cs (1)
657var expression = new BoundThisReference(syntax, GetNonDisplayClassContainer(container.SubstitutedSourceType));
51 references to BoundThisReference
Microsoft.CodeAnalysis.CSharp (49)
Binder\Binder.ValueChecks.cs (8)
689var isValueType = ((BoundThisReference)expr).Type.IsValueType; 1088if (parameter is BoundThisReference) 1136!CanModifyReadonlyField(fieldAccess.ReceiverOpt is BoundThisReference, fieldSymbol)) 1668if (!(receiver is BoundThisReference || receiver is BoundBaseReference)) 2971Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything)); 3225Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything)); 3496Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything)); 3903Debug.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 (3)
2255private BoundThisReference BindThis(ThisExpressionSyntax node, BindingDiagnosticBag diagnostics) 2274private BoundThisReference ThisReference(SyntaxNode node, NamedTypeSymbol thisTypeOpt, bool hasErrors = false, bool wasCompilerGenerated = false) 9120case BoundThisReference { WasCompilerGenerated: true }:
BoundTree\BoundNode_Source.cs (1)
247case BoundThisReference thisReference:
BoundTree\BoundTreeVisitors.cs (1)
100return VisitThisReference(node as BoundThisReference, arg);
CodeGen\EmitExpression.cs (6)
163EmitThisReferenceExpression((BoundThisReference)expression); 792private void EmitThisReferenceExpression(BoundThisReference thisRef) 2654var left = (BoundThisReference)assignmentTarget; 2884EmitThisStore((BoundThisReference)expression); 2969private void EmitThisStore(BoundThisReference thisRef)
Compiler\MethodBodySynthesizer.cs (2)
95var thisReference = new BoundThisReference(syntax, submissionConstructor.ContainingType) { WasCompilerGenerated = true }; 373BoundThisReference fieldReceiver = eventSymbol.IsStatic ?
FlowAnalysis\AbstractFlowPass.cs (1)
1896public override BoundNode VisitThisReference(BoundThisReference node)
FlowAnalysis\DefiniteAssignment.cs (1)
2304public override BoundNode VisitThisReference(BoundThisReference node)
FlowAnalysis\NullableWalker.cs (1)
9011public override BoundNode? VisitThisReference(BoundThisReference node)
Generated\BoundNodes.xml.Generated.cs (10)
4281public BoundThisReference Update(TypeSymbol type) 4285var result = new BoundThisReference(this.Syntax, type, this.HasErrors); 8735return VisitThisReference((BoundThisReference)node, arg); 9080public virtual R VisitThisReference(BoundThisReference node, A arg) => this.DefaultVisit(node, arg); 9308public virtual BoundNode? VisitThisReference(BoundThisReference node) => this.DefaultVisit(node); 9872public override BoundNode? VisitThisReference(BoundThisReference node) => null; 11056public override BoundNode? VisitThisReference(BoundThisReference node) 13029public override BoundNode? VisitThisReference(BoundThisReference node) 13036BoundThisReference updatedNode = node.Update(infoAndType.Type!); 15398public override TreeDumperNode VisitThisReference(BoundThisReference node, object? arg) => new TreeDumperNode("thisReference", null, new TreeDumperNode[]
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
480public override BoundNode VisitThisReference(BoundThisReference node)
Lowering\ClosureConversion\ClosureConversion.cs (1)
815public override BoundNode VisitThisReference(BoundThisReference node)
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
154public override BoundNode VisitThisReference(BoundThisReference node)
Lowering\InitializerRewriter.cs (1)
94var boundReceiver = field.IsStatic ? null :
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
828return 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)
278public override BoundNode VisitThisReference(BoundThisReference node) 372public override BoundNode VisitThisReference(BoundThisReference node)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
203var result = F.This(); 918public sealed override BoundNode VisitThisReference(BoundThisReference node)
Lowering\SyntheticBoundNodeFactory.cs (1)
261public BoundThisReference This()
Operations\CSharpOperationFactory.cs (2)
110return CreateBoundThisReferenceOperation((BoundThisReference)boundNode); 1243private IInstanceReferenceOperation CreateBoundThisReferenceOperation(BoundThisReference boundThisReference)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (2)
CompilationContext.cs (1)
657var expression = new BoundThisReference(syntax, GetNonDisplayClassContainer(container.SubstitutedSourceType));
Rewriters\CapturedVariableRewriter.cs (1)
75public override BoundNode VisitThisReference(BoundThisReference node)