This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_ncmp: favour the non- Perl_isnan route
[perl5.git] / pp.c
diff --git a/pp.c b/pp.c
index d3d4cc8..997b5ba 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -2059,16 +2059,6 @@ PP(pp_lt)
        }
     }
 #endif
-#ifndef NV_PRESERVES_UV
-#ifdef PERL_PRESERVE_IVUV
-    else
-#endif
-    if (SvROK(TOPs) && !SvAMAGIC(TOPs) && SvROK(TOPm1s) && !SvAMAGIC(TOPm1s)) {
-       SP--;
-       SETs(boolSV(SvRV(TOPs) < SvRV(TOPp1s)));
-       RETURN;
-    }
-#endif
     {
 #if defined(NAN_COMPARE_BROKEN) && defined(Perl_isnan)
       dPOPTOPnnrl_nomg;
@@ -2143,16 +2133,6 @@ PP(pp_gt)
        }
     }
 #endif
-#ifndef NV_PRESERVES_UV
-#ifdef PERL_PRESERVE_IVUV
-    else
-#endif
-    if (SvROK(TOPs) && !SvAMAGIC(TOPs) && SvROK(TOPm1s) && !SvAMAGIC(TOPm1s)) {
-        SP--;
-        SETs(boolSV(SvRV(TOPs) > SvRV(TOPp1s)));
-        RETURN;
-    }
-#endif
     {
 #if defined(NAN_COMPARE_BROKEN) && defined(Perl_isnan)
       dPOPTOPnnrl_nomg;
@@ -2227,16 +2207,6 @@ PP(pp_le)
        }
     }
 #endif
-#ifndef NV_PRESERVES_UV
-#ifdef PERL_PRESERVE_IVUV
-    else
-#endif
-    if (SvROK(TOPs) && !SvAMAGIC(TOPs) && SvROK(TOPm1s) && !SvAMAGIC(TOPm1s)) {
-        SP--;
-        SETs(boolSV(SvRV(TOPs) <= SvRV(TOPp1s)));
-        RETURN;
-    }
-#endif
     {
 #if defined(NAN_COMPARE_BROKEN) && defined(Perl_isnan)
       dPOPTOPnnrl_nomg;
@@ -2311,16 +2281,6 @@ PP(pp_ge)
        }
     }
 #endif
-#ifndef NV_PRESERVES_UV
-#ifdef PERL_PRESERVE_IVUV
-    else
-#endif
-    if (SvROK(TOPs) && !SvAMAGIC(TOPs) && SvROK(TOPm1s) && !SvAMAGIC(TOPm1s)) {
-        SP--;
-        SETs(boolSV(SvRV(TOPs) >= SvRV(TOPp1s)));
-        RETURN;
-    }
-#endif
     {
 #if defined(NAN_COMPARE_BROKEN) && defined(Perl_isnan)
       dPOPTOPnnrl_nomg;
@@ -2339,13 +2299,6 @@ PP(pp_ne)
 {
     dVAR; dSP;
     tryAMAGICbin_MG(ne_amg,AMGf_set|AMGf_numeric);
-#ifndef NV_PRESERVES_UV
-    if (SvROK(TOPs) && !SvAMAGIC(TOPs) && SvROK(TOPm1s) && !SvAMAGIC(TOPm1s)) {
-        SP--;
-       SETs(boolSV(SvRV(TOPs) != SvRV(TOPp1s)));
-       RETURN;
-    }
-#endif
 #ifdef PERL_PRESERVE_IVUV
     SvIV_please_nomg(TOPs);
     if (SvIOK(TOPs)) {
@@ -2416,14 +2369,6 @@ PP(pp_ncmp)
 {
     dVAR; dSP; dTARGET;
     tryAMAGICbin_MG(ncmp_amg, AMGf_numeric);
-#ifndef NV_PRESERVES_UV
-    if (SvROK(TOPs) && !SvAMAGIC(TOPs) && SvROK(TOPm1s) && !SvAMAGIC(TOPm1s)) {
-       const UV right = PTR2UV(SvRV(POPs));
-       const UV left = PTR2UV(SvRV(TOPs));
-       SETi((left > right) - (left < right));
-       RETURN;
-    }
-#endif
 #ifdef PERL_PRESERVE_IVUV
     /* Fortunately it seems NaN isn't IOK */
     SvIV_please_nomg(TOPs);
@@ -2494,7 +2439,7 @@ PP(pp_ncmp)
       dPOPTOPnnrl_nomg;
       I32 value;
 
-#ifdef Perl_isnan
+#if defined(NAN_COMPARE_BROKEN) && defined(Perl_isnan)
       if (Perl_isnan(left) || Perl_isnan(right)) {
          SETs(&PL_sv_undef);
          RETURN;
@@ -6152,7 +6097,7 @@ PP(pp_split)
            I32 rex_return;
            PUTBACK;
            rex_return = CALLREGEXEC(rx, (char*)s, (char*)strend, (char*)orig, 1 ,
-                           sv, NULL, 0);
+                                    sv, NULL, SvSCREAM(sv) ? REXEC_SCREAM : 0);
            SPAGAIN;
            if (rex_return == 0)
                break;