Message258206
> 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. |
|
Date |
User |
Action |
Args |
2016-01-14 17:51:33 | yselivanov | set | recipients:
+ yselivanov, gvanrossum, brett.cannon, ncoghlan, vstinner, benjamin.peterson |
2016-01-14 17:51:33 | yselivanov | set | messageid: <1452793893.16.0.702583695864.issue26110@psf.upfronthosting.co.za> |
2016-01-14 17:51:33 | yselivanov | link | issue26110 messages |
2016-01-14 17:51:32 | yselivanov | create | |
|