59 references to GetValEscape
Microsoft.CodeAnalysis.CSharp (59)
Binder\Binder.ValueChecks.cs (40)
1521
return
GetValEscape
(fieldAccess.ReceiverOpt, localScopeDepth);
1963
SafeContext escapeScope =
GetValEscape
(data.Construction, localScopeDepth);
1973
SafeContext argEscape =
GetValEscape
(argument, localScopeDepth);
2060
(false, false) =>
GetValEscape
(argument, localScopeDepth),
2080
escapeScope = escapeScope.Intersect(
GetValEscape
(receiver, localScopeDepth));
2128
GetValEscape
(argument, localScopeDepth);
2935
escapeTo = escapeTo.Union(
GetValEscape
(argument, localScopeDepth));
2948
inferredDestinationValEscape = inferredDestinationValEscape.Intersect(
GetValEscape
(argument, localScopeDepth));
3004
var toArgEscape =
GetValEscape
(mixableArg.Argument, localScopeDepth);
3048
:
GetValEscape
(fromArg, localScopeDepth));
4129
valEscape =
GetValEscape
(element, localScopeDepth);
4215
return
GetValEscape
(placeholder.Receiver, placeholder.LocalScopeDepth);
4224
var consEscape =
GetValEscape
(conditional.Consequence, localScopeDepth);
4234
return consEscape.Intersect(
GetValEscape
(conditional.Alternative, localScopeDepth));
4239
return
GetValEscape
(coalescingOp.LeftOperand, localScopeDepth)
4240
.Intersect(
GetValEscape
(coalescingOp.RightOperand, localScopeDepth));
4253
return
GetValEscape
(fieldAccess.ReceiverOpt, localScopeDepth);
4398
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4413
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4422
return
GetValEscape
(withExpression.Receiver, localScopeDepth)
4423
.Intersect(
GetValEscape
(withExpression.InitializerExpression, localScopeDepth));
4441
return
GetValEscape
(unaryOperator.Operand, localScopeDepth);
4494
return
GetValEscape
(conversion.Operand, localScopeDepth);
4501
return
GetValEscape
(((BoundAssignmentOperator)expr).Right, localScopeDepth);
4504
return
GetValEscape
(((BoundNullCoalescingAssignmentOperator)expr).RightOperand, localScopeDepth);
4532
return
GetValEscape
(increment.Operand, localScopeDepth);
4556
return
GetValEscape
(compound.Left, localScopeDepth);
4560
return
GetValEscape
(compound.Left, localScopeDepth)
4561
.Intersect(
GetValEscape
(compound.Right, localScopeDepth));
4580
return
GetValEscape
(binary.Left, localScopeDepth)
4581
.Intersect(
GetValEscape
(binary.Right, localScopeDepth));
4586
return (range.LeftOperandOpt is { } left ?
GetValEscape
(left, localScopeDepth) : SafeContext.CallingMethod)
4587
.Intersect(range.RightOperandOpt is { } right ?
GetValEscape
(right, localScopeDepth) : SafeContext.CallingMethod);
4604
return
GetValEscape
(((BoundQueryClause)expr).Value, localScopeDepth);
4607
return
GetValEscape
(((BoundRangeVariable)expr).Value, localScopeDepth);
4725
narrowestScope = narrowestScope.Intersect(
GetValEscape
(element, localScopeDepth));
4757
:
GetValEscape
(assignment.Right, localScopeDepth);
4775
result =
GetValEscape
(expr, localScopeDepth);
4825
:
GetValEscape
(escapeValue.Argument, localScopeDepth);
4855
result = result.Intersect(
GetValEscape
(expression, localScopeDepth));
Binder\Binder_Operators.cs (2)
5807
SafeContext whenTrueEscape =
GetValEscape
(trueExpr, currentScope);
5808
SafeContext whenFalseEscape =
GetValEscape
(falseExpr, currentScope);
Binder\Binder_Statements.cs (3)
1584
leftEscape =
GetValEscape
(op1, _localScopeDepth);
1585
rightEscape =
GetValEscape
(op2, _localScopeDepth);
1609
var leftEscape =
GetValEscape
(op1, _localScopeDepth);
Binder\RefSafetyAnalysis.cs (14)
350
?
GetValEscape
(expr, _localScopeDepth)
395
using var _2 = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
404
using var _ = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
505
valEscapeScope =
GetValEscape
(initializer, _localScopeDepth);
593
using var _ = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
762
valEscapeScope = receiver.GetRefKind().IsWritableReference() ? GetRefEscape(receiver, _localScopeDepth) :
GetValEscape
(receiver, _localScopeDepth);
775
valEscapeScope =
GetValEscape
(arguments[argIndex], _localScopeDepth);
854
var escapeFrom =
GetValEscape
(node.InitializerExpressionOpt, _localScopeDepth);
880
if (!escapeFrom.IsConvertibleTo(
GetValEscape
(argument, _localScopeDepth)))
950
GetAwaitableInstancePlaceholders(placeholders, node.AwaitableInfo,
GetValEscape
(node.Expression, _localScopeDepth));
1011
placeholders.Add((conversion.DeconstructionInfo.InputPlaceholder,
GetValEscape
(right, _localScopeDepth)));
1024
?
GetValEscape
(variable.Expression, _localScopeDepth)
1084
: new DeconstructionVariable(expr,
GetValEscape
(expr, _localScopeDepth), null);
1136
collectionEscape =
GetValEscape
(node.Expression, _localScopeDepth);