From bf49b057b09bec860588a9b554c3a77683394722 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Wed, 6 Oct 1999 02:36:53 +0000 Subject: make die/warn and other diagnostics go to wherever STDERR happens to point at; change places that meant Perl_debug_log rather than PerlIO_stderr() p4raw-id: //depot/perl@4302 --- scope.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index 44c3d923a9..8952f43a59 100644 --- a/scope.c +++ b/scope.c @@ -437,7 +437,7 @@ Perl_save_threadsv(pTHX_ PADOFFSET i) #ifdef USE_THREADS dTHR; SV **svp = &THREADSV(i); /* XXX Change to save by offset */ - DEBUG_S(PerlIO_printf(PerlIO_stderr(), "save_threadsv %u: %p %p:%s\n", + DEBUG_S(PerlIO_printf(Perl_debug_log, "save_threadsv %u: %p %p:%s\n", i, svp, *svp, SvPEEK(*svp))); save_svref(svp); return svp; @@ -646,7 +646,7 @@ Perl_leave_scope(pTHX_ I32 base) ptr = SSPOPPTR; restore_sv: sv = *(SV**)ptr; - DEBUG_S(PerlIO_printf(PerlIO_stderr(), + DEBUG_S(PerlIO_printf(Perl_debug_log, "restore svref: %p %p:%s -> %p:%s\n", ptr, sv, SvPEEK(sv), value, SvPEEK(value))); if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv) && -- cgit v1.2.1 From c76ac1ee16c5c9591d8ffad5a0651b7f81738b68 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sun, 10 Oct 1999 20:42:40 +0000 Subject: revert SAVEDESTRUCTOR() to accepting void(*)(void*) for source compatibility; introduce SAVEDESTRUCTOR_X() that accepts void(*)(pTHX_ void*) p4raw-id: //depot/perl@4339 --- scope.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index 8952f43a59..9ee0429e02 100644 --- a/scope.c +++ b/scope.c @@ -541,7 +541,7 @@ Perl_save_list(pTHX_ register SV **sarg, I32 maxsarg) } void -Perl_save_destructor(pTHX_ DESTRUCTORFUNC_t f, void* p) +Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p) { dTHR; SSCHECK(3); @@ -550,6 +550,16 @@ Perl_save_destructor(pTHX_ DESTRUCTORFUNC_t f, void* p) SSPUSHINT(SAVEt_DESTRUCTOR); } +void +Perl_save_destructor_x(pTHX_ DESTRUCTORFUNC_t f, void* p) +{ + dTHR; + SSCHECK(3); + SSPUSHDXPTR(f); + SSPUSHPTR(p); + SSPUSHINT(SAVEt_DESTRUCTOR_X); +} + void Perl_save_aelem(pTHX_ AV *av, I32 idx, SV **sptr) { @@ -831,7 +841,11 @@ Perl_leave_scope(pTHX_ I32 base) break; case SAVEt_DESTRUCTOR: ptr = SSPOPPTR; - CALLDESTRUCTOR(aTHXo_ ptr); + (*SSPOPDPTR)(ptr); + break; + case SAVEt_DESTRUCTOR_X: + ptr = SSPOPPTR; + (*SSPOPDXPTR)(aTHXo_ ptr); break; case SAVEt_REGCONTEXT: case SAVEt_ALLOC: -- cgit v1.2.1 From db36c5a16ec06ab929abf72b6174b106e97b8088 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Thu, 14 Oct 1999 02:21:31 +0000 Subject: avoid inefficiency in change#3386 (every longjmp() was followed by an avoidable call to setjmp()) p4raw-link: @3386 on //depot/perl: 312caa8e97f1c7ee342a9895c2f0e749625b4929 p4raw-id: //depot/perl@4372 --- scope.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index 9ee0429e02..1597acc9dc 100644 --- a/scope.c +++ b/scope.c @@ -17,26 +17,27 @@ #include "perl.h" void * -Perl_default_protect(pTHX_ int *excpt, protect_body_t body, ...) +Perl_default_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt, + protect_body_t body, ...) { void *ret; va_list args; va_start(args, body); - ret = vdefault_protect(excpt, body, &args); + ret = vdefault_protect(pcur_env, excpt, body, &args); va_end(args); return ret; } void * -Perl_vdefault_protect(pTHX_ int *excpt, protect_body_t body, va_list *args) +Perl_vdefault_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt, + protect_body_t body, va_list *args) { dTHR; - dJMPENV; int ex; void *ret; DEBUG_l(Perl_deb(aTHX_ "Setting up local jumplevel %p, was %p\n", - &cur_env, PL_top_env)); + pcur_env, PL_top_env)); JMPENV_PUSH(ex); if (ex) ret = NULL; -- cgit v1.2.1 From b900a5214ea580557fb7c41bb3b529d90bad25a3 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Sat, 23 Oct 1999 21:47:49 +0000 Subject: More printf-fixes (see also #4426). p4raw-id: //depot/cfgperl@4429 --- scope.c | 74 +++++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 38 insertions(+), 36 deletions(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index 1597acc9dc..e86a9fe183 100644 --- a/scope.c +++ b/scope.c @@ -918,11 +918,13 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx) PerlIO_printf(Perl_debug_log, "CX %ld = %s\n", (long)(cx - cxstack), PL_block_type[CxTYPE(cx)]); if (CxTYPE(cx) != CXt_SUBST) { PerlIO_printf(Perl_debug_log, "BLK_OLDSP = %ld\n", (long)cx->blk_oldsp); - PerlIO_printf(Perl_debug_log, "BLK_OLDCOP = 0x%lx\n", (long)cx->blk_oldcop); + PerlIO_printf(Perl_debug_log, "BLK_OLDCOP = 0x%"UVxf"\n", + PTR2UV(cx->blk_oldcop)); PerlIO_printf(Perl_debug_log, "BLK_OLDMARKSP = %ld\n", (long)cx->blk_oldmarksp); PerlIO_printf(Perl_debug_log, "BLK_OLDSCOPESP = %ld\n", (long)cx->blk_oldscopesp); PerlIO_printf(Perl_debug_log, "BLK_OLDRETSP = %ld\n", (long)cx->blk_oldretsp); - PerlIO_printf(Perl_debug_log, "BLK_OLDPM = 0x%lx\n", (long)cx->blk_oldpm); + PerlIO_printf(Perl_debug_log, "BLK_OLDPM = 0x%"UVxf"\n", + PTR2UV(cx->blk_oldpm)); PerlIO_printf(Perl_debug_log, "BLK_GIMME = %s\n", cx->blk_gimme ? "LIST" : "SCALAR"); } switch (CxTYPE(cx)) { @@ -930,12 +932,12 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx) case CXt_BLOCK: break; case CXt_SUB: - PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%lx\n", - (long)cx->blk_sub.cv); - PerlIO_printf(Perl_debug_log, "BLK_SUB.GV = 0x%lx\n", - (long)cx->blk_sub.gv); - PerlIO_printf(Perl_debug_log, "BLK_SUB.DFOUTGV = 0x%lx\n", - (long)cx->blk_sub.dfoutgv); + PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n", + PTR2UV(cx->blk_sub.cv)); + PerlIO_printf(Perl_debug_log, "BLK_SUB.GV = 0x%"UVxf"\n", + PTR2UV(cx->blk_sub.gv)); + PerlIO_printf(Perl_debug_log, "BLK_SUB.DFOUTGV = 0x%"UVxf"\n", + PTR2UV(cx->blk_sub.dfoutgv)); PerlIO_printf(Perl_debug_log, "BLK_SUB.OLDDEPTH = %ld\n", (long)cx->blk_sub.olddepth); PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n", @@ -949,8 +951,8 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx) PL_op_desc[cx->blk_eval.old_op_type]); PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_NAME = %s\n", cx->blk_eval.old_name); - PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_EVAL_ROOT = 0x%lx\n", - (long)cx->blk_eval.old_eval_root); + PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_EVAL_ROOT = 0x%"UVxf"\n", + PTR2UV(cx->blk_eval.old_eval_root)); break; case CXt_LOOP: @@ -958,23 +960,23 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx) cx->blk_loop.label); PerlIO_printf(Perl_debug_log, "BLK_LOOP.RESETSP = %ld\n", (long)cx->blk_loop.resetsp); - PerlIO_printf(Perl_debug_log, "BLK_LOOP.REDO_OP = 0x%lx\n", - (long)cx->blk_loop.redo_op); - PerlIO_printf(Perl_debug_log, "BLK_LOOP.NEXT_OP = 0x%lx\n", - (long)cx->blk_loop.next_op); - PerlIO_printf(Perl_debug_log, "BLK_LOOP.LAST_OP = 0x%lx\n", - (long)cx->blk_loop.last_op); + PerlIO_printf(Perl_debug_log, "BLK_LOOP.REDO_OP = 0x%"UVxf"\n", + PTR2UV(cx->blk_loop.redo_op)); + PerlIO_printf(Perl_debug_log, "BLK_LOOP.NEXT_OP = 0x%"UVxf"\n", + PTR2UV(cx->blk_loop.next_op)); + PerlIO_printf(Perl_debug_log, "BLK_LOOP.LAST_OP = 0x%"UVxf"\n", + PTR2UV(cx->blk_loop.last_op)); PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERIX = %ld\n", (long)cx->blk_loop.iterix); - PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERARY = 0x%lx\n", - (long)cx->blk_loop.iterary); - PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERVAR = 0x%lx\n", - (long)cx->blk_loop.itervar); + PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERARY = 0x%"UVxf"\n", + PTR2UV(cx->blk_loop.iterary)); + PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERVAR = 0x%"UVxf"\n", + PTR2UV(cx->blk_loop.itervar)); if (cx->blk_loop.itervar) - PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERSAVE = 0x%lx\n", - (long)cx->blk_loop.itersave); - PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERLVAL = 0x%lx\n", - (long)cx->blk_loop.iterlval); + PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERSAVE = 0x%"UVxf"\n", + PTR2UV(cx->blk_loop.itersave)); + PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERLVAL = 0x%"UVxf"\n", + PTR2UV(cx->blk_loop.iterlval)); break; case CXt_SUBST: @@ -988,18 +990,18 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx) (long)cx->sb_once); PerlIO_printf(Perl_debug_log, "SB_ORIG = %s\n", cx->sb_orig); - PerlIO_printf(Perl_debug_log, "SB_DSTR = 0x%lx\n", - (long)cx->sb_dstr); - PerlIO_printf(Perl_debug_log, "SB_TARG = 0x%lx\n", - (long)cx->sb_targ); - PerlIO_printf(Perl_debug_log, "SB_S = 0x%lx\n", - (long)cx->sb_s); - PerlIO_printf(Perl_debug_log, "SB_M = 0x%lx\n", - (long)cx->sb_m); - PerlIO_printf(Perl_debug_log, "SB_STREND = 0x%lx\n", - (long)cx->sb_strend); - PerlIO_printf(Perl_debug_log, "SB_RXRES = 0x%lx\n", - (long)cx->sb_rxres); + PerlIO_printf(Perl_debug_log, "SB_DSTR = 0x%"UVxf"\n", + PTR2UV(cx->sb_dstr)); + PerlIO_printf(Perl_debug_log, "SB_TARG = 0x%"UVxf"\n", + PTR2UV(cx->sb_targ)); + PerlIO_printf(Perl_debug_log, "SB_S = 0x%"UVxf"\n", + PTR2UV(cx->sb_s)); + PerlIO_printf(Perl_debug_log, "SB_M = 0x%"UVxf"\n", + PTR2UV(cx->sb_m)); + PerlIO_printf(Perl_debug_log, "SB_STREND = 0x%"UVxf"\n", + PTR2UV(cx->sb_strend)); + PerlIO_printf(Perl_debug_log, "SB_RXRES = 0x%"UVxf"\n", + PTR2UV(cx->sb_rxres)); break; } #endif /* DEBUGGING */ -- cgit v1.2.1 From 18708f5a7334d978ddf7562cb7f58e28bec6e4ed Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sun, 31 Oct 1999 20:46:02 +0000 Subject: make nested ARGV/$^I loops work correctly; fixes several bugs in the way ARGV state was handled in readline(); writing a subroutine to do inplace edits is now possible, provided *ARGV, *ARGVOUT, $^I and $_ are localized where needed p4raw-id: //depot/perl@4502 --- scope.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index e86a9fe183..51aeed2dc0 100644 --- a/scope.c +++ b/scope.c @@ -279,9 +279,14 @@ Perl_save_gp(pTHX_ GV *gv, I32 empty) if (empty) { register GP *gp; + Newz(602, gp, 1, GP); + if (GvCVu(gv)) PL_sub_generation++; /* taking a method out of circulation */ - Newz(602, gp, 1, GP); + else if (GvIOp(gv) && (IoFLAGS(GvIOp(gv)) & IOf_ARGV)) { + gp->gp_io = newIO(); + IoFLAGS(gp->gp_io) |= IOf_ARGV|IOf_START; + } GvGP(gv) = gp_ref(gp); GvSV(gv) = NEWSV(72,0); GvLINE(gv) = PL_curcop->cop_line; -- cgit v1.2.1 From cc49e20bd7575d1d37e92731860d63daa4d52ecc Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Mon, 1 Nov 1999 17:09:44 +0000 Subject: macros for COP.cop_filegv access p4raw-id: //depot/perl@4505 --- scope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index 51aeed2dc0..da428d7642 100644 --- a/scope.c +++ b/scope.c @@ -283,7 +283,7 @@ Perl_save_gp(pTHX_ GV *gv, I32 empty) if (GvCVu(gv)) PL_sub_generation++; /* taking a method out of circulation */ - else if (GvIOp(gv) && (IoFLAGS(GvIOp(gv)) & IOf_ARGV)) { + if (GvIOp(gv) && (IoFLAGS(GvIOp(gv)) & IOf_ARGV)) { gp->gp_io = newIO(); IoFLAGS(gp->gp_io) |= IOf_ARGV|IOf_START; } -- cgit v1.2.1 From f1dbda3de5c3411948f38b5bfb0bf037571d20a6 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Sat, 6 Nov 1999 23:51:34 +0000 Subject: So many printfs, so little time. p4raw-id: //depot/cfgperl@4530 --- scope.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index da428d7642..9c8a0f402e 100644 --- a/scope.c +++ b/scope.c @@ -443,8 +443,8 @@ Perl_save_threadsv(pTHX_ PADOFFSET i) #ifdef USE_THREADS dTHR; SV **svp = &THREADSV(i); /* XXX Change to save by offset */ - DEBUG_S(PerlIO_printf(Perl_debug_log, "save_threadsv %u: %p %p:%s\n", - i, svp, *svp, SvPEEK(*svp))); + DEBUG_S(PerlIO_printf(Perl_debug_log, "save_threadsv %"UVuf": %p %p:%s\n", + (UV)i, svp, *svp, SvPEEK(*svp))); save_svref(svp); return svp; #else -- cgit v1.2.1 From 57843af05bc7863df9b9bfb6b37e3a29d08532a9 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Thu, 11 Nov 1999 06:04:20 +0000 Subject: another change towards a shareable optree: avoid pointer to filegv in COP; revert parts of change#4485 and s/xcv_filegv/xcv_file/ (CvFILE() may yet come in handy somewhere); adjust compiler doodads to suit p4raw-link: @4485 on //depot/perl: b195d4879f55e1610299cb9b1b55356940c2a577 p4raw-id: //depot/perl@4545 --- scope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index da428d7642..f9b5bc6eb6 100644 --- a/scope.c +++ b/scope.c @@ -289,7 +289,7 @@ Perl_save_gp(pTHX_ GV *gv, I32 empty) } GvGP(gv) = gp_ref(gp); GvSV(gv) = NEWSV(72,0); - GvLINE(gv) = PL_curcop->cop_line; + GvLINE(gv) = CopLINE(PL_curcop); GvEGV(gv) = gv; } else { -- cgit v1.2.1 From 7766f1371a6d2b58d0f46fbe6a60785860a39c1e Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Wed, 1 Dec 1999 01:00:09 +0000 Subject: more complete pseudo-fork() support for Windows p4raw-id: //depot/perl@4602 --- scope.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index 0fd3692a68..c0559dad17 100644 --- a/scope.c +++ b/scope.c @@ -427,6 +427,16 @@ Perl_save_pptr(pTHX_ char **pptr) SSPUSHINT(SAVEt_PPTR); } +void +Perl_save_vptr(pTHX_ void *ptr) +{ + dTHR; + SSCHECK(3); + SSPUSHPTR(*(char**)ptr); + SSPUSHPTR(ptr); + SSPUSHINT(SAVEt_VPTR); +} + void Perl_save_sptr(pTHX_ SV **sptr) { @@ -749,6 +759,7 @@ Perl_leave_scope(pTHX_ I32 base) ptr = SSPOPPTR; *(SV**)ptr = (SV*)SSPOPPTR; break; + case SAVEt_VPTR: /* random* reference */ case SAVEt_PPTR: /* char* reference */ ptr = SSPOPPTR; *(char**)ptr = (char*)SSPOPPTR; @@ -936,17 +947,25 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx) case CXt_NULL: case CXt_BLOCK: break; - case CXt_SUB: + case CXt_FORMAT: PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n", PTR2UV(cx->blk_sub.cv)); PerlIO_printf(Perl_debug_log, "BLK_SUB.GV = 0x%"UVxf"\n", PTR2UV(cx->blk_sub.gv)); PerlIO_printf(Perl_debug_log, "BLK_SUB.DFOUTGV = 0x%"UVxf"\n", PTR2UV(cx->blk_sub.dfoutgv)); + PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n", + (int)cx->blk_sub.hasargs); + break; + case CXt_SUB: + PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n", + PTR2UV(cx->blk_sub.cv)); PerlIO_printf(Perl_debug_log, "BLK_SUB.OLDDEPTH = %ld\n", (long)cx->blk_sub.olddepth); PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n", (int)cx->blk_sub.hasargs); + PerlIO_printf(Perl_debug_log, "BLK_SUB.LVAL = %d\n", + (int)cx->blk_sub.lval); break; case CXt_EVAL: PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_IN_EVAL = %ld\n", @@ -976,8 +995,8 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx) PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERARY = 0x%"UVxf"\n", PTR2UV(cx->blk_loop.iterary)); PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERVAR = 0x%"UVxf"\n", - PTR2UV(cx->blk_loop.itervar)); - if (cx->blk_loop.itervar) + PTR2UV(CxITERVAR(cx))); + if (CxITERVAR(cx)) PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERSAVE = 0x%"UVxf"\n", PTR2UV(cx->blk_loop.itersave)); PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERLVAL = 0x%"UVxf"\n", -- cgit v1.2.1 From e8347627432a616ec1485de221b2cd8c9e311c8b Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Wed, 8 Dec 1999 02:22:31 +0000 Subject: introduce save_I8() for saving byte values p4raw-id: //depot/perl@4665 --- scope.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'scope.c') diff --git a/scope.c b/scope.c index c0559dad17..7052282edb 100644 --- a/scope.c +++ b/scope.c @@ -404,6 +404,16 @@ Perl_save_I16(pTHX_ I16 *intp) SSPUSHINT(SAVEt_I16); } +void +Perl_save_I8(pTHX_ I8 *bytep) +{ + dTHR; + SSCHECK(3); + SSPUSHINT(*bytep); + SSPUSHPTR(bytep); + SSPUSHINT(SAVEt_I8); +} + void Perl_save_iv(pTHX_ IV *ivp) { @@ -751,6 +761,10 @@ Perl_leave_scope(pTHX_ I32 base) ptr = SSPOPPTR; *(I16*)ptr = (I16)SSPOPINT; break; + case SAVEt_I8: /* I8 reference */ + ptr = SSPOPPTR; + *(I8*)ptr = (I8)SSPOPINT; + break; case SAVEt_IV: /* IV reference */ ptr = SSPOPPTR; *(IV*)ptr = (IV)SSPOPIV; -- cgit v1.2.1 From 354992b151c6d0f4f02b9e65e8ba749a959e700d Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Fri, 4 Feb 2000 04:45:13 +0000 Subject: fix pad_alloc panic from C p4raw-id: //depot/perl@4970 --- scope.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scope.c') diff --git a/scope.c b/scope.c index 7052282edb..91e0374955 100644 --- a/scope.c +++ b/scope.c @@ -934,6 +934,13 @@ Perl_leave_scope(pTHX_ I32 base) } *(I32*)&PL_hints = (I32)SSPOPINT; break; + case SAVEt_COMPPAD: + PL_comppad = (AV*)SSPOPPTR; + if (PL_comppad) + PL_curpad = AvARRAY(PL_comppad); + else + PL_curpad = Null(SV**); + break; default: Perl_croak(aTHX_ "panic: leave_scope inconsistency"); } -- cgit v1.2.1 From 3818b22bb9ef820a2553aa5e3504220f3b156f21 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sun, 6 Feb 2000 20:45:30 +0000 Subject: set SvUTF8 on vectors only if there are chars > 127; update copyright years (from Gisle Aas) p4raw-id: //depot/perl@5009 --- scope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index 91e0374955..0f568543ba 100644 --- a/scope.c +++ b/scope.c @@ -1,6 +1,6 @@ /* scope.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. -- cgit v1.2.1 From 0f79a09d62eb410185d697430134f937ab4e917d Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sun, 13 Feb 2000 19:02:07 +0000 Subject: more purification (pp_require() could access free memory; vdie() could think message was random length when passed a null argument; utilize() didn't set up the hash for the method name leading to pp_method_named() accessing random state; PL_curpm wasn't zeroed properly) p4raw-id: //depot/perl@5072 --- scope.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index 0f568543ba..e6c31259ec 100644 --- a/scope.c +++ b/scope.c @@ -994,8 +994,9 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx) PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_OP_TYPE = %s (%s)\n", PL_op_name[cx->blk_eval.old_op_type], PL_op_desc[cx->blk_eval.old_op_type]); - PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_NAME = %s\n", - cx->blk_eval.old_name); + if (cx->blk_eval.old_namesv) + PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_NAME = %s\n", + SvPVX(cx->blk_eval.old_namesv)); PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_EVAL_ROOT = 0x%"UVxf"\n", PTR2UV(cx->blk_eval.old_eval_root)); break; -- cgit v1.2.1 From 14dd3ad8c9bf82cf09798a22cc89a9862dfd6d1a Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sun, 20 Feb 2000 16:07:38 +0000 Subject: make change#3386 a build-time option (avoids problems due to perl_run() longjmping out) p4raw-link: @3386 on //depot/perl: 312caa8e97f1c7ee342a9895c2f0e749625b4929 p4raw-id: //depot/perl@5162 --- scope.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index e6c31259ec..740000a44d 100644 --- a/scope.c +++ b/scope.c @@ -16,6 +16,7 @@ #define PERL_IN_SCOPE_C #include "perl.h" +#if defined(PERL_FLEXIBLE_EXCEPTIONS) void * Perl_default_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt, protect_body_t body, ...) @@ -36,8 +37,6 @@ Perl_vdefault_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt, int ex; void *ret; - DEBUG_l(Perl_deb(aTHX_ "Setting up local jumplevel %p, was %p\n", - pcur_env, PL_top_env)); JMPENV_PUSH(ex); if (ex) ret = NULL; @@ -47,6 +46,7 @@ Perl_vdefault_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt, JMPENV_POP; return ret; } +#endif SV** Perl_stack_grow(pTHX_ SV **sp, SV **p, int n) -- cgit v1.2.1