Skip to content

Commit 4d736e9

Browse files
committed
requested comment changes
1 parent 285be46 commit 4d736e9

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

Python/assemble.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,9 @@ compute_localsplus_info(_PyCompile_CodeUnitMetadata *umd, int nlocalsplus,
534534
assert(offset >= 0);
535535
offset += nlocals - numdropped;
536536
assert(offset < nlocalsplus);
537+
/* XXX If the assertion below fails it is most likely because a freevar
538+
was added to u_freevars with the wrong index due to not taking into
539+
account cellvars already present, see gh-128632. */
537540
assert(offset > cellvar_offset);
538541
_Py_set_localsplus_info(offset, k, CO_FAST_FREE, names, kinds);
539542
}

Python/codegen.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3065,9 +3065,6 @@ codegen_addop_yield(compiler *c, location loc) {
30653065
return SUCCESS;
30663066
}
30673067

3068-
/* XXX: Currently if this is used to insert a new name into u_freevars when
3069-
there are already entries in u_cellvars then the wrong index will be put
3070-
into u_freevars causing a hard error downstream. */
30713068
static int
30723069
codegen_load_classdict_freevar(compiler *c, location loc)
30733070
{

Python/compile.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -970,9 +970,6 @@ _PyCompile_ResolveNameop(compiler *c, PyObject *mangled, int scope,
970970
break;
971971
}
972972
if (*optype != COMPILE_OP_FAST) {
973-
/* XXX: Currently if this is used to insert a new name into u_freevars when
974-
there are already entries in u_cellvars then the wrong index will be put
975-
into u_freevars causing a hard error downstream. */
976973
*arg = _PyCompile_DictAddObj(dict, mangled);
977974
RETURN_IF_ERROR(*arg);
978975
}

0 commit comments

Comments
 (0)