Lines Matching refs:scopes
475 scopes: dict mapping from symbol names to scope values (no offset)
478 free: set of all symbol names referenced but not bound in child scopes
501 analyze_name(PySTEntryObject *ste, PyObject *scopes, PyObject *name, long flags,
512 SET_SCOPE(scopes, name, GLOBAL_EXPLICIT);
532 SET_SCOPE(scopes, name, FREE);
537 SET_SCOPE(scopes, name, LOCAL);
550 SET_SCOPE(scopes, name, FREE);
558 SET_SCOPE(scopes, name, GLOBAL_IMPLICIT);
563 SET_SCOPE(scopes, name, GLOBAL_IMPLICIT);
578 analyze_cells(PyObject *scopes, PyObject *free)
587 while (PyDict_Next(scopes, &pos, &name, &v)) {
599 if (PyDict_SetItem(scopes, name, v_cell) < 0)
627 update_symbols(PyObject *symbols, PyObject *scopes,
639 v_scope = PyDict_GetItemWithError(scopes, name);
718 bound -- set of variables bound in enclosing scopes (input). bound
720 free -- set of free variables in enclosed scopes (output)
721 globals -- set of declared global variables in enclosing scopes (input)
742 PyObject *name, *v, *local = NULL, *scopes = NULL, *newbound = NULL;
751 scopes = PyDict_New(); /* collect scopes defined for each name */
752 if (!scopes)
798 if (!analyze_name(ste, scopes, name, flags,
859 if (ste->ste_type == FunctionBlock && !analyze_cells(scopes, newfree))
864 if (!update_symbols(ste->ste_symbols, scopes, bound, newfree,
874 Py_XDECREF(scopes);