In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/68567d271d7bcc0392c9f9bdd834ad94db1e4773?hp=d8c6310a4f016fa2e6af68b606ee53084fbf4a8a>
- Log ----------------------------------------------------------------- commit 68567d271d7bcc0392c9f9bdd834ad94db1e4773 Author: Father Chrysostomos <[email protected]> Date: Thu Sep 18 22:10:14 2014 -0700 Update perldiag to reflect âGlobal symbolâ change Why didnât t/porting/diag.t catch this? M pod/perldiag.pod commit 0789821b290971da5bf9411a333ee664f86aff6e Author: Daniel Dragan <[email protected]> Date: Thu Sep 18 23:24:18 2014 -0400 remove duplicate SvNV calls in pp_enteriter commit a2309040b8 added duplicate SvNV calls, remove them. Reorder the "SvUV_nomg(sv) > (UV)IV_MAX || SvNV_nomg(sv) > (NV)UV_MAX" so the var will be stored in a FP CPU reg for all comparisons, and not saved/fetched to/from mem across the SvUV func call. Due to complexity, I am not unrolling and fusing SvNV_nomg and SvOK. VC 2003 32b size of func in machine code bytes before 0x4d3 after 0x4a2 M pp_ctl.c ----------------------------------------------------------------------- Summary of changes: pod/perldiag.pod | 3 ++- pp_ctl.c | 25 +++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 687ae46..064aea9 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -2104,7 +2104,8 @@ is experimental, so its behavior may change or even be removed in any future release of perl. See the explanation under L<perlsyn/Experimental Details on given and when>. -=item Global symbol "%s" requires explicit package name +=item Global symbol "%s" requires explicit package name (did you forget to +declare "my %s"?) (F) You've said "use strict" or "use strict vars", which indicates that all variables must either be lexically scoped (using "my" or "state"), diff --git a/pp_ctl.c b/pp_ctl.c index d5c8d7e..db125b8 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2121,29 +2121,30 @@ PP(pp_enteriter) SvGETMAGIC(sv); SvGETMAGIC(right); if (RANGE_IS_NUMERIC(sv,right)) { + NV nv; cx->cx_type &= ~CXTYPEMASK; cx->cx_type |= CXt_LOOP_LAZYIV; /* Make sure that no-one re-orders cop.h and breaks our assumptions */ assert(CxTYPE(cx) == CXt_LOOP_LAZYIV); #ifdef NV_PRESERVES_UV - if ((SvOK(sv) && ((SvNV_nomg(sv) < (NV)IV_MIN) || - (SvNV_nomg(sv) > (NV)IV_MAX))) + if ((SvOK(sv) && (((nv = SvNV_nomg(sv)) < (NV)IV_MIN) || + (nv > (NV)IV_MAX))) || - (SvOK(right) && ((SvNV_nomg(right) > (NV)IV_MAX) || - (SvNV_nomg(right) < (NV)IV_MIN)))) + (SvOK(right) && (((nv = SvNV_nomg(right)) > (NV)IV_MAX) || + (nv < (NV)IV_MIN)))) #else - if ((SvOK(sv) && ((SvNV_nomg(sv) <= (NV)IV_MIN) + if ((SvOK(sv) && (((nv = SvNV_nomg(sv)) <= (NV)IV_MIN) || - ((SvNV_nomg(sv) > 0) && - ((SvUV_nomg(sv) > (UV)IV_MAX) || - (SvNV_nomg(sv) > (NV)UV_MAX))))) + ((nv > 0) && + ((nv > (NV)UV_MAX) || + (SvUV_nomg(sv) > (UV)IV_MAX))))) || - (SvOK(right) && ((SvNV_nomg(right) <= (NV)IV_MIN) + (SvOK(right) && (((nv = SvNV_nomg(right)) <= (NV)IV_MIN) || - ((SvNV_nomg(right) > 0) && - ((SvUV_nomg(right) > (UV)IV_MAX) || - (SvNV_nomg(right) > (NV)UV_MAX)) + ((nv > 0) && + ((nv > (NV)UV_MAX) || + (SvUV_nomg(right) > (UV)IV_MAX)) )))) #endif DIE(aTHX_ "Range iterator outside integer range"); -- Perl5 Master Repository
