• Jeremy Hylton's avatar
    Fix PyFrame_FastToLocals() and counterpart to deal with cells and · 220ae7c0
    Jeremy Hylton yazdı
    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.
    220ae7c0
frameobject.c 10 KB