summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-07-13 16:25:36 +0100
committerDavid Mitchell <davem@iabyn.com>2016-02-03 08:59:37 +0000
commit4f25d0428094926f0ab6631db6e1b03ae1fe0c87 (patch)
tree207ccfbfabe812ca2cd31584dcf7bb23a6076406
parent801bbf618dc490a892f4efb18eb7f7e70987d011 (diff)
downloadperl-4f25d0428094926f0ab6631db6e1b03ae1fe0c87.tar.gz
pp_entersub: unroll some CvFLAGS(cv) tests
Do a single bit comparison rather than two conditionals. Slightly faster.
-rw-r--r--pp_hot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index d54b882e82..b9562eea2e 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -3489,7 +3489,8 @@ PP(pp_entersub)
}
}
- if (UNLIKELY(CvCLONE(cv) && ! CvCLONED(cv)))
+ /* unrolled "CvCLONE(cv) && ! CvCLONED(cv)" */
+ if (UNLIKELY((CvFLAGS(cv) & (CVf_CLONE|CVf_CLONED)) == CVf_CLONE))
DIE(aTHX_ "Closure prototype called");
if (UNLIKELY((PL_op->op_private & OPpENTERSUB_DB) && GvCV(PL_DBsub)