op.c: Remove a redundant ck_subr call from dofile
authorFather Chrysostomos <sprout@cpan.org>
Sun, 29 Apr 2012 06:43:42 +0000 (23:43 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 22 May 2012 04:37:10 +0000 (21:37 -0700)
newUNOP(OP_ENTERSUB, ...) already calls ck_subr, so wrapping it in
ck_subr(...) is unnecessary and wasteful of precious CPU time.

op.c

diff --git a/op.c b/op.c
index 25a93d8..c3ef3ff 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4859,10 +4859,10 @@ Perl_dofile(pTHX_ OP *term, I32 force_builtin)
     }
 
     if (gv && GvCVu(gv) && GvIMPORTED_CV(gv)) {
-       doop = ck_subr(newUNOP(OP_ENTERSUB, OPf_STACKED,
+       doop = newUNOP(OP_ENTERSUB, OPf_STACKED,
                               op_append_elem(OP_LIST, term,
                                           scalar(newUNOP(OP_RV2CV, 0,
-                                                         newGVOP(OP_GV, 0, gv))))));
+                                                         newGVOP(OP_GV, 0, gv)))));
     }
     else {
        doop = newUNOP(OP_DOFILE, 0, scalar(term));