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