2 instantiations of NestedFunction
Microsoft.CodeAnalysis.CSharp (2)
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (2)
576
_currentScope.NestedFunctions.Add(new
NestedFunction
(functionSymbol, blockSyntax: null));
582
var function = new
NestedFunction
(functionSymbol, body.Syntax.GetReference());
25 references to NestedFunction
Microsoft.CodeAnalysis.CSharp (25)
Lowering\ClosureConversion\ClosureConversion.Analysis.cs (11)
134
/// Must be called only after <see cref="
NestedFunction
.CapturedEnvironments"/>
312
var closures = new SetWithInsertionOrder<
NestedFunction
>();
361
private PooledDictionary<Scope, PooledHashSet<
NestedFunction
>> CalculateFunctionsCapturingScopeVariables()
363
var closuresCapturingScopeVariables = PooledDictionary<Scope, PooledHashSet<
NestedFunction
>>.GetInstance();
373
closuresCapturingScopeVariables[scope] = PooledHashSet<
NestedFunction
>.GetInstance();
646
/// A tuple of the found <see cref="
NestedFunction
"/> and the <see cref="Scope"/> it was found in.
648
public static (
NestedFunction
, Scope) GetVisibleNestedFunction(Scope startingScope, MethodSymbol functionSymbol)
666
/// Finds a <see cref="
NestedFunction
"/> with a matching original symbol somewhere in the given scope or nested scopes.
668
public static
NestedFunction
GetNestedFunctionInTree(Scope treeRoot, MethodSymbol functionSymbol)
672
NestedFunction
helper(Scope scope)
684
var
found = helper(nestedScope);
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (11)
40
public readonly ArrayBuilder<
NestedFunction
> NestedFunctions = ArrayBuilder<
NestedFunction
>.GetInstance();
67
public readonly
NestedFunction
ContainingFunctionOpt;
80
public Scope(Scope parent, BoundNode boundNode,
NestedFunction
containingFunction)
219
public static void VisitNestedFunctions(Scope scope, Action<Scope,
NestedFunction
> action)
236
public static bool CheckNestedFunctions(Scope scope, Func<Scope,
NestedFunction
, bool> func)
299
private
NestedFunction
_currentFunction = null;
582
var
function = new NestedFunction(functionSymbol, body.Syntax.GetReference());
585
var
oldFunction = _currentFunction;
640
var
function = _currentFunction;
743
Scope CreateNestedScope(Scope parentScope,
NestedFunction
currentFunction)
Lowering\ClosureConversion\ClosureConversion.cs (3)
479
static ImmutableArray<SynthesizedClosureEnvironment> getStructEnvironments(Analysis.
NestedFunction
function)
878
var
function = Analysis.GetNestedFunctionInTree(_analysis.ScopeTree, localFunc.OriginalDefinition);
1520
Analysis.
NestedFunction
function = Analysis.GetNestedFunctionInTree(_analysis.ScopeTree, node.Symbol);