3 writes to _variables
Microsoft.CodeAnalysis.CSharp (3)
FlowAnalysis\NullableWalker.cs (3)
468_variables = variables ?? Variables.Create(symbol); 3258_variables = GetOrCreateNestedFunctionVariables(_variables, lambdaOrFunctionSymbol); 3321_variables = _variables.Container!;
39 references to _variables
Microsoft.CodeAnalysis.CSharp (39)
FlowAnalysis\NullableWalker.cs (37)
441_variables.Free(); 518return _variables.TryGetValue(identifier, out slot); 523return _variables.Add(identifier); 1760finalNullableState = GetVariableState(walker._variables, walker.State); 1784Debug.Assert(walker._variables.Id == initialState.Value.Id); 1815state.TryAdd(key, new Data(_variables.GetTotalVariableCount(), requiredAnalysis)); 1822return new SharedWalkerState(_variables.CreateSnapshot()); 1887state.NormalizeIfNeeded(slot, this, _variables, useNotNullsAsDefault); 1895state.Normalize(this, _variables); 1905var variable = _variables[slot]; 1913if (!_variables.TryGetType(local, out TypeWithAnnotations localType)) 1922if (!_variables.TryGetType(parameter, out TypeWithAnnotations parameterType)) 2152|| (!constructor.IsStatic && containingSlot > 0 && _variables[containingSlot].Symbol is ThisParameterSymbol)) 2678return _variables[slot].Symbol.GetTypeOrReturnType().Type; 2713var actualType = _variables[targetSlot].Symbol.GetTypeOrReturnType().Type; 2728_variables.GetMembers(members, targetSlot); 2748_variables.GetMembers(members, valueSlot); 2760var state = LocalState.ReachableState(_variables); 2767return LocalState.UnreachableState(_variables); 2773return LocalState.ReachableStateWithNotNulls(_variables); 2820_variables.SetType(parameter, parameterType); 3169state.Normalize(this, _variables); 3178_variables); 3198_variables); 3258_variables = GetOrCreateNestedFunctionVariables(_variables, lambdaOrFunctionSymbol); 3259this.State = state.CreateNestedMethodState(_variables); 3321_variables = _variables.Container!; 3514_variables.SetType(local, type); 7545_variables.SetType(local.LocalSymbol, varType); 7951return getUnboundLambda((BoundLambda)argument, GetVariableState(_variables, lambdaState.Value)); 10275_variables.SetType(local.LocalSymbol, operandType.ToAnnotatedTypeWithAnnotations(compilation)); 10637return _variables.TryGetType(local, out TypeWithAnnotations type) ? 10644return _variables.TryGetType(parameter, out TypeWithAnnotations type) ? 11114_variables.SetType(iterationVariable, destinationType); 12121return state.Dump(_variables); 12646var variables = (symbol.ContainingSymbol is MethodSymbol containingMethod ? _variables.GetVariablesForMethodScope(containingMethod) : null) ?? 12647_variables.GetRootScope();
FlowAnalysis\NullableWalker_Patterns.cs (2)
685if (_variables.TryGetType(local, out var existingType)) 690_variables.SetType(local, inferredType);