summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2002-10-18 14:36:40 +0100
committerhv <hv@crypt.org>2002-10-22 17:04:26 +0000
commitf3548bdc4d2efd11e139d110e60764b9dae81319 (patch)
tree422946e9b45718c9b89294215cd0ce41c7e258ea /scope.c
parente0fa987931295419ee9237d08014c4c5381f1cf8 (diff)
downloadperl-f3548bdc4d2efd11e139d110e60764b9dae81319.tar.gz
PL_curpad == AvARRAY(PL_comppad) always
Message-ID: <20021018133640.A19172@fdgroup.com> p4raw-id: //depot/perl@18048
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/scope.c b/scope.c
index a1da83b01c..8691057527 100644
--- a/scope.c
+++ b/scope.c
@@ -460,8 +460,9 @@ void
Perl_save_padsv(pTHX_ PADOFFSET off)
{
SSCHECK(4);
+ ASSERT_CURPAD_ACTIVE("save_padsv");
SSPUSHPTR(PL_curpad[off]);
- SSPUSHPTR(PL_curpad);
+ SSPUSHPTR(PL_comppad);
SSPUSHLONG((long)off);
SSPUSHINT(SAVEt_PADSV);
}
@@ -534,6 +535,7 @@ Perl_save_freepv(pTHX_ char *pv)
void
Perl_save_clearsv(pTHX_ SV **svp)
{
+ ASSERT_CURPAD_ACTIVE("save_clearsv");
SSCHECK(2);
SSPUSHLONG((long)(svp-PL_curpad));
SSPUSHINT(SAVEt_CLEARSV);
@@ -849,8 +851,7 @@ Perl_leave_scope(pTHX_ I32 base)
break;
case SAVEt_FREEOP:
ptr = SSPOPPTR;
- if (PL_comppad)
- PL_curpad = AvARRAY(PL_comppad);
+ ASSERT_CURPAD_LEGAL("SAVEt_FREEOP"); /* XXX DAPM tmp */
op_free((OP*)ptr);
break;
case SAVEt_FREEPV:
@@ -862,10 +863,9 @@ Perl_leave_scope(pTHX_ I32 base)
sv = *(SV**)ptr;
DEBUG_Xv(PerlIO_printf(Perl_debug_log,
- "Pad [0x%"UVxf"] clearsv: %ld sv=0x%"UVxf"<%"IVdf"> %s\n",
- PTR2UV(PL_curpad), (long)((SV **)ptr-PL_curpad),
- PTR2UV(sv),
- (IV)SvREFCNT(sv),
+ "Pad 0x%"UVxf"[0x%"UVxf"] clearsv: %ld sv=0x%"UVxf"<%"IVdf"> %s\n",
+ PTR2UV(PL_comppad), PTR2UV(PL_curpad),
+ (long)((SV **)ptr-PL_curpad), PTR2UV(sv), (IV)SvREFCNT(sv),
(SvREFCNT(sv) <= 1 && !SvOBJECT(sv)) ? "clear" : "abandon"
));
@@ -990,7 +990,7 @@ Perl_leave_scope(pTHX_ I32 base)
*(I32*)&PL_hints = (I32)SSPOPINT;
break;
case SAVEt_COMPPAD:
- PL_comppad = (AV*)SSPOPPTR;
+ PL_comppad = (PAD*)SSPOPPTR;
if (PL_comppad)
PL_curpad = AvARRAY(PL_comppad);
else
@@ -1001,7 +1001,7 @@ Perl_leave_scope(pTHX_ I32 base)
PADOFFSET off = (PADOFFSET)SSPOPLONG;
ptr = SSPOPPTR;
if (ptr)
- ((PAD)ptr)[off] = (SV*)SSPOPPTR;
+ AvARRAY((PAD*)ptr)[off] = (SV*)SSPOPPTR;
}
break;
default: