summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-09-13 15:32:05 +0100
committerNicholas Clark <nick@ccl4.org>2010-09-13 15:36:07 +0100
commit9d88f05803089a7481b7fb4bef25d1e082b9803c (patch)
treea32cf97d1475dec682ea3a2ec1cd4b0da72b380e /op.c
parent747350425d95672eb231bba3c24c254327448b4d (diff)
downloadperl-9d88f05803089a7481b7fb4bef25d1e082b9803c.tar.gz
In Perl_ck_subr(), move to once place all setting of bits in o->op_private.
The later conditional setting of HINT_STRICT_REFS and of OPpENTERSUB_DB are unaffected by any code triggered by cvop->op_type. Moving them together lets the C compiler produce better code.
Diffstat (limited to 'op.c')
-rw-r--r--op.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/op.c b/op.c
index 35435f82de..aa4e233cb1 100644
--- a/op.c
+++ b/op.c
@@ -8407,6 +8407,10 @@ Perl_ck_subr(pTHX_ OP *o)
PERL_ARGS_ASSERT_CK_SUBR;
o->op_private |= OPpENTERSUB_HASTARG;
+ o->op_private |= (PL_hints & HINT_STRICT_REFS);
+ if (PERLDB_SUB && PL_curstash != PL_debstash)
+ o->op_private |= OPpENTERSUB_DB;
+
for (cvop = o2; cvop->op_sibling; cvop = cvop->op_sibling) ;
if (cvop->op_type == OP_RV2CV) {
o->op_private |= (cvop->op_private & OPpENTERSUB_AMPER);
@@ -8444,9 +8448,7 @@ Perl_ck_subr(pTHX_ OP *o)
sib->op_private &= ~OPpCONST_STRICT;
}
}
- o->op_private |= (PL_hints & HINT_STRICT_REFS);
- if (PERLDB_SUB && PL_curstash != PL_debstash)
- o->op_private |= OPpENTERSUB_DB;
+
if (!proto) {
while (o2 != cvop) {
OP* o3;