mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
bpo-44990: Change layout of evaluation frames. "Layout B" (GH-27933)
Places the locals between the specials and stack. This is the more "natural" layout for a C struct, makes the code simpler and gives a slight speedup (~1%)
This commit is contained in:
parent
214c2e5d91
commit
f9242d50b1
8 changed files with 114 additions and 100 deletions
|
@ -8874,7 +8874,7 @@ super_init_without_args(PyFrameObject *f, PyCodeObject *co,
|
|||
return -1;
|
||||
}
|
||||
|
||||
assert(f->f_frame->nlocalsplus > 0);
|
||||
assert(f->f_frame->f_code->co_nlocalsplus > 0);
|
||||
PyObject *firstarg = _PyFrame_GetLocalsArray(f->f_frame)[0];
|
||||
// The first argument might be a cell.
|
||||
if (firstarg != NULL && (_PyLocals_GetKind(co->co_localspluskinds, 0) & CO_FAST_CELL)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue