61 references to GetValEscape
Microsoft.CodeAnalysis.CSharp (61)
Binder\Binder.ValueChecks.cs (42)
1745
return
GetValEscape
(fieldAccess.ReceiverOpt, localScopeDepth);
2187
SafeContext escapeScope =
GetValEscape
(data.Construction, localScopeDepth);
2264
(false, false) =>
GetValEscape
(argument, localScopeDepth),
2284
escapeScope = escapeScope.Intersect(
GetValEscape
(methodInvocationInfo.Receiver, localScopeDepth));
2320
GetValEscape
(argument, localScopeDepth);
2349
:
GetValEscape
(argument, localScopeDepth);
3189
escapeTo = escapeTo.Union(
GetValEscape
(argument, localScopeDepth));
3202
inferredDestinationValEscape = inferredDestinationValEscape.Intersect(
GetValEscape
(argument, localScopeDepth));
3246
var toArgEscape =
GetValEscape
(mixableArg.Argument, localScopeDepth);
3290
:
GetValEscape
(fromArg, localScopeDepth));
4309
valEscape =
GetValEscape
(element, localScopeDepth);
4395
return
GetValEscape
(placeholder.Receiver, placeholder.LocalScopeDepth);
4404
var consEscape =
GetValEscape
(conditional.Consequence, localScopeDepth);
4414
return consEscape.Intersect(
GetValEscape
(conditional.Alternative, localScopeDepth));
4419
return
GetValEscape
(coalescingOp.LeftOperand, localScopeDepth)
4420
.Intersect(
GetValEscape
(coalescingOp.RightOperand, localScopeDepth));
4433
return
GetValEscape
(fieldAccess.ReceiverOpt, localScopeDepth);
4540
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4555
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4564
return
GetValEscape
(withExpression.Receiver, localScopeDepth)
4565
.Intersect(
GetValEscape
(withExpression.InitializerExpression, localScopeDepth));
4577
return
GetValEscape
(unaryOperator.Operand, localScopeDepth);
4618
return
GetValEscape
(conversion.Operand, localScopeDepth);
4622
return
GetValEscape
(((BoundAssignmentOperator)expr).Right, localScopeDepth);
4626
return
GetValEscape
(nullCoalescingAssignment.LeftOperand, localScopeDepth)
4627
.Intersect(
GetValEscape
(nullCoalescingAssignment.RightOperand, localScopeDepth));
4649
return
GetValEscape
(increment.Operand, localScopeDepth);
4667
return
GetValEscape
(compound.Left, localScopeDepth);
4671
return
GetValEscape
(compound.Left, localScopeDepth)
4672
.Intersect(
GetValEscape
(compound.Right, localScopeDepth));
4685
return
GetValEscape
(binary.Left, localScopeDepth)
4686
.Intersect(
GetValEscape
(binary.Right, localScopeDepth));
4691
return (range.LeftOperandOpt is { } left ?
GetValEscape
(left, localScopeDepth) : SafeContext.CallingMethod)
4692
.Intersect(range.RightOperandOpt is { } right ?
GetValEscape
(right, localScopeDepth) : SafeContext.CallingMethod);
4703
return
GetValEscape
(((BoundQueryClause)expr).Value, localScopeDepth);
4706
return
GetValEscape
(((BoundRangeVariable)expr).Value, localScopeDepth);
4824
narrowestScope = narrowestScope.Intersect(
GetValEscape
(element, localScopeDepth));
4839
:
GetValEscape
(expr, localScopeDepth));
4870
:
GetValEscape
(assignment.Right, localScopeDepth);
4888
result =
GetValEscape
(expr, localScopeDepth);
4942
:
GetValEscape
(escapeValue.Argument, localScopeDepth);
4972
result = result.Intersect(
GetValEscape
(expression, localScopeDepth));
Binder\Binder_Operators.cs (2)
5882
SafeContext whenTrueEscape =
GetValEscape
(trueExpr, currentScope);
5883
SafeContext whenFalseEscape =
GetValEscape
(falseExpr, currentScope);
Binder\Binder_Statements.cs (3)
1584
leftEscape =
GetValEscape
(op1, _localScopeDepth);
1585
rightEscape =
GetValEscape
(op2, _localScopeDepth);
1624
var leftEscape =
GetValEscape
(op1, _localScopeDepth);
Binder\RefSafetyAnalysis.cs (14)
411
?
GetValEscape
(expr, _localScopeDepth)
456
using var _2 = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
465
using var _ = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
566
valEscapeScope =
GetValEscape
(initializer, _localScopeDepth);
637
using var _ = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
899
valEscapeScope = receiver.GetRefKind().IsWritableReference() ? GetRefEscape(receiver, _localScopeDepth) :
GetValEscape
(receiver, _localScopeDepth);
927
valEscapeScope =
GetValEscape
(arguments[argIndex], _localScopeDepth);
1005
var escapeFrom =
GetValEscape
(node.InitializerExpressionOpt, _localScopeDepth);
1025
if (!escapeFrom.IsConvertibleTo(
GetValEscape
(argument, _localScopeDepth)))
1085
GetAwaitableInstancePlaceholders(placeholders, node.AwaitableInfo,
GetValEscape
(node.Expression, _localScopeDepth));
1153
placeholders.Add((conversion.DeconstructionInfo.InputPlaceholder, SafeContextAndLocation.Create(
GetValEscape
(right, _localScopeDepth))));
1166
?
GetValEscape
(variable.Expression, _localScopeDepth)
1232
: new DeconstructionVariable(expr,
GetValEscape
(expr, _localScopeDepth), null);
1278
collectionEscape =
GetValEscape
(node.Expression, _localScopeDepth);