3 instantiations of Variables
Microsoft.CodeAnalysis.CSharp (3)
FlowAnalysis\NullableWalker.Variables.cs (3)
142return new Variables(id: 0, container: null, symbol); 148var variables = new Variables(snapshot.Id, container, snapshot.Symbol); 221return new Variables(id: GetNextId(), this, method);
53 references to Variables
Microsoft.CodeAnalysis.CSharp (53)
FlowAnalysis\NullableWalker.cs (31)
165private Variables _variables; 238private PooledDictionary<MethodSymbol, Variables>? _nestedFunctionVariables; 457Variables? variables, 469_variables = variables ?? Variables.Create(symbol); 1644Variables.Create(variables), 1750var variables = Variables.Create(initialState.Variables).CreateNestedMethodScope(symbol); 1808initialState is null ? null : Variables.Create(initialState.Variables), 3277private Variables GetOrCreateNestedFunctionVariables(Variables container, MethodSymbol lambdaOrLocalFunction) 3279_nestedFunctionVariables ??= PooledDictionary<MethodSymbol, Variables>.GetInstance(); 7836private static VariableState GetVariableState(Variables variables, LocalState localState) 12281/// <see cref="Variables"/> chain, and the <see cref="Id"/> field in this type matches <see cref="Variables.Id"/>. 12326public static LocalState ReachableState(Variables variables) 12331public static LocalState UnreachableState(Variables variables) 12336public static LocalState ReachableStateWithNotNulls(Variables variables) 12360private static LocalState CreateReachableOrUnreachableState(Variables variables, bool reachable) 12369public LocalState CreateNestedMethodState(Variables variables) 12395(int id, int index) = Variables.DeconstructSlot(slot); 12411public void NormalizeIfNeeded(int slot, NullableWalker walker, Variables variables, bool useNotNullsAsDefault = false) 12422(int id, int index) = Variables.DeconstructSlot(slot); 12440public void Normalize(NullableWalker walker, Variables variables, bool useNotNullsAsDefault = false) 12467int slot = Variables.ConstructSlot(Id, index); 12476(int id, int index) = Variables.DeconstructSlot(slot); 12481(int id, int index) = Variables.DeconstructSlot(slot); 12551action(Variables.ConstructSlot(Id, index), arg); 12645internal string Dump(Variables variables) 12658private void Dump(StringBuilder builder, Variables variables) 12664if (getName(Variables.ConstructSlot(Id, index)) is string name) 12707var variables = (symbol.ContainingSymbol is MethodSymbol containingMethod ? _variables.GetVariablesForMethodScope(containingMethod) : null) ??
FlowAnalysis\NullableWalker.Variables.cs (22)
17/// An immutable copy of <see cref="Variables"/>. 111internal readonly Variables? Container; 140internal static Variables Create(Symbol? symbol) 145internal static Variables Create(VariablesSnapshot snapshot) 147var container = snapshot.Container is null ? null : Create(snapshot.Container); 148var variables = new Variables(snapshot.Id, container, snapshot.Symbol); 183private Variables(int id, Variables? container, Symbol? symbol) 214internal Variables CreateNestedMethodScope(MethodSymbol method) 242var variables = GetVariablesForVariable(identifier); 259var variables = GetVariablesForVariable(identifier); 299var variables = GetVariablesContainingSymbol(symbol); 305var variables = GetVariablesContainingSymbol(symbol); 315var variables = GetVariablesForId(id); 331var variables = GetVariablesForId(id)!; 343private Variables GetVariablesForVariable(VariableIdentifier identifier) 353private Variables GetVariablesContainingSymbol(Symbol symbol) 372internal Variables GetRootScope() 374var variables = this; 382private Variables? GetVariablesForId(int id) 384var variables = this; 397internal Variables? GetVariablesForMethodScope(MethodSymbol method) 399var variables = this;