3 writes to _currentScope
Microsoft.CodeAnalysis.CSharp (3)
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (3)
360_currentScope = rootScope; 741_currentScope = scope; 783_currentScope = _currentScope.Parent;
26 references to _currentScope
Microsoft.CodeAnalysis.CSharp (26)
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (26)
390DeclareLocals(_currentScope, _topLevelMethod.Parameters); 394DeclareLocals(_currentScope, ImmutableArray.Create<Symbol>(thisParam)); 397Visit(_currentScope.BoundNode); 418var oldScope = _currentScope; 427var oldScope = _currentScope; 436var oldScope = _currentScope; 576_currentScope.NestedFunctions.Add(new NestedFunction(functionSymbol, blockSyntax: null)); 583_currentScope.NestedFunctions.Add(function); 588var oldScope = _currentScope; 594DeclareLocals(_currentScope, functionSymbol.Parameters, _inExpressionTree); 639var scope = _currentScope; 706/// Create a new nested scope under the current scope, and replace <see cref="_currentScope"/> with the new scope, 717if (!locals.IsEmpty && _currentScope.BoundNode != node) 722DeclareLocals(_currentScope, locals); 726/// Creates a new nested scope which is a child of <see cref="_currentScope"/>, 727/// and replaces <see cref="_currentScope"/> with the new scope 732var scope = CreateNestedScope(_currentScope, _currentFunction); 754/// Requires that scope is either the same as <see cref="_currentScope"/>, 755/// or is the <see cref="Scope.Parent"/> of <see cref="_currentScope"/>. 757/// Replaces <see cref="_currentScope"/> with scope in the second. 762if (scope == _currentScope) 767RoslynDebug.Assert(scope == _currentScope.Parent, $"{nameof(scope)} must be {nameof(_currentScope)} or {nameof(_currentScope)}.{nameof(_currentScope.Parent)}"); 783_currentScope = _currentScope.Parent;