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)
390
DeclareLocals(
_currentScope
, _topLevelMethod.Parameters);
394
DeclareLocals(
_currentScope
, ImmutableArray.Create<Symbol>(thisParam));
397
Visit(
_currentScope
.BoundNode);
418
var oldScope =
_currentScope
;
427
var oldScope =
_currentScope
;
436
var oldScope =
_currentScope
;
576
_currentScope
.NestedFunctions.Add(new NestedFunction(functionSymbol, blockSyntax: null));
583
_currentScope
.NestedFunctions.Add(function);
588
var oldScope =
_currentScope
;
594
DeclareLocals(
_currentScope
, functionSymbol.Parameters, _inExpressionTree);
639
var scope =
_currentScope
;
706
/// Create a new nested scope under the current scope, and replace <see cref="
_currentScope
"/> with the new scope,
717
if (!locals.IsEmpty &&
_currentScope
.BoundNode != node)
722
DeclareLocals(
_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
732
var 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.
762
if (scope ==
_currentScope
)
767
RoslynDebug.Assert(scope ==
_currentScope
.Parent, $"{nameof(scope)} must be {nameof(
_currentScope
)} or {nameof(
_currentScope
)}.{nameof(
_currentScope
.Parent)}");
783
_currentScope =
_currentScope
.Parent;