summaryrefslogtreecommitdiff
path: root/Objects/typeobject.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2021-08-25 13:44:20 +0100
committerGitHub <noreply@github.com>2021-08-25 13:44:20 +0100
commitf9242d50b18572ef0d584a1c815ed08d1a38e4f4 (patch)
tree0c7c137c701b1dd69f89227dee85aaee95ff5dfb /Objects/typeobject.c
parent214c2e5d916d3ce5e7b1db800210b93001850bbb (diff)
downloadcpython-git-f9242d50b18572ef0d584a1c815ed08d1a38e4f4.tar.gz
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%)
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r--Objects/typeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index a38690aed5..ec274a025d 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -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)) {