summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2014-02-26 18:03:56 +0000
committerDavid Mitchell <davem@iabyn.com>2014-02-27 16:16:18 +0000
commit3689ad62af25f0d4cbf68f0b9f1583d8035434f0 (patch)
tree416ce35191f09145792736d92b5f24a8398a7757 /pp_hot.c
parent313107ced843d53a9641e4d5b94059ced8fbc2c2 (diff)
downloadperl-3689ad62af25f0d4cbf68f0b9f1583d8035434f0.tar.gz
pp_entersub(): assign CvDEPTH to a local var
stop repeatedly retrieving it
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 73617266b7..6d44d90d2e 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2649,17 +2649,17 @@ try_autoload:
dMARK;
SSize_t items = SP - MARK;
PADLIST * const padlist = CvPADLIST(cv);
+ I32 depth;
PUSHBLOCK(cx, CXt_SUB, MARK);
PUSHSUB(cx);
cx->blk_sub.retop = PL_op->op_next;
- CvDEPTH(cv)++;
- if (UNLIKELY(CvDEPTH(cv) >= 2)) {
+ if (UNLIKELY((depth = ++CvDEPTH(cv)) >= 2)) {
PERL_STACK_OVERFLOW_CHECK();
- pad_push(padlist, CvDEPTH(cv));
+ pad_push(padlist, depth);
}
SAVECOMPPAD();
- PAD_SET_CUR_NOSAVE(padlist, CvDEPTH(cv));
+ PAD_SET_CUR_NOSAVE(padlist, depth);
if (LIKELY(hasargs)) {
AV *const av = MUTABLE_AV(PAD_SVl(0));
if (UNLIKELY(AvREAL(av))) {
@@ -2705,7 +2705,7 @@ try_autoload:
* stuff so that __WARN__ handlers can safely dounwind()
* if they want to
*/
- if (UNLIKELY(CvDEPTH(cv) == PERL_SUB_DEPTH_WARN
+ if (UNLIKELY(depth == PERL_SUB_DEPTH_WARN
&& ckWARN(WARN_RECURSION)
&& !(PERLDB_SUB && cv == GvCV(PL_DBsub))))
sub_crush_depth(cv);