New submission from Martmists <[email protected]>:
Python 3.11.0a0 (heads/main:e6d1aa1, Oct 4 2021, 10:33:36) [GCC 11.1.0] on
linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dis
>>> c = bytes([127, 1, 0, 2]) # LOAD_FAST__LOAD_FAST (1, 2)
>>> dis.dis(c)
0 <127> 1
2 <0>
>>> c = bytes([48, 0, 161, 0]) # LOAD_GLOBAL_BUILTIN (0) CALL_FUNCTION (0)
>>> dis.dis(c)
0 <48>
2 CALL_METHOD 0
---
The reason for this seems to be the lack of definition in `opcode.py` aside
from being mentioned in _specialized_instructions. Additionally, it seems
dis._unpack_opargs is not yet prepared to support opcodes like
LOAD_FAST__LOAD_FAST which take two arguments.
While I don't expect this to be a first priority in this big change, it's
important to not forget it.
----------
components: Library (Lib)
messages: 403126
nosy: martmists
priority: normal
severity: normal
status: open
title: dis does not work with the new optimized ops
type: behavior
versions: Python 3.11
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45362>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com