This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "Set PL_comppad_name on sub entry"
authorFather Chrysostomos <sprout@cpan.org>
Sun, 16 Sep 2012 07:20:23 +0000 (00:20 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 17 Sep 2012 23:57:51 +0000 (16:57 -0700)
This reverts commit d2c8bf052f5a8bb99050f6d2418d77151eb4b468.

pad.h
scope.c
scope.h
sv.c

diff --git a/pad.h b/pad.h
index a0b5573..f65af17 100644 (file)
--- a/pad.h
+++ b/pad.h
@@ -172,7 +172,7 @@ XXX DAPM it would make more sense to make the arg a PADOFFSET
 Clear the pointed to pad value on scope exit. (i.e. the runtime action of 'my')
 
 =for apidoc m|void|SAVECOMPPAD
-Save PL_comppad_name, PL_comppad and PL_curpad.
+save PL_comppad and PL_curpad
 
 
 =for apidoc Amx|PAD **|PadlistARRAY|PADLIST padlist
@@ -318,7 +318,6 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL()
 
 
 #define PAD_SET_CUR_NOSAVE(padlist,nth) \
-       PL_comppad_name = PadlistNAMES(padlist);                \
        PL_comppad = (PAD*) (PadlistARRAY(padlist)[nth]);       \
        PL_curpad = AvARRAY(PL_comppad);                        \
        DEBUG_Xv(PerlIO_printf(Perl_debug_log,                  \
diff --git a/scope.c b/scope.c
index 6f8a8b2..c767571 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -1078,7 +1078,6 @@ Perl_leave_scope(pTHX_ I32 base)
                PL_curpad = AvARRAY(PL_comppad);
            else
                PL_curpad = NULL;
-           PL_comppad_name = (PADNAMELIST*)SSPOPPTR;
            break;
        case SAVEt_PADSV_AND_MORTALIZE:
            {
diff --git a/scope.h b/scope.h
index a69be5f..0fad9a3 100644 (file)
--- a/scope.h
+++ b/scope.h
@@ -208,8 +208,7 @@ scope has the given name. Name must be a literal string.
 
 #define SAVEHINTS()    save_hints()
 
-#define SAVECOMPPAD() save_pushptrptr(MUTABLE_SV(PL_comppad_name), \
-                                    MUTABLE_SV(PL_comppad), SAVEt_COMPPAD)
+#define SAVECOMPPAD() save_pushptr(MUTABLE_SV(PL_comppad), SAVEt_COMPPAD)
 
 #define SAVESWITCHSTACK(f,t) \
     STMT_START {                                       \
diff --git a/sv.c b/sv.c
index f361259..2312a36 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -12469,8 +12469,6 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
            TOPPTR(nss,ix) = sv_dup_inc(sv, param);
            /* fall through */
        case SAVEt_COMPPAD:
-           sv = (const SV *) POPPTR(ss,ix);
-           TOPPTR(nss,ix) = sv_dup(sv, param);
        case SAVEt_NSTAB:
            sv = (const SV *) POPPTR(ss,ix);
            TOPPTR(nss,ix) = sv_dup(sv, param);