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();
48 references to _localScopeDepth
Microsoft.CodeAnalysis.CSharp (48)
Binder\Binder.ValueChecks.cs (5)
2301receiver = new BoundCapturedReceiverPlaceholder(receiver.Syntax, receiver, _localScopeDepth, receiver.Type).MakeCompilerGenerated(); 2856SetLocalScopes(localSymbol, refEscapeScope: _localScopeDepth, valEscapeScope: inferredDestinationValEscape); 2948SetLocalScopes(localSymbol, refEscapeScope: _localScopeDepth, valEscapeScope: inferredDestinationValEscape); 3302CheckRefEscape(expr.Syntax, expr, _localScopeDepth, escapeTo, checkingReceiver: false, diagnostics: diagnostics); 3306CheckValEscape(expr.Syntax, expr, _localScopeDepth, escapeTo, checkingReceiver: false, diagnostics: diagnostics);
Binder\Binder_Operators.cs (1)
4382var currentScope = _localScopeDepth;
Binder\Binder_Statements.cs (5)
1552var leftEscape = GetRefEscape(op1, _localScopeDepth); 1553var rightEscape = GetRefEscape(op2, _localScopeDepth); 1572leftEscape = GetValEscape(op1, _localScopeDepth); 1573rightEscape = GetValEscape(op2, _localScopeDepth); 1597var leftEscape = GetValEscape(op1, _localScopeDepth);
Binder\RefSafetyAnalysis.cs (37)
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); 558using var _ = new PatternInput(this, GetValEscape(node.Expression, _localScopeDepth)); 597using (new PatternInput(this, _localScopeDepth)) 646SetLocalScopes(local, _localScopeDepth, _patternInputValEscape); 693_localScopeDepth, 706placeholders.Add((interpolationData.ReceiverPlaceholder, _localScopeDepth)); 722valEscapeScope = receiver.GetRefKind().IsWritableReference() ? GetRefEscape(receiver, _localScopeDepth) : GetValEscape(receiver, _localScopeDepth); 735valEscapeScope = GetValEscape(arguments[argIndex], _localScopeDepth); 794_localScopeDepth, 814var escapeFrom = GetValEscape(node.InitializerExpressionOpt, _localScopeDepth); 840if (!escapeFrom.IsConvertibleTo(GetValEscape(argument, _localScopeDepth))) 876_localScopeDepth, 899_localScopeDepth, 910GetAwaitableInstancePlaceholders(placeholders, node.AwaitableInfo, GetValEscape(node.Expression, _localScopeDepth)); 971placeholders.Add((conversion.DeconstructionInfo.InputPlaceholder, GetValEscape(right, _localScopeDepth))); 984? GetValEscape(variable.Expression, _localScopeDepth) 985: _localScopeDepth; 1000_localScopeDepth, 1044: new DeconstructionVariable(expr, GetValEscape(expr, _localScopeDepth), null); 1091_localScopeDepth, 1096collectionEscape = GetValEscape(node.Expression, _localScopeDepth); 1103AddLocalScopes(local, refEscapeScope: local.RefKind == RefKind.None ? _localScopeDepth : collectionEscape, valEscapeScope: collectionEscape);