[issue45362] dis does not work with the new optimized ops

2021-10-04 Thread Martmists


Martmists  added the comment:

> Specialized instructions are a hidden implementation detail, and instead the 
> normal generic instruction will appear.

Will this change be reflected in co_code? If yes, then I'm aware of cases where 
this may be used by bytecode modification libraries. If not, how would it deal 
with co_code being modified?

> Sorry, I don't quite understand what you mean here. The superinstructions do 
> not use different bytecode format: ie they take only one oparg.
I see, so it'll just replace the first of the two ops to streamline the process 
rather than replacing the second one with a dummy instruction

--

___
Python tracker 
<https://bugs.python.org/issue45362>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45362] dis does not work with the new optimized ops

2021-10-04 Thread Martmists


Martmists  added the comment:

Another thing I found to be quite odd is JUMP_ABSOLUTE_QUICK, which is set as 
40, but as it's derived from JUMP_ABSOLUTE it still requires an argument. This 
makes HAVE_ARGUMENT useless as there's an op that doesn't follow the convention.

--

___
Python tracker 
<https://bugs.python.org/issue45362>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45362] dis does not work with the new optimized ops

2021-10-04 Thread Martmists


New submission from Martmists :

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 
<https://bugs.python.org/issue45362>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42085] Add dedicated slot for sending values

2021-05-29 Thread Martmists


Change by Martmists :


--
nosy: +martmists
nosy_count: 4.0 -> 5.0
pull_requests: +25048
pull_request: https://github.com/python/cpython/pull/25465

___
Python tracker 
<https://bugs.python.org/issue42085>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com