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, 468_variables = variables ?? Variables.Create(symbol); 1583Variables.Create(variables), 1689var variables = Variables.Create(initialState.Variables).CreateNestedMethodScope(symbol); 1747initialState is null ? null : Variables.Create(initialState.Variables), 3216private Variables GetOrCreateNestedFunctionVariables(Variables container, MethodSymbol lambdaOrLocalFunction) 3218_nestedFunctionVariables ??= PooledDictionary<MethodSymbol, Variables>.GetInstance(); 7778private static VariableState GetVariableState(Variables variables, LocalState localState) 12223/// <see cref="Variables"/> chain, and the <see cref="Id"/> field in this type matches <see cref="Variables.Id"/>. 12268public static LocalState ReachableState(Variables variables) 12273public static LocalState UnreachableState(Variables variables) 12278public static LocalState ReachableStateWithNotNulls(Variables variables) 12302private static LocalState CreateReachableOrUnreachableState(Variables variables, bool reachable) 12311public LocalState CreateNestedMethodState(Variables variables) 12337(int id, int index) = Variables.DeconstructSlot(slot); 12353public void NormalizeIfNeeded(int slot, NullableWalker walker, Variables variables, bool useNotNullsAsDefault = false) 12364(int id, int index) = Variables.DeconstructSlot(slot); 12382public void Normalize(NullableWalker walker, Variables variables, bool useNotNullsAsDefault = false) 12409int slot = Variables.ConstructSlot(Id, index); 12418(int id, int index) = Variables.DeconstructSlot(slot); 12423(int id, int index) = Variables.DeconstructSlot(slot); 12493action(Variables.ConstructSlot(Id, index), arg); 12587internal string Dump(Variables variables) 12600private void Dump(StringBuilder builder, Variables variables) 12606if (getName(Variables.ConstructSlot(Id, index)) is string name) 12649var 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;