This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Demur Rumed, benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, serhiy.storchaka, vstinner, yselivanov
Date 2016-03-29.20:32:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1459283568.84.0.810397878066.issue26647@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2016-03-29 20:32:48vstinnersetrecipients: + vstinner, brett.cannon, georg.brandl, ncoghlan, benjamin.peterson, serhiy.storchaka, yselivanov, Demur Rumed
2016-03-29 20:32:48vstinnersetmessageid: <1459283568.84.0.810397878066.issue26647@psf.upfronthosting.co.za>
2016-03-29 20:32:48vstinnerlinkissue26647 messages
2016-03-29 20:32:48vstinnercreate