mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +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
|
@ -958,9 +958,11 @@ class PyFramePtr:
|
|||
if self.is_optimized_out():
|
||||
return
|
||||
|
||||
|
||||
obj_ptr_ptr = gdb.lookup_type("PyObject").pointer().pointer()
|
||||
base = self._gdbval.cast(obj_ptr_ptr)
|
||||
localsplus = base - self._f_nlocalsplus()
|
||||
|
||||
localsplus = self._gdbval["localsplus"].cast(obj_ptr_ptr)
|
||||
|
||||
for i in safe_range(self.co_nlocals):
|
||||
pyop_value = PyObjectPtr.from_pyobject_ptr(localsplus[i])
|
||||
if pyop_value.is_null():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue