mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-27129: Use instruction offsets, not byte offsets, in bytecode and internally. (GH-25069)
* Use instruction offset, rather than bytecode offset. Streamlines interpreter dispatch a bit, and removes most EXTENDED_ARGs for jumps. * Change some uses of PyCode_Addr2Line to PyFrame_GetLineNumber
This commit is contained in:
parent
2ac0515027
commit
fcb55c0037
14 changed files with 4568 additions and 4569 deletions
|
@ -947,7 +947,7 @@ class PyFrameObjectPtr(PyObjectPtr):
|
|||
return self.f_lineno
|
||||
|
||||
try:
|
||||
return self.co.addr2line(self.f_lasti)
|
||||
return self.co.addr2line(self.f_lasti*2)
|
||||
except Exception:
|
||||
# bpo-34989: addr2line() is a complex function, it can fail in many
|
||||
# ways. For example, it fails with a TypeError on "FakeRepr" if
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue