op.c: Remove a redundant ck_subr call from ck_glob
authorFather Chrysostomos <sprout@cpan.org>
Sun, 29 Apr 2012 06:45:37 +0000 (23:45 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 22 May 2012 04:37:18 +0000 (21:37 -0700)
newUNOP(OP_ENTERSUB, ...) already calls ck_subr, so calling ck_subr on
its return value is unnecessary and wasteful of precious CPU time.

op.c

diff --git a/op.c b/op.c
index c3ef3ff..e6bcdbe 100644 (file)
--- a/op.c
+++ b/op.c
@@ -8167,7 +8167,7 @@ Perl_ck_glob(pTHX_ OP *o)
                    op_append_elem(OP_LIST, o,
                                scalar(newUNOP(OP_RV2CV, 0,
                                               newGVOP(OP_GV, 0, gv)))));
-       o = newUNOP(OP_NULL, 0, ck_subr(o));
+       o = newUNOP(OP_NULL, 0, o);
        o->op_targ = OP_GLOB; /* hint at what it used to be: eg in newWHILEOP */
        return o;
     }