summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2004-02-22 15:43:53 +0000
committerDave Mitchell <davem@fdisolutions.com>2004-02-22 15:43:53 +0000
commit6a077020aea1c5f03f401226b0a81b82d07f7761 (patch)
treef452588b5ff0db276d9abdd3a24672589abec36d /pp_hot.c
parenta86913efefc35c0a72f21e0107dd9b774e046907 (diff)
downloadperl-6a077020aea1c5f03f401226b0a81b82d07f7761.tar.gz
Extend OP_AELEMFAST optimisation to lexical arrays
p4raw-id: //depot/perl@22357
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 60ce9625c9..4d8725568a 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -521,7 +521,8 @@ PP(pp_add)
PP(pp_aelemfast)
{
dSP;
- AV *av = GvAV(cGVOP_gv);
+ AV *av = PL_op->op_flags & OPf_SPECIAL ?
+ (AV*)PAD_SV(PL_op->op_targ) : GvAV(cGVOP_gv);
U32 lval = PL_op->op_flags & OPf_MOD;
SV** svp = av_fetch(av, PL_op->op_private, lval);
SV *sv = (svp ? *svp : &PL_sv_undef);