diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-09-13 15:32:05 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-09-13 15:36:07 +0100 |
commit | 9d88f05803089a7481b7fb4bef25d1e082b9803c (patch) | |
tree | a32cf97d1475dec682ea3a2ec1cd4b0da72b380e /op.c | |
parent | 747350425d95672eb231bba3c24c254327448b4d (diff) | |
download | perl-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.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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; |