15 instantiations of BoundThisReference
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder_Expressions.cs (1)
2471
return new
BoundThisReference
(node, thisTypeOpt ?? CreateErrorType(), hasErrors) { WasCompilerGenerated = wasCompilerGenerated };
Binder\Binder_Statements.cs (2)
3951
BoundExpression receiver = new
BoundThisReference
(syntax, constructor.ContainingType) { WasCompilerGenerated = true };
3996
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)
4396
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)
859
var isValueType = ((
BoundThisReference
)expr).Type.IsValueType;
1306
if (parameter is
BoundThisReference
)
1354
!CanModifyReadonlyField(fieldAccess.ReceiverOpt is
BoundThisReference
, fieldSymbol))
1901
if (!(receiver is
BoundThisReference
|| receiver is BoundBaseReference))
3403
Debug.Assert(thisParam.Type.Equals(((
BoundThisReference
)expr).Type, TypeCompareKind.ConsiderEverything));
3729
Debug.Assert(thisParam.Type.Equals(((
BoundThisReference
)expr).Type, TypeCompareKind.ConsiderEverything));
4073
Debug.Assert(thisParam.Type.Equals(((
BoundThisReference
)expr).Type, TypeCompareKind.ConsiderEverything));
4765
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)
2450
private
BoundThisReference
BindThis(ThisExpressionSyntax node, BindingDiagnosticBag diagnostics)
2469
private
BoundThisReference
ThisReference(SyntaxNode node, NamedTypeSymbol thisTypeOpt, bool hasErrors = false, bool wasCompilerGenerated = false)
10491
case
BoundThisReference
{ WasCompilerGenerated: true }:
10636
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)
9911
public override BoundNode? VisitThisReference(
BoundThisReference
node)
Generated\BoundNodes.xml.Generated.cs (10)
4392
public
BoundThisReference
Update(TypeSymbol type)
4396
var
result = new BoundThisReference(this.Syntax, type, this.HasErrors);
9059
return VisitThisReference((
BoundThisReference
)node, arg);
9417
public virtual R VisitThisReference(
BoundThisReference
node, A arg) => this.DefaultVisit(node, arg);
9653
public virtual BoundNode? VisitThisReference(
BoundThisReference
node) => this.DefaultVisit(node);
10229
public override BoundNode? VisitThisReference(
BoundThisReference
node) => null;
11451
public override BoundNode? VisitThisReference(
BoundThisReference
node)
13496
public override BoundNode? VisitThisReference(
BoundThisReference
node)
13503
BoundThisReference
updatedNode = node.Update(infoAndType.Type!);
15958
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)
203
var
result = F.This();
937
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)