summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-06-27 07:58:01 +0100
committerDavid Mitchell <davem@iabyn.com>2016-06-27 14:36:38 +0100
commitf4484b87a82daea7be100df3744515a1bdd437a1 (patch)
treed4f89c50aec6de960b302986e88fd97665be51a3 /pp_hot.c
parentd9d2b74cf46ffb7cc5b88cb749f8cb8dee21425e (diff)
downloadperl-f4484b87a82daea7be100df3744515a1bdd437a1.tar.gz
pp_aelemfast: always extend stack
my previous commit split pp_aelemfast() into two branches; but the new branch wasn't extending the stack before pushing the result.
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 9c547d4dd3..ca90c1e346 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -825,6 +825,8 @@ PP(pp_aelemfast)
assert(SvTYPE(av) == SVt_PVAV);
+ EXTEND(SP, 1);
+
/* inlined av_fetch() for simple cases ... */
if (!SvRMAGICAL(av) && key >= 0 && key <= AvFILLp(av)) {
sv = AvARRAY(av)[key];
@@ -841,7 +843,6 @@ PP(pp_aelemfast)
if (UNLIKELY(!svp && lval))
DIE(aTHX_ PL_no_aelem, (int)key);
- EXTEND(SP, 1);
if (!lval && SvRMAGICAL(av) && SvGMAGICAL(sv)) /* see note in pp_helem() */
mg_get(sv);
PUSHs(sv);