]> granicus.if.org Git - python/commit
Remove f_closure slot of frameobject and use f_localsplus instead.
authorJeremy Hylton <jeremy@alum.mit.edu>
Mon, 29 Jan 2001 22:51:52 +0000 (22:51 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Mon, 29 Jan 2001 22:51:52 +0000 (22:51 +0000)
commit2b724da8d9cd0c41a51e798eca75018ce155e997
tree96a1648e0d50dbbd7ae56b3b55e7b44b107362dd
parent55087f0c351d6de453a5c95293792051d899f16b
Remove f_closure slot of frameobject and use f_localsplus instead.
This change eliminates an extra malloc/free when a frame with free
variables is created.  Any cell vars or free vars are stored in
f_localsplus after the locals and before the stack.

eval_code2() fills in the appropriate values after handling
initialization of locals.

To track the size the frame has an f_size member that tracks the total
size of f_localsplus. It used to be implicitly f_nlocals + f_stacksize.
Include/frameobject.h
Objects/frameobject.c
Python/ceval.c