This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove unnecessary code from pp_add
authorFather Chrysostomos <sprout@cpan.org>
Fri, 8 Apr 2011 16:05:38 +0000 (09:05 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 8 Apr 2011 16:05:38 +0000 (09:05 -0700)
This code, added recently in 4c3ac4b and amended in 837c879, has been
unnecessary since commit 75ea7a1.

pp_hot.c

index 06b837b..f8a61cb 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -501,19 +501,6 @@ PP(pp_add)
     svl = TOPm1s;
 
     useleft = USE_LEFT(svl);
-    if(useleft && svr == svl && SvGMAGICAL(svl)) {
-       /* Print the uninitialized warning now, so it includes the vari-
-          able name. */
-       if (!SvOK(svl)) {
-           if (ckWARN(WARN_UNINITIALIZED)) report_uninit(svl);
-           useleft = 0;
-       }
-       /* Non-magical sv_mortalcopy */
-       svl = sv_newmortal();
-       sv_setsv_flags(svl, svr, 0);
-       SvGETMAGIC(svr);
-    }
-
 #ifdef PERL_PRESERVE_IVUV
     /* We must see if we can perform the addition with integers if possible,
        as the integer code detects overflow while the NV code doesn't.