From: Father Chrysostomos Date: Fri, 8 Apr 2011 20:03:56 +0000 (-0700) Subject: Revert parts of c31c291..96b6b87 X-Git-Tag: accepted/trunk/20130322.191538~4461 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=096c060c3521cdedd801e684e4308ce9cee97019;p=platform%2Fupstream%2Fperl.git Revert parts of c31c291..96b6b87 This restores the old definition of dPOPTOPiirl_nomg from before 96b6b87 and the old definition of dPOPXiirl_ul_nomg from before e62ca0f (except for a bug fix: POPi cannot be used since it’s magical). It also reverts most of c31c291. This does mean that uninitialized warnings for various operators are back in reverse order. So I am reinstating a bug with this commit. But that bug was never a 5.14 blocker and so should never have been fixed during code freeze (and there is the slight possibility that the fix would break sensitive test suites). It was only fixed ‘for free’ as a side effect of fixing [perl #87708], but that bug turned out to have a better fix (commit 75ea7a1) that allows these changes to be reverted. --- diff --git a/pp.c b/pp.c index 9858f91..8b15b6e 100644 --- a/pp.c +++ b/pp.c @@ -3082,7 +3082,7 @@ PP(pp_atan2) dVAR; dSP; dTARGET; tryAMAGICbin_MG(atan2_amg, 0); { - dPOPTOPnnrl_halfmg; + dPOPTOPnnrl_nomg; SETn(Perl_atan2(left, right)); RETURN; } diff --git a/pp.h b/pp.h index ca45f61..5cde92b 100644 --- a/pp.h +++ b/pp.h @@ -355,10 +355,9 @@ Does not use C. See also C, C and C. SV *leftsv = CAT2(X,s); \ IV left = USE_LEFT(leftsv) ? SvIV(leftsv) : 0 #define dPOPXiirl_ul_nomg(X) \ - SV *rightsv = POPs; \ + IV right = (sp--, SvIV_nomg(TOPp1s)); \ SV *leftsv = CAT2(X,s); \ - IV left = USE_LEFT(leftsv) ? SvIV_nomg(leftsv) : 0; \ - IV right = SvIV_nomg(rightsv) + IV left = USE_LEFT(leftsv) ? SvIV_nomg(leftsv) : 0 #define dPOPPOPssrl dPOPXssrl(POP) #define dPOPPOPnnrl dPOPXnnrl(POP) @@ -371,17 +370,11 @@ Does not use C. See also C, C and C. #define dPOPTOPnnrl_ul dPOPXnnrl_ul(TOP) #define dPOPTOPnnrl_nomg \ NV right = SvNV_nomg(TOPs); NV left = (sp--, SvNV_nomg(TOPs)) -#ifdef PERL_CORE -# define dPOPTOPnnrl_halfmg \ - NV left = SvNV_nomg(TOPm1s); \ - NV right = TOPs == TOPm1s ? SvNV(TOPs) : SvNV_nomg(TOPs); sp-- -#endif #define dPOPTOPiirl dPOPXiirl(TOP) #define dPOPTOPiirl_ul dPOPXiirl_ul(TOP) #define dPOPTOPiirl_ul_nomg dPOPXiirl_ul_nomg(TOP) #define dPOPTOPiirl_nomg \ - IV left = SvIV_nomg(TOPm1s); \ - IV right = (sp--, TOPp1s == TOPs ? SvIV(TOPs) : SvIV_nomg(TOPp1s)) + IV right = SvIV_nomg(TOPs); IV left = (sp--, SvIV_nomg(TOPs)) #define RETPUSHYES RETURNX(PUSHs(&PL_sv_yes)) #define RETPUSHNO RETURNX(PUSHs(&PL_sv_no)) diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index b73edf4..ff6736f 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -556,31 +556,31 @@ $v = $m1 != $g1; $v = $m1 <=> $g1; $v = -$m1; EXPECT -Use of uninitialized value $m1 in integer addition (+) at - line 6. Use of uninitialized value $g1 in integer addition (+) at - line 6. -Use of uninitialized value $m1 in integer subtraction (-) at - line 7. +Use of uninitialized value $m1 in integer addition (+) at - line 6. Use of uninitialized value $g1 in integer subtraction (-) at - line 7. -Use of uninitialized value $m1 in integer multiplication (*) at - line 8. +Use of uninitialized value $m1 in integer subtraction (-) at - line 7. Use of uninitialized value $g1 in integer multiplication (*) at - line 8. +Use of uninitialized value $m1 in integer multiplication (*) at - line 8. Use of uninitialized value $g1 in integer division (/) at - line 9. Use of uninitialized value $m2 in integer division (/) at - line 10. -Use of uninitialized value $m1 in integer modulus (%) at - line 11. Use of uninitialized value $g1 in integer modulus (%) at - line 11. +Use of uninitialized value $m1 in integer modulus (%) at - line 11. Use of uninitialized value $m2 in integer modulus (%) at - line 12. -Use of uninitialized value $m1 in integer lt (<) at - line 13. Use of uninitialized value $g1 in integer lt (<) at - line 13. -Use of uninitialized value $m1 in integer gt (>) at - line 14. +Use of uninitialized value $m1 in integer lt (<) at - line 13. Use of uninitialized value $g1 in integer gt (>) at - line 14. -Use of uninitialized value $m1 in integer le (<=) at - line 15. +Use of uninitialized value $m1 in integer gt (>) at - line 14. Use of uninitialized value $g1 in integer le (<=) at - line 15. -Use of uninitialized value $m1 in integer ge (>=) at - line 16. +Use of uninitialized value $m1 in integer le (<=) at - line 15. Use of uninitialized value $g1 in integer ge (>=) at - line 16. -Use of uninitialized value $m1 in integer eq (==) at - line 17. +Use of uninitialized value $m1 in integer ge (>=) at - line 16. Use of uninitialized value $g1 in integer eq (==) at - line 17. -Use of uninitialized value $m1 in integer ne (!=) at - line 18. +Use of uninitialized value $m1 in integer eq (==) at - line 17. Use of uninitialized value $g1 in integer ne (!=) at - line 18. -Use of uninitialized value $m1 in integer comparison (<=>) at - line 19. +Use of uninitialized value $m1 in integer ne (!=) at - line 18. Use of uninitialized value $g1 in integer comparison (<=>) at - line 19. +Use of uninitialized value $m1 in integer comparison (<=>) at - line 19. Use of uninitialized value $m1 in integer negation (-) at - line 20. ######## use warnings 'uninitialized'; @@ -927,8 +927,8 @@ $v = oct $m1; $v = oct; $v = length; # does not warn EXPECT -Use of uninitialized value $m1 in atan2 at - line 5. Use of uninitialized value $g1 in atan2 at - line 5. +Use of uninitialized value $m1 in atan2 at - line 5. Use of uninitialized value $m1 in sin at - line 6. Use of uninitialized value $m1 in cos at - line 7. Use of uninitialized value $m1 in rand at - line 8.