@@ -361,7 +361,6 @@ static void _dump_symtable(PySTEntryObject* ste, PyObject* prefix)
361361 if (flags & DEF_ANNOT ) printf (" DEF_ANNOT" );
362362 if (flags & DEF_COMP_ITER ) printf (" DEF_COMP_ITER" );
363363 if (flags & DEF_TYPE_PARAM ) printf (" DEF_TYPE_PARAM" );
364- if (flags & DEF_COMP_CELL ) printf (" DEF_COMP_CELL" );
365364 switch (scope ) {
366365 case LOCAL : printf (" LOCAL" ); break ;
367366 case GLOBAL_EXPLICIT : printf (" GLOBAL_EXPLICIT" ); break ;
@@ -860,23 +859,10 @@ finalize_inlined_comprehension(PySTEntryObject *ste, PySTEntryObject *comp,
860859 goto error ;
861860 }
862861 int scope = SYMBOL_TO_SCOPE (comp_flags );
863- int only_flags = comp_flags & ((1 << SCOPE_OFFSET ) - 1 );
864- if (scope == CELL || only_flags & DEF_COMP_CELL ) {
862+ if (scope == CELL ) {
865863 if (PySet_Add (inlined_cells , k ) < 0 ) {
866864 goto error ;
867865 }
868- if (!(only_flags & DEF_COMP_CELL )) {
869- comp_flags |= DEF_COMP_CELL ;
870- PyObject * newv = PyLong_FromLong (comp_flags );
871- if (newv == NULL ) {
872- goto error ;
873- }
874- if (PyDict_SetItem (comp -> ste_symbols , k , newv ) < 0 ) {
875- Py_DECREF (newv );
876- goto error ;
877- }
878- Py_DECREF (newv );
879- }
880866 }
881867 PyObject * existing = PyDict_GetItemWithError (ste -> ste_symbols , k );
882868 if (existing == NULL && PyErr_Occurred ()) {
@@ -1037,7 +1023,7 @@ drop_class_free(PySTEntryObject *ste, PyObject *free)
10371023static int
10381024update_symbols (PyObject * symbols , PyObject * scopes ,
10391025 PyObject * bound , PyObject * free ,
1040- PyObject * inlined_cells , int classflag )
1026+ int classflag )
10411027{
10421028 PyObject * name = NULL , * itr = NULL ;
10431029 PyObject * v = NULL , * v_scope = NULL , * v_new = NULL , * v_free = NULL ;
@@ -1049,13 +1035,6 @@ update_symbols(PyObject *symbols, PyObject *scopes,
10491035 if (flags == -1 && PyErr_Occurred ()) {
10501036 return 0 ;
10511037 }
1052- int contains = PySet_Contains (inlined_cells , name );
1053- if (contains < 0 ) {
1054- return 0 ;
1055- }
1056- if (contains ) {
1057- flags |= DEF_COMP_CELL ;
1058- }
10591038 if (PyDict_GetItemRef (scopes , name , & v_scope ) < 0 ) {
10601039 return 0 ;
10611040 }
@@ -1336,7 +1315,7 @@ analyze_block(PySTEntryObject *ste, PyObject *bound, PyObject *free,
13361315 goto error ;
13371316 }
13381317 /* Records the results of the analysis in the symbol table entry */
1339- if (!update_symbols (ste -> ste_symbols , scopes , bound , newfree , inlined_cells ,
1318+ if (!update_symbols (ste -> ste_symbols , scopes , bound , newfree ,
13401319 (ste -> ste_type == ClassBlock ) || ste -> ste_can_see_class_scope ))
13411320 goto error ;
13421321 temp = PyNumber_InPlaceOr (free , newfree );
0 commit comments