public FlowChecker(ScopeStatement scope) { var scopeVars = scope.ScopeVariables; _variables = new Dictionary <string, PythonVariable>(scopeVars.Count); foreach (var scopeVar in scopeVars) { _variables[scopeVar.Name] = scopeVar; } _bits = new BitArray(_variables.Count * 2); int index = 0; _variableIndices = new Dictionary <PythonVariable, int>(_variables.Count); foreach (var binding in _variables) { _variableIndices[binding.Value] = index++; } _scope = scope; _fdef = new FlowDefiner(this); _fdel = new FlowDeleter(this); }
public FlowChecker(ScopeStatement scope) { var scopeVars = scope.ScopeVariables; _variables = new Dictionary<string, JVariable>(scopeVars.Count); foreach (var scopeVar in scopeVars) { _variables[scopeVar.Name] = scopeVar; } _bits = new BitArray(_variables.Count * 2); int index = 0; _variableIndices = new Dictionary<JVariable, int>(_variables.Count); foreach (var binding in _variables) { _variableIndices[binding.Value] = index++; } _scope = scope; _fdef = new FlowDefiner(this); _fdel = new FlowDeleter(this); }