56 references to GetValEscape
Microsoft.CodeAnalysis.CSharp (56)
Binder\Binder.ValueChecks.cs (39)
1277
return
GetValEscape
(fieldAccess.ReceiverOpt, scopeOfTheContainingExpression);
1712
uint escapeScope =
GetValEscape
(data.Construction, scopeOfTheContainingExpression);
1719
uint argEscape =
GetValEscape
(argument, scopeOfTheContainingExpression);
1805
GetValEscape
(argument, scopeOfTheContainingExpression);
1824
escapeScope = Math.Max(escapeScope,
GetValEscape
(receiver, scopeOfTheContainingExpression));
1867
GetValEscape
(argument, scopeOfTheContainingExpression);
2450
escapeTo =
GetValEscape
(receiverOpt, scopeOfTheContainingExpression);
2480
escapeTo = Math.Min(escapeTo,
GetValEscape
(argument, scopeOfTheContainingExpression));
2493
inferredDestinationValEscape = Math.Max(inferredDestinationValEscape,
GetValEscape
(argument, scopeOfTheContainingExpression));
2545
var toArgEscape =
GetValEscape
(mixableArg.Argument, scopeOfTheContainingExpression);
2594
:
GetValEscape
(fromArg, scopeOfTheContainingExpression));
3456
valEscape =
GetValEscape
(element, scopeOfTheContainingExpression);
3538
return
GetValEscape
(placeholder.Receiver, placeholder.LocalScopeDepth);
3547
var consEscape =
GetValEscape
(conditional.Consequence, scopeOfTheContainingExpression);
3558
GetValEscape
(conditional.Alternative, scopeOfTheContainingExpression));
3563
return Math.Max(
GetValEscape
(coalescingOp.LeftOperand, scopeOfTheContainingExpression),
3564
GetValEscape
(coalescingOp.RightOperand, scopeOfTheContainingExpression));
3577
return
GetValEscape
(fieldAccess.ReceiverOpt, scopeOfTheContainingExpression);
3694
escape = Math.Max(escape,
GetValEscape
(initializerOpt, scopeOfTheContainingExpression));
3702
return Math.Max(
GetValEscape
(withExpression.Receiver, scopeOfTheContainingExpression),
3703
GetValEscape
(withExpression.InitializerExpression, scopeOfTheContainingExpression));
3706
return
GetValEscape
(((BoundUnaryOperator)expr).Operand, scopeOfTheContainingExpression);
3717
return
GetValEscape
(conversion.Operand, scopeOfTheContainingExpression);
3720
return
GetValEscape
(((BoundAssignmentOperator)expr).Right, scopeOfTheContainingExpression);
3723
return
GetValEscape
(((BoundIncrementOperator)expr).Operand, scopeOfTheContainingExpression);
3728
return Math.Max(
GetValEscape
(compound.Left, scopeOfTheContainingExpression),
3729
GetValEscape
(compound.Right, scopeOfTheContainingExpression));
3734
return Math.Max(
GetValEscape
(binary.Left, scopeOfTheContainingExpression),
3735
GetValEscape
(binary.Right, scopeOfTheContainingExpression));
3740
return Math.Max((range.LeftOperandOpt is { } left ?
GetValEscape
(left, scopeOfTheContainingExpression) : CallingMethodScope),
3741
(range.RightOperandOpt is { } right ?
GetValEscape
(right, scopeOfTheContainingExpression) : CallingMethodScope));
3746
return Math.Max(
GetValEscape
(uo.Left, scopeOfTheContainingExpression),
3747
GetValEscape
(uo.Right, scopeOfTheContainingExpression));
3750
return
GetValEscape
(((BoundQueryClause)expr).Value, scopeOfTheContainingExpression);
3753
return
GetValEscape
(((BoundRangeVariable)expr).Value, scopeOfTheContainingExpression);
3821
narrowestScope = Math.Max(narrowestScope,
GetValEscape
(element, scopeOfTheContainingExpression));
3837
:
GetValEscape
(assignment.Right, scopeOfTheContainingExpression);
3846
result = Math.Max(result,
GetValEscape
(expression, scopeOfTheContainingExpression));
3858
result = Math.Max(result,
GetValEscape
(expression, scopeOfTheContainingExpression));
Binder\Binder_Operators.cs (2)
4308
uint whenTrueEscape =
GetValEscape
(trueExpr, currentScope);
4309
uint whenFalseEscape =
GetValEscape
(falseExpr, currentScope);
Binder\Binder_Statements.cs (3)
1579
leftEscape =
GetValEscape
(op1, _localScopeDepth);
1580
rightEscape =
GetValEscape
(op2, _localScopeDepth);
1603
var leftEscape =
GetValEscape
(op1, _localScopeDepth);
Binder\RefSafetyAnalysis.cs (12)
305
?
GetValEscape
(expr, _localScopeDepth)
347
using var _2 = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
354
using var _ = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
449
valEscapeScope =
GetValEscape
(initializer, _localScopeDepth);
494
using var _ = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
620
valEscapeScope = receiver.GetRefKind().IsWritableReference() ? GetRefEscape(receiver, _localScopeDepth) :
GetValEscape
(receiver, _localScopeDepth);
626
valEscapeScope =
GetValEscape
(arguments[argIndex], _localScopeDepth);
707
GetAwaitableInstancePlaceholders(placeholders, node.AwaitableInfo,
GetValEscape
(node.Expression, _localScopeDepth));
759
placeholders.Add((conversion.DeconstructionInfo.InputPlaceholder,
GetValEscape
(right, _localScopeDepth)));
772
?
GetValEscape
(variable.Expression, _localScopeDepth)
831
: new DeconstructionVariable(expr,
GetValEscape
(expr, _localScopeDepth), null);
856
uint collectionEscape =
GetValEscape
(node.Expression, _localScopeDepth);