3 writes to _variables
Microsoft.CodeAnalysis.CSharp (3)
FlowAnalysis\NullableWalker.cs (3)
469_variables = variables ?? Variables.Create(symbol); 3319_variables = GetOrCreateNestedFunctionVariables(_variables, lambdaOrFunctionSymbol); 3382_variables = _variables.Container!;
39 references to _variables
Microsoft.CodeAnalysis.CSharp (39)
FlowAnalysis\NullableWalker.cs (37)
441_variables.Free(); 519return _variables.TryGetValue(identifier, out slot); 524return _variables.Add(identifier); 1821finalNullableState = GetVariableState(walker._variables, walker.State); 1845Debug.Assert(walker._variables.Id == initialState.Value.Id); 1876state.TryAdd(key, new Data(_variables.GetTotalVariableCount(), requiredAnalysis)); 1883return new SharedWalkerState(_variables.CreateSnapshot()); 1948state.NormalizeIfNeeded(slot, this, _variables, useNotNullsAsDefault); 1956state.Normalize(this, _variables); 1966var variable = _variables[slot]; 1974if (!_variables.TryGetType(local, out TypeWithAnnotations localType)) 1983if (!_variables.TryGetType(parameter, out TypeWithAnnotations parameterType)) 2213|| (!constructor.IsStatic && containingSlot > 0 && _variables[containingSlot].Symbol is ThisParameterSymbol)) 2739return _variables[slot].Symbol.GetTypeOrReturnType().Type; 2774var actualType = _variables[targetSlot].Symbol.GetTypeOrReturnType().Type; 2789_variables.GetMembers(members, targetSlot); 2809_variables.GetMembers(members, valueSlot); 2821var state = LocalState.ReachableState(_variables); 2828return LocalState.UnreachableState(_variables); 2834return LocalState.ReachableStateWithNotNulls(_variables); 2881_variables.SetType(parameter, parameterType); 3230state.Normalize(this, _variables); 3239_variables); 3259_variables); 3319_variables = GetOrCreateNestedFunctionVariables(_variables, lambdaOrFunctionSymbol); 3320this.State = state.CreateNestedMethodState(_variables); 3382_variables = _variables.Container!; 3575_variables.SetType(local, type); 7606_variables.SetType(local.LocalSymbol, varType); 8012return getUnboundLambda((BoundLambda)argument, GetVariableState(_variables, lambdaState.Value)); 10336_variables.SetType(local.LocalSymbol, operandType.ToAnnotatedTypeWithAnnotations(compilation)); 10698return _variables.TryGetType(local, out TypeWithAnnotations type) ? 10705return _variables.TryGetType(parameter, out TypeWithAnnotations type) ? 11175_variables.SetType(iterationVariable, destinationType); 12182return state.Dump(_variables); 12707var variables = (symbol.ContainingSymbol is MethodSymbol containingMethod ? _variables.GetVariablesForMethodScope(containingMethod) : null) ?? 12708_variables.GetRootScope();
FlowAnalysis\NullableWalker_Patterns.cs (2)
685if (_variables.TryGetType(local, out var existingType)) 690_variables.SetType(local, inferredType);