SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 17 Python

Fix PyFrame_FastToLocals() and counterpart to deal with cells and

frees.  Note there doesn't seem to be any way to test LocalsToFast(),
because the instructions that trigger it are illegal in nested scopes
with free variables.

Fix allocation strategy for cells that are also formal parameters.
Instead of emitting LOAD_FAST / STORE_DEREF pairs for each parameter,
have the argument handling code in eval_code2() do the right thing.

A side-effect of this change is that cell variables that are also
arguments are listed at the front of co_cellvars in the order they
appear in the argument list.
J
Jeremy Hylton committed
220ae7c0bf2054ad01f58e1cf669ac069eb9a574
Parent: bec1958