[issue26647] Wordcode
STINNER Victor
report at bugs.python.org
Tue Mar 29 16:32:48 EDT 2016
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 <report at bugs.python.org>
<http://bugs.python.org/issue26647>
_______________________________________
More information about the Python-bugs-list
mailing list