3 writes to _localScopeDepth
Microsoft.CodeAnalysis.CSharp (3)
Binder\RefSafetyAnalysis.cs (3)
86_localScopeDepth = SafeContext.CurrentMethod.Wider(); 98_analysis._localScopeDepth = _analysis._localScopeDepth.Narrower(); 111_analysis._localScopeDepth = _analysis._localScopeDepth.Wider();
50 references to _localScopeDepth
Microsoft.CodeAnalysis.CSharp (50)
Binder\Binder.ValueChecks.cs (5)
2393receiver = new BoundCapturedReceiverPlaceholder(receiver.Syntax, receiver, _localScopeDepth, receiver.Type).MakeCompilerGenerated(); 2957SetLocalScopes(localSymbol, refEscapeScope: _localScopeDepth, valEscapeScope: inferredDestinationValEscape); 3051SetLocalScopes(localSymbol, refEscapeScope: _localScopeDepth, valEscapeScope: inferredDestinationValEscape); 3405CheckRefEscape(expr.Syntax, expr, _localScopeDepth, escapeTo, checkingReceiver: false, diagnostics: diagnostics); 3409CheckValEscape(expr.Syntax, expr, _localScopeDepth, escapeTo, checkingReceiver: false, diagnostics: diagnostics);
Binder\Binder_Operators.cs (1)
4772var currentScope = _localScopeDepth;
Binder\Binder_Statements.cs (5)
1564var leftEscape = GetRefEscape(op1, _localScopeDepth); 1565var rightEscape = GetRefEscape(op2, _localScopeDepth); 1584leftEscape = GetValEscape(op1, _localScopeDepth); 1585rightEscape = GetValEscape(op2, _localScopeDepth); 1609var leftEscape = GetValEscape(op1, _localScopeDepth);
Binder\RefSafetyAnalysis.cs (39)
98_analysis._localScopeDepth = _analysis._localScopeDepth.Narrower(); 101_analysis.AddLocalScopes(local, refEscapeScope: _analysis._localScopeDepth, valEscapeScope: SafeContext.CallingMethod); 111_analysis._localScopeDepth = _analysis._localScopeDepth.Wider(); 350? GetValEscape(expr, _localScopeDepth) 351: _localScopeDepth; 366GetAwaitableInstancePlaceholders(placeholders, awaitableInfo, _localScopeDepth); 395using var _2 = new PatternInput(this, GetValEscape(node.Expression, _localScopeDepth)); 404using var _ = new PatternInput(this, GetValEscape(node.Expression, _localScopeDepth)); 450_localScopeDepth : 453_localScopeDepth : 493GetRefEscape(initializer, _localScopeDepth).IsConvertibleTo(refEscapeScope)); 503SetLocalScopes(localSymbol, _localScopeDepth, _localScopeDepth); 505valEscapeScope = GetValEscape(initializer, _localScopeDepth); 508refEscapeScope = GetRefEscape(initializer, _localScopeDepth); 565_localScopeDepth, 579_localScopeDepth, 593using var _ = new PatternInput(this, GetValEscape(node.Expression, _localScopeDepth)); 632using (new PatternInput(this, _localScopeDepth)) 681SetLocalScopes(local, _localScopeDepth, _patternInputValEscape); 728_localScopeDepth, 741placeholders.Add((interpolationData.ReceiverPlaceholder, _localScopeDepth)); 757valEscapeScope = receiver.GetRefKind().IsWritableReference() ? GetRefEscape(receiver, _localScopeDepth) : GetValEscape(receiver, _localScopeDepth); 770valEscapeScope = GetValEscape(arguments[argIndex], _localScopeDepth); 829_localScopeDepth, 849var escapeFrom = GetValEscape(node.InitializerExpressionOpt, _localScopeDepth); 875if (!escapeFrom.IsConvertibleTo(GetValEscape(argument, _localScopeDepth))) 911_localScopeDepth, 934_localScopeDepth, 945GetAwaitableInstancePlaceholders(placeholders, node.AwaitableInfo, GetValEscape(node.Expression, _localScopeDepth)); 1006placeholders.Add((conversion.DeconstructionInfo.InputPlaceholder, GetValEscape(right, _localScopeDepth))); 1019? GetValEscape(variable.Expression, _localScopeDepth) 1020: _localScopeDepth; 1035_localScopeDepth, 1079: new DeconstructionVariable(expr, GetValEscape(expr, _localScopeDepth), null); 1126_localScopeDepth, 1131collectionEscape = GetValEscape(node.Expression, _localScopeDepth); 1138AddLocalScopes(local, refEscapeScope: local.RefKind == RefKind.None ? _localScopeDepth : collectionEscape, valEscapeScope: collectionEscape);