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 yselivanov
Recipients benjamin.peterson, brett.cannon, gvanrossum, ncoghlan, vstinner, yselivanov
Date 2016-01-14.17:51:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452793893.16.0.702583695864.issue26110@psf.upfronthosting.co.za>
In-reply-to
Content
> If you prefer to limit the number of opcodes, you can pass a flag in arguments. For example, use 2 bytes for 2 arguments instead of only 1?

I tried two approaches:

1. Push one more leading NULL to the stack in LOAD_METHOD (which makes it push 3 vals).  Then, in CALL_FUNCTION, detect when the callable is NULL and to the stuff that CALL_METHOD does.

2. Use a bitflag on oparg for CALL_FUNCTION and CALL_* opcodes.  This adds EXTENDED_ARG opcode overhead.

Long story short, the only option would be to add dedicated opcodes to work with LOAD_METHOD.  However, I'd prefer to first merge this patch, as it's relatively small and easy to review, and then focus on improving other things (keyword/*arg calls, C methods, etc).  This is just a first step.
History
Date User Action Args
2016-01-14 17:51:33yselivanovsetrecipients: + yselivanov, gvanrossum, brett.cannon, ncoghlan, vstinner, benjamin.peterson
2016-01-14 17:51:33yselivanovsetmessageid: <1452793893.16.0.702583695864.issue26110@psf.upfronthosting.co.za>
2016-01-14 17:51:33yselivanovlinkissue26110 messages
2016-01-14 17:51:32yselivanovcreate