mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +00:00
Merge from rjones-funccall branch.
Applied patch zombie-frames-2.diff from sf patch 876206 with updates for Python 2.5 and also modified to retain the free_list to avoid the 67% slow-down in pybench recursion test. 5% speed up in function call pybench.
This commit is contained in:
parent
833bf9422e
commit
7c88dcc5ab
4 changed files with 103 additions and 61 deletions
|
@ -102,6 +102,7 @@ PyCode_New(int argcount, int nlocals, int stacksize, int flags,
|
|||
co->co_firstlineno = firstlineno;
|
||||
Py_INCREF(lnotab);
|
||||
co->co_lnotab = lnotab;
|
||||
co->co_zombieframe = NULL;
|
||||
}
|
||||
return co;
|
||||
}
|
||||
|
@ -265,6 +266,8 @@ code_dealloc(PyCodeObject *co)
|
|||
Py_XDECREF(co->co_filename);
|
||||
Py_XDECREF(co->co_name);
|
||||
Py_XDECREF(co->co_lnotab);
|
||||
if (co->co_zombieframe != NULL)
|
||||
PyObject_GC_Del(co->co_zombieframe);
|
||||
PyObject_DEL(co);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue