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)
372
DeclareLocals(
_currentScope
, _topLevelMethod.Parameters);
376
DeclareLocals(
_currentScope
, ImmutableArray.Create<Symbol>(thisParam));
379
Visit(
_currentScope
.BoundNode);
400
var oldScope =
_currentScope
;
409
var oldScope =
_currentScope
;
418
var oldScope =
_currentScope
;
557
_currentScope
.NestedFunctions.Add(new NestedFunction(functionSymbol, blockSyntax: null));
564
_currentScope
.NestedFunctions.Add(function);
569
var oldScope =
_currentScope
;
575
DeclareLocals(
_currentScope
, functionSymbol.Parameters, _inExpressionTree);
620
var scope =
_currentScope
;
686
/// Create a new nested scope under the current scope, and replace <see cref="
_currentScope
"/> with the new scope,
697
if (!locals.IsEmpty &&
_currentScope
.BoundNode != node)
702
DeclareLocals(
_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
712
var 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.
742
if (scope ==
_currentScope
)
747
Debug.Assert(scope ==
_currentScope
.Parent, $"{nameof(scope)} must be {nameof(
_currentScope
)} or {nameof(
_currentScope
)}.{nameof(
_currentScope
.Parent)}");
763
_currentScope =
_currentScope
.Parent;