diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2012-08-24 17:07:59 -0400 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-08-24 18:03:10 -0700 |
commit | 5ff48db8e3239c5f11fd364af28ea58d5f036735 (patch) | |
tree | f107a1ffbbb828ad95f435a36ec4dd32da7b0fac /perl.c | |
parent | 321f1aea5d14e907b89003d592f35023f40c4b65 (diff) | |
download | perl-5ff48db8e3239c5f11fd364af28ea58d5f036735.tar.gz |
[perl #114572] perl.c: fix locality/rmv redundant nulls in call_sv/eval_sv
Small tweaks to improve locality/more opportunity for C compiler to
optimize. Also remove redunant nulls, since the OP structs are
null filled a line or 2 before.
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -2641,7 +2641,6 @@ Perl_call_sv(pTHX_ SV *sv, VOL I32 flags) } Zero(&myop, 1, LOGOP); - myop.op_next = NULL; if (!(flags & G_NOARGS)) myop.op_flags |= OPf_STACKED; myop.op_flags |= OP_GIMME_REVERSE(flags); @@ -2660,11 +2659,11 @@ Perl_call_sv(pTHX_ SV *sv, VOL I32 flags) * curstash may be meaningless. */ && (SvTYPE(sv) != SVt_PVCV || CvSTASH((const CV *)sv) != PL_debstash) && !(flags & G_NODEBUG)) - PL_op->op_private |= OPpENTERSUB_DB; + myop.op_private |= OPpENTERSUB_DB; if (flags & G_METHOD) { Zero(&method_op, 1, UNOP); - method_op.op_next = PL_op; + method_op.op_next = (OP*)&myop; method_op.op_ppaddr = PL_ppaddr[OP_METHOD]; method_op.op_type = OP_METHOD; myop.op_ppaddr = PL_ppaddr[OP_ENTERSUB]; @@ -2771,13 +2770,12 @@ Perl_eval_sv(pTHX_ SV *sv, I32 flags) SAVEOP(); PL_op = (OP*)&myop; - Zero(PL_op, 1, UNOP); + Zero(&myop, 1, UNOP); EXTEND(PL_stack_sp, 1); *++PL_stack_sp = sv; if (!(flags & G_NOARGS)) myop.op_flags = OPf_STACKED; - myop.op_next = NULL; myop.op_type = OP_ENTEREVAL; myop.op_flags |= OP_GIMME_REVERSE(flags); if (flags & G_KEEPERR) |