summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-04-24 16:37:17 +0100
committerNicholas Clark <nick@ccl4.org>2011-06-12 11:25:48 +0200
commit93bad3fd55489cbd2d3157da1fcb3b524e960dd2 (patch)
tree295d059c38869a4b8ca10c2b9b6a8479748e1ffd /regen
parent464a08e7ffded0873dfb1539fceae173c22a1090 (diff)
downloadperl-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 'regen')
-rwxr-xr-xregen/opcode.pl1
-rw-r--r--regen/opcodes2
2 files changed, 3 insertions, 0 deletions
diff --git a/regen/opcode.pl b/regen/opcode.pl
index ed3875e678..791de9f4be 100755
--- a/regen/opcode.pl
+++ b/regen/opcode.pl
@@ -123,6 +123,7 @@ my @raw_alias = (
Perl_pp_ehostent => [qw(enetent eprotoent eservent
spwent epwent sgrent egrent)],
Perl_pp_shostent => [qw(snetent sprotoent sservent)],
+ Perl_pp_aelemfast => ['aelemfast_lex'],
);
while (my ($func, $names) = splice @raw_alias, 0, 2) {
diff --git a/regen/opcodes b/regen/opcodes
index 20087d1ef3..d6b778b1bc 100644
--- a/regen/opcodes
+++ b/regen/opcodes
@@ -540,3 +540,5 @@ rvalues values on reference ck_each t% S
# y///r
transr transliteration (tr///) ck_match is" S
+
+aelemfast_lex constant lexical array element ck_null d0 A S