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