3 writes to _currentScope
Microsoft.CodeAnalysis.CSharp (3)
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (3)
342_currentScope = rootScope; 721_currentScope = scope; 763_currentScope = _currentScope.Parent;
26 references to _currentScope
Microsoft.CodeAnalysis.CSharp (26)
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (26)
372DeclareLocals(_currentScope, _topLevelMethod.Parameters); 376DeclareLocals(_currentScope, ImmutableArray.Create<Symbol>(thisParam)); 379Visit(_currentScope.BoundNode); 400var oldScope = _currentScope; 409var oldScope = _currentScope; 418var oldScope = _currentScope; 557_currentScope.NestedFunctions.Add(new NestedFunction(functionSymbol, blockSyntax: null)); 564_currentScope.NestedFunctions.Add(function); 569var oldScope = _currentScope; 575DeclareLocals(_currentScope, functionSymbol.Parameters, _inExpressionTree); 620var scope = _currentScope; 686/// Create a new nested scope under the current scope, and replace <see cref="_currentScope"/> with the new scope, 697if (!locals.IsEmpty && _currentScope.BoundNode != node) 702DeclareLocals(_currentScope, locals); 706/// Creates a new nested scope which is a child of <see cref="_currentScope"/>, 707/// and replaces <see cref="_currentScope"/> with the new scope 712var scope = CreateNestedScope(_currentScope, _currentFunction); 734/// Requires that scope is either the same as <see cref="_currentScope"/>, 735/// or is the <see cref="Scope.Parent"/> of <see cref="_currentScope"/>. 737/// Replaces <see cref="_currentScope"/> with scope in the second. 742if (scope == _currentScope) 747Debug.Assert(scope == _currentScope.Parent, $"{nameof(scope)} must be {nameof(_currentScope)} or {nameof(_currentScope)}.{nameof(_currentScope.Parent)}"); 763_currentScope = _currentScope.Parent;