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));
4127
valEscape =
GetValEscape
(element, localScopeDepth);
4213
return
GetValEscape
(placeholder.Receiver, placeholder.LocalScopeDepth);
4222
var consEscape =
GetValEscape
(conditional.Consequence, localScopeDepth);
4232
return consEscape.Intersect(
GetValEscape
(conditional.Alternative, localScopeDepth));
4237
return
GetValEscape
(coalescingOp.LeftOperand, localScopeDepth)
4238
.Intersect(
GetValEscape
(coalescingOp.RightOperand, localScopeDepth));
4251
return
GetValEscape
(fieldAccess.ReceiverOpt, localScopeDepth);
4396
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4411
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4420
return
GetValEscape
(withExpression.Receiver, localScopeDepth)
4421
.Intersect(
GetValEscape
(withExpression.InitializerExpression, localScopeDepth));
4439
return
GetValEscape
(unaryOperator.Operand, localScopeDepth);
4492
return
GetValEscape
(conversion.Operand, localScopeDepth);
4499
return
GetValEscape
(((BoundAssignmentOperator)expr).Right, localScopeDepth);
4502
return
GetValEscape
(((BoundNullCoalescingAssignmentOperator)expr).RightOperand, localScopeDepth);
4530
return
GetValEscape
(increment.Operand, localScopeDepth);
4554
return
GetValEscape
(compound.Left, localScopeDepth);
4558
return
GetValEscape
(compound.Left, localScopeDepth)
4559
.Intersect(
GetValEscape
(compound.Right, localScopeDepth));
4578
return
GetValEscape
(binary.Left, localScopeDepth)
4579
.Intersect(
GetValEscape
(binary.Right, localScopeDepth));
4584
return (range.LeftOperandOpt is { } left ?
GetValEscape
(left, localScopeDepth) : SafeContext.CallingMethod)
4585
.Intersect(range.RightOperandOpt is { } right ?
GetValEscape
(right, localScopeDepth) : SafeContext.CallingMethod);
4602
return
GetValEscape
(((BoundQueryClause)expr).Value, localScopeDepth);
4605
return
GetValEscape
(((BoundRangeVariable)expr).Value, localScopeDepth);
4723
narrowestScope = narrowestScope.Intersect(
GetValEscape
(element, localScopeDepth));
4755
:
GetValEscape
(assignment.Right, localScopeDepth);
4773
result =
GetValEscape
(expr, localScopeDepth);
4823
:
GetValEscape
(escapeValue.Argument, localScopeDepth);
4853
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));
761
valEscapeScope = receiver.GetRefKind().IsWritableReference() ? GetRefEscape(receiver, _localScopeDepth) :
GetValEscape
(receiver, _localScopeDepth);
774
valEscapeScope =
GetValEscape
(arguments[argIndex], _localScopeDepth);
853
var escapeFrom =
GetValEscape
(node.InitializerExpressionOpt, _localScopeDepth);
879
if (!escapeFrom.IsConvertibleTo(
GetValEscape
(argument, _localScopeDepth)))
949
GetAwaitableInstancePlaceholders(placeholders, node.AwaitableInfo,
GetValEscape
(node.Expression, _localScopeDepth));
1010
placeholders.Add((conversion.DeconstructionInfo.InputPlaceholder,
GetValEscape
(right, _localScopeDepth)));
1023
?
GetValEscape
(variable.Expression, _localScopeDepth)
1083
: new DeconstructionVariable(expr,
GetValEscape
(expr, _localScopeDepth), null);
1135
collectionEscape =
GetValEscape
(node.Expression, _localScopeDepth);