From 492254706dd070a67dab2799fba515e6e4c3a3bb Mon Sep 17 00:00:00 2001 From: Daniel Dragan Date: Tue, 24 Dec 2013 05:04:55 -0500 Subject: pp_sys.c remove null checks and locality pp_enterwrite, EXTEND contains a funccall, dont save gv around it pp_ioctl, move optype to first place used to reduce liveness --- pp_sys.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'pp_sys.c') diff --git a/pp_sys.c b/pp_sys.c index 08aead72d8..adcf76bdfb 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -686,10 +686,10 @@ PP(pp_pipe_op) assert (isGV_with_GP(rgv)); assert (isGV_with_GP(wgv)); rstio = GvIOn(rgv); - wstio = GvIOn(wgv); - if (IoIFP(rstio)) do_close(rgv, FALSE); + + wstio = GvIOn(wgv); if (IoIFP(wstio)) do_close(wgv, FALSE); @@ -1378,8 +1378,8 @@ PP(pp_enterwrite) SV *tmpsv = NULL; if (MAXARG == 0) { - gv = PL_defoutgv; EXTEND(SP, 1); + gv = PL_defoutgv; } else { gv = MUTABLE_GV(POPs); @@ -2264,7 +2264,7 @@ PP(pp_ioctl) dVAR; dSP; dTARGET; SV * const argsv = POPs; const unsigned int func = POPu; - const int optype = PL_op->op_type; + int optype; GV * const gv = MUTABLE_GV(POPs); IO * const io = GvIOn(gv); char *s; @@ -2293,6 +2293,7 @@ PP(pp_ioctl) s = INT2PTR(char*,retval); /* ouch */ } + optype = PL_op->op_type; TAINT_PROPER(PL_op_desc[optype]); if (optype == OP_IOCTL) @@ -2595,7 +2596,7 @@ PP(pp_ssockopt) int fd; Sock_size_t len; - if (!io || !IoIFP(io)) + if (!IoIFP(io)) goto nuts; fd = PerlIO_fileno(IoIFP(io)); @@ -2665,7 +2666,7 @@ PP(pp_getpeername) SV *sv; int fd; - if (!io || !IoIFP(io)) + if (!IoIFP(io)) goto nuts; sv = sv_2mortal(newSV(257)); -- cgit v1.2.1