15 instantiations of BoundThisReference
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder_Expressions.cs (1)
2474
return new
BoundThisReference
(node, thisTypeOpt ?? CreateErrorType(), hasErrors) { WasCompilerGenerated = wasCompilerGenerated };
Binder\Binder_Statements.cs (2)
3954
BoundExpression receiver = new
BoundThisReference
(syntax, constructor.ContainingType) { WasCompilerGenerated = true };
3999
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 };
184
thisReference = new
BoundThisReference
(syntax, thisSymbol.Type) { WasCompilerGenerated = true };
280
field.IsStatic ? null : new
BoundThisReference
(syntax, accessor.ThisParameter.Type),
378
new
BoundThisReference
(syntax, thisParameter.Type) { WasCompilerGenerated = true };
Generated\BoundNodes.xml.Generated.cs (1)
4397
var result = new
BoundThisReference
(this.Syntax, type, this.HasErrors);
Lowering\ClosureConversion\ClosureConversion.cs (1)
599
return new
BoundThisReference
(syntax, frameClass);
Lowering\InitializerRewriter.cs (1)
95
new
BoundThisReference
(syntax, field.ContainingType);
Lowering\LocalRewriter\LocalRewriter.cs (1)
318
var result = new BoundFieldAccess(node.Syntax, new
BoundThisReference
(node.Syntax, primaryCtor.ContainingType), field, ConstantValue.NotAvailable, LookupResultKind.Viable, node.Type);
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\SyntheticBoundNodeFactory.cs (1)
217
return new
BoundThisReference
(Syntax, CurrentFunction.ThisParameter.Type) { WasCompilerGenerated = true };
50 references to BoundThisReference
Microsoft.CodeAnalysis.CSharp (50)
Binder\Binder.ValueChecks.cs (8)
836
var isValueType = ((
BoundThisReference
)expr).Type.IsValueType;
1283
if (parameter is
BoundThisReference
)
1331
!CanModifyReadonlyField(fieldAccess.ReceiverOpt is
BoundThisReference
, fieldSymbol))
1878
if (!(receiver is
BoundThisReference
|| receiver is BoundBaseReference))
3380
Debug.Assert(thisParam.Type.Equals(((
BoundThisReference
)expr).Type, TypeCompareKind.ConsiderEverything));
3706
Debug.Assert(thisParam.Type.Equals(((
BoundThisReference
)expr).Type, TypeCompareKind.ConsiderEverything));
4050
Debug.Assert(thisParam.Type.Equals(((
BoundThisReference
)expr).Type, TypeCompareKind.ConsiderEverything));
4741
Debug.Assert(thisParam.Type.Equals(((
BoundThisReference
)expr).Type, TypeCompareKind.ConsiderEverything));
Binder\Binder_Deconstruct.cs (1)
942
BoundThisReference
receiver = ThisReference(designation, this.ContainingType, hasErrors: false,
Binder\Binder_Expressions.cs (4)
2453
private
BoundThisReference
BindThis(ThisExpressionSyntax node, BindingDiagnosticBag diagnostics)
2472
private
BoundThisReference
ThisReference(SyntaxNode node, NamedTypeSymbol thisTypeOpt, bool hasErrors = false, bool wasCompilerGenerated = false)
10494
case
BoundThisReference
{ WasCompilerGenerated: true }:
10639
case
BoundThisReference
{ WasCompilerGenerated: true }:
BoundTree\BoundNode_Source.cs (1)
262
case
BoundThisReference
thisReference:
BoundTree\BoundTreeVisitors.cs (1)
100
return VisitThisReference(node as
BoundThisReference
, arg);
CodeGen\EmitExpression.cs (6)
168
EmitThisReferenceExpression((
BoundThisReference
)expression);
806
private void EmitThisReferenceExpression(
BoundThisReference
thisRef)
2872
var
left = (
BoundThisReference
)assignmentTarget;
3102
EmitThisStore((
BoundThisReference
)expression);
3187
private void EmitThisStore(
BoundThisReference
thisRef)
Compiler\MethodBodySynthesizer.cs (2)
96
var
thisReference = new BoundThisReference(syntax, submissionConstructor.ContainingType) { WasCompilerGenerated = true };
376
BoundThisReference
fieldReceiver = eventSymbol.IsStatic ?
FlowAnalysis\AbstractFlowPass.cs (1)
2037
public override BoundNode VisitThisReference(
BoundThisReference
node)
FlowAnalysis\DefiniteAssignment.cs (1)
2468
public override BoundNode VisitThisReference(
BoundThisReference
node)
FlowAnalysis\NullableWalker.cs (1)
9908
public override BoundNode? VisitThisReference(
BoundThisReference
node)
Generated\BoundNodes.xml.Generated.cs (10)
4393
public
BoundThisReference
Update(TypeSymbol type)
4397
var
result = new BoundThisReference(this.Syntax, type, this.HasErrors);
9060
return VisitThisReference((
BoundThisReference
)node, arg);
9418
public virtual R VisitThisReference(
BoundThisReference
node, A arg) => this.DefaultVisit(node, arg);
9654
public virtual BoundNode? VisitThisReference(
BoundThisReference
node) => this.DefaultVisit(node);
10230
public override BoundNode? VisitThisReference(
BoundThisReference
node) => null;
11452
public override BoundNode? VisitThisReference(
BoundThisReference
node)
13497
public override BoundNode? VisitThisReference(
BoundThisReference
node)
13504
BoundThisReference
updatedNode = node.Update(infoAndType.Type!);
15959
public override TreeDumperNode VisitThisReference(
BoundThisReference
node, object? arg) => new TreeDumperNode("thisReference", null, new TreeDumperNode[]
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
499
public override BoundNode VisitThisReference(
BoundThisReference
node)
Lowering\ClosureConversion\ClosureConversion.cs (1)
830
public override BoundNode VisitThisReference(
BoundThisReference
node)
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
165
public override BoundNode VisitThisReference(
BoundThisReference
node)
Lowering\InitializerRewriter.cs (1)
94
var
boundReceiver = field.IsStatic ? null :
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
843
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)
304
public override BoundNode VisitThisReference(
BoundThisReference
node)
398
public override BoundNode VisitThisReference(
BoundThisReference
node)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
208
var
result = F.This();
955
public sealed override BoundNode VisitThisReference(
BoundThisReference
node)
Lowering\SyntheticBoundNodeFactory.cs (1)
214
public
BoundThisReference
This()
Operations\CSharpOperationFactory.cs (2)
112
return CreateBoundThisReferenceOperation((
BoundThisReference
)boundNode);
1310
private IInstanceReferenceOperation CreateBoundThisReferenceOperation(
BoundThisReference
boundThisReference)