STINNER Victor added the comment:

> The change is to have all instructions take an argument. This removes the 
> branch on each instruction on whether to load oparg. (...)

Oh ok, I like that :-) I had the same idea.

Your patch contains unrelated changes, you should revert them to have a change 
simpler to review.

Removing HAVE_ARGUMENT from opcode.h/dis.py doesn't seem like a good idea. IMHO 
it's stil useful for dis to show a more compact bytcode. For example, I expect 
"DUP_TOP", not "DUP_TOP 0", or worse "DUP_TOP 5".

For backward compatibility, I also suggest to keep HAS_ARG() even if it must 
not be used to decode instructions anymore.

The following obvious change is to use a pointer aligned to 16-bits for co_code 
to be able to use 16-bit instructions rather than two 8-bit instructions to 
retrieve the opcode and then the argument in ceval.c (see the issue #25823). I 
suggest to implement that later to keep the change as simple as possible.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26647>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to