diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-04-24 16:37:17 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-06-12 11:25:48 +0200 |
commit | 93bad3fd55489cbd2d3157da1fcb3b524e960dd2 (patch) | |
tree | 295d059c38869a4b8ca10c2b9b6a8479748e1ffd /opcode.h | |
parent | 464a08e7ffded0873dfb1539fceae173c22a1090 (diff) | |
download | perl-93bad3fd55489cbd2d3157da1fcb3b524e960dd2.tar.gz |
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.
Diffstat (limited to 'opcode.h')
-rw-r--r-- | opcode.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -139,6 +139,7 @@ #define Perl_pp_reach Perl_pp_rkeys #define Perl_pp_rvalues Perl_pp_rkeys #define Perl_pp_transr Perl_pp_trans +#define Perl_pp_aelemfast_lex Perl_pp_aelemfast START_EXTERN_C #ifndef DOINIT @@ -515,6 +516,7 @@ EXTCONST char* const PL_op_name[] = { "rkeys", "rvalues", "transr", + "aelemfast_lex", }; #endif @@ -892,6 +894,7 @@ EXTCONST char* const PL_op_desc[] = { "keys on reference", "values on reference", "transliteration (tr///)", + "constant lexical array element", }; #endif @@ -1283,6 +1286,7 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */ Perl_pp_rkeys, Perl_pp_rvalues, /* implemented by Perl_pp_rkeys */ Perl_pp_transr, /* implemented by Perl_pp_trans */ + Perl_pp_aelemfast_lex, /* implemented by Perl_pp_aelemfast */ } #endif #ifdef PERL_PPADDR_INITED @@ -1671,6 +1675,7 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */ Perl_ck_each, /* rkeys */ Perl_ck_each, /* rvalues */ Perl_ck_match, /* transr */ + Perl_ck_null, /* aelemfast_lex */ } #endif #ifdef PERL_CHECK_INITED @@ -2053,6 +2058,7 @@ EXTCONST U32 PL_opargs[] = { 0x00001b08, /* rkeys */ 0x00001b08, /* rvalues */ 0x00001804, /* transr */ + 0x00013040, /* aelemfast_lex */ }; #endif |