15 instantiations of BoundThisReference
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder_Expressions.cs (1)
2598
return new
BoundThisReference
(node, thisTypeOpt ?? CreateErrorType(), hasErrors) { WasCompilerGenerated = wasCompilerGenerated };
Binder\Binder_Statements.cs (2)
4066
BoundExpression receiver = new
BoundThisReference
(syntax, constructor.ContainingType) { WasCompilerGenerated = true };
4112
BoundExpression receiver = new
BoundThisReference
(syntax, constructor.ContainingType) { WasCompilerGenerated = true };
Compiler\MethodBodySynthesizer.cs (5)
40
BoundExpression receiver = new
BoundThisReference
(syntax, constructor.ContainingType) { WasCompilerGenerated = true };
96
var thisReference = new
BoundThisReference
(syntax, submissionConstructor.ContainingType) { WasCompilerGenerated = true };
186
thisReference = new
BoundThisReference
(syntax, thisSymbol.Type) { WasCompilerGenerated = true };
282
field.IsStatic || field.ContainingSymbol is NamedTypeSymbol { IsExtension: true } ? null : new
BoundThisReference
(syntax, accessor.ThisParameter.Type),
380
new
BoundThisReference
(syntax, thisParameter.Type) { WasCompilerGenerated = true };
Generated\BoundNodes.xml.Generated.cs (1)
4438
var result = new
BoundThisReference
(this.Syntax, type, this.HasErrors);
Lowering\ClosureConversion\ClosureConversion.cs (1)
614
return new
BoundThisReference
(syntax, frameClass);
Lowering\InitializerRewriter.cs (1)
95
new
BoundThisReference
(syntax, field.ContainingType);
Lowering\LocalRewriter\LocalRewriter_HostObjectMemberReference.cs (1)
19
var thisReference = new
BoundThisReference
(syntax, _factory.CurrentType);
Lowering\LocalRewriter\LocalRewriter_PreviousSubmissionReference.cs (1)
23
var thisReference = new
BoundThisReference
(syntax, _factory.CurrentType);
Lowering\LocalRewriter\LocalRewriter.cs (1)
323
var result = new BoundFieldAccess(node.Syntax, new
BoundThisReference
(node.Syntax, primaryCtor.ContainingType), field, ConstantValue.NotAvailable, LookupResultKind.Viable, node.Type);
Lowering\SyntheticBoundNodeFactory.cs (1)
230
return new
BoundThisReference
(Syntax, CurrentFunction.ThisParameter.Type) { WasCompilerGenerated = true };
54 references to BoundThisReference
Microsoft.CodeAnalysis.CSharp (54)
Binder\Binder_Deconstruct.cs (1)
947
BoundThisReference
receiver = ThisReference(designation, this.ContainingType, hasErrors: false,
Binder\Binder_Expressions.cs (5)
1524
var
implicitReceiver = field.IsStatic ? null : ThisReference(node, field.ContainingType, wasCompilerGenerated: true);
2577
private
BoundThisReference
BindThis(ThisExpressionSyntax node, BindingDiagnosticBag diagnostics)
2596
private
BoundThisReference
ThisReference(SyntaxNode node, NamedTypeSymbol thisTypeOpt, bool hasErrors = false, bool wasCompilerGenerated = false)
11835
case
BoundThisReference
{ WasCompilerGenerated: true }:
12030
case
BoundThisReference
{ WasCompilerGenerated: true }:
Binder\Binder.ValueChecks.cs (8)
1083
var isValueType = ((
BoundThisReference
)expr).Type.IsValueType;
1561
if (parameter is
BoundThisReference
)
1609
!CanModifyReadonlyField(fieldAccess.ReceiverOpt is
BoundThisReference
, fieldSymbol))
2175
if (!(receiver is
BoundThisReference
|| receiver is BoundBaseReference))
3742
Debug.Assert(thisParam.Type.Equals(((
BoundThisReference
)expr).Type, TypeCompareKind.ConsiderEverything));
4041
Debug.Assert(thisParam.Type.Equals(((
BoundThisReference
)expr).Type, TypeCompareKind.ConsiderEverything));
4353
Debug.Assert(thisParam.Type.Equals(((
BoundThisReference
)expr).Type, TypeCompareKind.ConsiderEverything));
5054
Debug.Assert(thisParam.Type.Equals(((
BoundThisReference
)expr).Type, TypeCompareKind.ConsiderEverything));
BoundTree\BoundTreeVisitors.cs (1)
100
return VisitThisReference(node as
BoundThisReference
, arg);
CodeGen\EmitAddress.cs (1)
616
if (receiver is
BoundThisReference
&& receiver.Type.IsDisplayClassType())
CodeGen\EmitExpression.cs (6)
163
EmitThisReferenceExpression((
BoundThisReference
)expression, used);
829
private void EmitThisReferenceExpression(
BoundThisReference
thisRef, bool used)
3020
var
left = (
BoundThisReference
)assignmentTarget;
3265
EmitThisStore((
BoundThisReference
)expression);
3356
private void EmitThisStore(
BoundThisReference
thisRef)
Compiler\MethodBodySynthesizer.cs (2)
96
var
thisReference = new BoundThisReference(syntax, submissionConstructor.ContainingType) { WasCompilerGenerated = true };
378
BoundThisReference
fieldReceiver = eventSymbol.IsStatic || eventSymbol.ContainingSymbol is NamedTypeSymbol { IsExtension: true } ?
FlowAnalysis\AbstractFlowPass.cs (1)
2054
public override BoundNode VisitThisReference(
BoundThisReference
node)
FlowAnalysis\DefiniteAssignment.cs (1)
2466
public override BoundNode VisitThisReference(
BoundThisReference
node)
FlowAnalysis\NullableWalker.cs (1)
11289
public override BoundNode? VisitThisReference(
BoundThisReference
node)
Generated\BoundNodes.xml.Generated.cs (10)
4434
public
BoundThisReference
Update(TypeSymbol type)
4438
var
result = new BoundThisReference(this.Syntax, type, this.HasErrors);
9308
return VisitThisReference((
BoundThisReference
)node, arg);
9675
public virtual R VisitThisReference(
BoundThisReference
node, A arg) => this.DefaultVisit(node, arg);
9916
public virtual BoundNode? VisitThisReference(
BoundThisReference
node) => this.DefaultVisit(node);
10510
public override BoundNode? VisitThisReference(
BoundThisReference
node) => null;
11842
public override BoundNode? VisitThisReference(
BoundThisReference
node)
13993
public override BoundNode? VisitThisReference(
BoundThisReference
node)
14000
BoundThisReference
updatedNode = node.Update(infoAndType.Type!);
16488
public override TreeDumperNode VisitThisReference(
BoundThisReference
node, object? arg) => new TreeDumperNode("thisReference", null, new TreeDumperNode[]
Lowering\AsyncRewriter\RuntimeAsyncRewriter.cs (1)
406
public override BoundNode? VisitThisReference(
BoundThisReference
node)
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
499
public override BoundNode VisitThisReference(
BoundThisReference
node)
Lowering\ClosureConversion\ClosureConversion.cs (1)
845
public override BoundNode VisitThisReference(
BoundThisReference
node)
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
165
public override BoundNode VisitThisReference(
BoundThisReference
node)
Lowering\ExtensionMethodBodyRewriter.cs (1)
82
public override BoundNode? VisitThisReference(
BoundThisReference
node)
Lowering\InitializerRewriter.cs (1)
94
var
boundReceiver = field.IsStatic ? null :
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
1007
return structThisCanChangeValueBetweenReads && ((
BoundThisReference
)expression).Type.IsStructType();
Lowering\LocalRewriter\LocalRewriter_HostObjectMemberReference.cs (1)
19
var
thisReference = new BoundThisReference(syntax, _factory.CurrentType);
Lowering\LocalRewriter\LocalRewriter_PreviousSubmissionReference.cs (1)
23
var
thisReference = new BoundThisReference(syntax, _factory.CurrentType);
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
325
public override BoundNode VisitThisReference(
BoundThisReference
node)
419
public override BoundNode VisitThisReference(
BoundThisReference
node)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
212
var
result = F.This();
808
public sealed override BoundNode VisitThisReference(
BoundThisReference
node)
Lowering\SyntheticBoundNodeFactory.cs (1)
227
public
BoundThisReference
This()
Operations\CSharpOperationFactory.cs (2)
111
return CreateBoundThisReferenceOperation((
BoundThisReference
)boundNode);
1404
private IInstanceReferenceOperation CreateBoundThisReferenceOperation(
BoundThisReference
boundThisReference)
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
549
BoundThisReference
thisRef = f.This();