This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Split OP_AELEMFAST_LEX out from OP_AELEMFAST.
authorNicholas Clark <nick@ccl4.org>
Sun, 24 Apr 2011 15:37:17 +0000 (16:37 +0100)
committerNicholas Clark <nick@ccl4.org>
Sun, 12 Jun 2011 09:25:48 +0000 (11:25 +0200)
commit93bad3fd55489cbd2d3157da1fcb3b524e960dd2
tree295d059c38869a4b8ca10c2b9b6a8479748e1ffd
parent464a08e7ffded0873dfb1539fceae173c22a1090
Split OP_AELEMFAST_LEX out from OP_AELEMFAST.

6a077020aea1c5f0 extended the OP_AELEMFAST optimisation to lexical arrays.
Previously OP_AELEMFAST was only used as an optimisation for OP_GV, which is a
PADOP/SVOP.

However, by reusing the same opcode, and signalling (pad) lexical vs package,
it introduced a myriad of special cases, because OP_PADAV is a BASEOP (not a
PADOP), whilst OP_AELEMFAST is a PADOP/SVOP (which is larger).

Using two OP numbers allows each variant to have the correct OP flags in
PL_opargs. Both can continue to share the same C code.
13 files changed:
dist/B-Deparse/Deparse.pm
dist/B-Deparse/t/deparse.t
ext/B/B.xs
ext/B/t/optree_misc.t
ext/Opcode/Opcode.pm
op.c
op.h
opcode.h
opnames.h
pp_hot.c
regen/opcode.pl
regen/opcodes
sv.c