summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorCharles Bailey <bailey@newman.upenn.edu>2000-01-20 00:25:30 +0000
committerbailey <bailey@newman.upenn.edu>2000-01-20 00:25:30 +0000
commit146174a91a192983720a158796dc066226ad0e55 (patch)
tree6e7f2035aae6d864035ea40ad9821bab4d0bad93 /scope.c
parentc529f79d594c53d3968d464c57ac24a21137dd09 (diff)
downloadperl-146174a91a192983720a158796dc066226ad0e55.tar.gz
Quick integration of mainline changes to date
p4raw-id: //depot/vmsperl@4821 p4raw-branched: from //depot/perl@4249 'branch in' eg/cgi/dna_small_gif.uu eg/cgi/wilogo_gif.uu epoc/config.sh epoc/epocish.c epoc/link.pl ext/DB_File/hints/sco.pl ext/DynaLoader/XSLoader_pm.PL ext/DynaLoader/hints/aix.pl ext/DynaLoader/hints/openbsd.pl ext/File/Glob/Makefile.PL ext/File/Glob/TODO ext/IPC/SysV/hints/cygwin.pl ext/NDBM_File/hints/cygwin.pl ext/NDBM_File/hints/sco.pl ext/ODBM_File/hints/cygwin.pl lib/byte.pm lib/byte_heavy.pl lib/unicode/Jamo.txt lib/unicode/NamesList.html lib/unicode/UCD300.html lib/unicode/Unicode.300 lib/unicode/Unicode3.html os2/OS2/REXX/DLL/Changes os2/OS2/REXX/DLL/DLL.pm os2/OS2/REXX/DLL/DLL.xs os2/OS2/REXX/DLL/MANIFEST os2/OS2/REXX/DLL/Makefile.PL os2/OS2/REXX/t/rx_emxrv.t t/lib/glob-case.t t/lib/glob-taint.t t/pod/multiline_items.xr t/pod/pod2usage.xr t/pod/podselect.xr win32/vmem.h t/pod/multiline_items.t t/pod/pod2usage.t t/pod/podselect.t (@4280..) pod/perlhack.pod (@4340..) ext/File/Glob/Changes ext/File/Glob/Glob.xs t/lib/glob-global.t (@4356..) t/lib/glob-basic.t (@4393..) lib/Pod/Man.pm (@4404..) pod/perlfilter.pod (@4406..) t/io/nargv.t (@4503..) ext/File/Glob/bsd_glob.c ext/File/Glob/bsd_glob.h (@4514..) epoc/createpkg.pl epoc/epoc_stubs.c (@4556..) lib/unicode/Eq/Latin1.pl lib/unicode/Eq/Unicode.pl lib/unicode/In/BopomofoExtended.pl lib/unicode/In/BraillePatterns.pl lib/unicode/In/CJKRadicalsSupplement.pl lib/unicode/In/CJKUnifiedIdeographsExtensionA.pl lib/unicode/In/Cherokee.pl lib/unicode/In/IdeographicDescriptionCharacters.pl lib/unicode/In/KangxiRadicals.pl lib/unicode/In/Khmer.pl lib/unicode/In/Mongolian.pl lib/unicode/In/Myanmar.pl lib/unicode/In/Ogham.pl lib/unicode/In/Runic.pl lib/unicode/In/Sinhala.pl lib/unicode/In/Syriac.pl lib/unicode/In/Thaana.pl lib/unicode/In/UnifiedCanadianAboriginalSyllabics.pl lib/unicode/In/YiRadicals.pl lib/unicode/In/YiSyllables.pl (@4573..) pod/perlfork.pod (@4602..) ext/File/Glob/Glob.pm (@4615..) win32/genmk95.pl (@4653..) win32/vdir.h (@4702..) win32/perlhost.h (@4789..) p4raw-deleted: from //depot/perl@4249 'delete in' eg/cgi/dna.small.gif.uu eg/cgi/wilogo.gif.uu (@2830..) os2/POSIX.mkfifo (@3518..) lib/warning.pm warning.h (@4008..) lib/unicode/Jamo-2.txt lib/unicode/UnicodeData-Latest.txt (@4184..) lib/unicode/Unicode.html (@4209..) lib/unicode/Eq/Latin1 lib/unicode/Eq/Unicode (@4228..) lib/Pod/PlainText.pm (@4280..) ext/DynaLoader/dl_cygwin.xs (@4302..) epoc/config.h (@4475..) epoc/perl.mmp epoc/perl.pkg (@4556..) p4raw-integrated: from //depot/perl@4249 'copy in' ext/B/NOTES ext/B/ramblings/runtime.porting (@562..) hints/amigaos.sh (@575..) lib/Net/Ping.pm (@854..) lib/strict.pm (@988..) ext/Thread/Thread/Queue.pm (@1085..) ext/Thread/Thread/Semaphore.pm (@1086..) lib/ExtUtils/Installed.pm (@1315..) plan9/plan9ish.h (@1451..) mpeix/mpeixish.h (@1478..) Porting/p4d2p (@1485..) ext/ODBM_File/hints/sco.pl ext/Thread/sync.t ext/Thread/sync2.t hints/lynxos.sh lib/Text/Tabs.pm os2/OS2/REXX/Changes os2/OS2/REXX/t/rx_dllld.t os2/OS2/REXX/t/rx_objcall.t os2/OS2/REXX/t/rx_tievar.t os2/OS2/REXX/t/rx_tieydb.t os2/OS2/REXX/t/rx_vrexx.t os2/dl_os2.c t/comp/term.t t/io/print.t t/op/glob.t util.h win32/bin/perlglob.pl (@1575..) ext/B/O.pm (@1617..) ext/Thread/typemap lib/File/DosGlob.pm (@1760..) t/op/substr.t (@1780..) vos/vosish.h (@1838..) lib/ExtUtils/Mkbootstrap.pm (@1932..) Porting/genlog (@1978..) lib/constant.pm (@2029..) t/op/array.t (@2210..) lib/Math/Complex.pm (@2219..) hints/dynixptx.sh (@2318..) ext/IO/IO.pm (@2354..) hints/mint.sh lib/Tie/Array.pm lib/Tie/Hash.pm (@2620..) os2/Changes (@2695..) globvar.sym (@2746..) t/comp/bproto.t (@2817..) lib/DB.pm (@2820..) hints/mpeix.sh lib/FindBin.pm (@2830..) ext/IO/lib/IO/Select.pm (@2882..) t/lib/english.t (@2891..) t/op/subst.t (@2892..) t/op/range.t (@2923..) pod/perl5005delta.pod (@2929..) hints/next_3.sh hints/next_3_0.sh (@3023..) lib/Getopt/Std.pm (@3034..) lib/File/Spec.pm (@3042..) t/pragma/warn/1global (@3096..) t/pod/emptycmd.t t/pod/for.t t/pod/for.xr t/pod/headings.t t/pod/headings.xr t/pod/include.t t/pod/include.xr t/pod/included.t t/pod/included.xr t/pod/lref.t t/pod/lref.xr t/pod/nested_items.t t/pod/nested_items.xr t/pod/nested_seqs.t t/pod/nested_seqs.xr t/pod/oneline_cmds.t t/pod/oneline_cmds.xr t/pod/testcmp.pl (@3129..) README.hurd (@3148..) ext/re/re.pm (@3152..) lib/ExtUtils/Liblist.pm t/comp/require.t (@3153..) Porting/p4desc (@3183..) Porting/pumpkin.pod hints/linux.sh myconfig.SH (@3267..) t/op/readdir.t (@3299..) t/pod/special_seqs.t t/pod/special_seqs.xr (@3304..) t/lib/fields.t (@3335..) t/op/taint.t (@3357..) lib/File/Copy.pm (@3362..) installhtml (@3371..) ext/Socket/Socket.pm (@3391..) t/lib/ipc_sysv.t t/op/nothread.t (@3399..) lib/CPAN/FirstTime.pm (@3458..) pod/perlfaq8.pod (@3459..) pod/perlcall.pod pod/perlipc.pod pod/perltie.pod pod/perlxs.pod (@3460..) t/pragma/strict-subs (@3514..) ext/ByteLoader/ByteLoader.pm lib/Math/BigFloat.pm (@3516..) x2p/walk.c (@3518..) win32/win32thread.c win32/win32thread.h (@3525..) os2/OS2/REXX/REXX.xs (@3531..) utf8.h (@3537..) lib/ExtUtils/Embed.pm (@3553..) ext/Thread/Thread/Specific.pm (@3564..) ext/POSIX/Makefile.PL lib/Cwd.pm (@3582..) hv.h (@3602..) ext/NDBM_File/NDBM_File.pm ext/ODBM_File/ODBM_File.pm ext/SDBM_File/SDBM_File.pm (@3603..) lib/Sys/Hostname.pm (@3631..) os2/os2.c (@3640..) emacs/ptags miniperlmain.c (@3660..) ext/IO/IO.xs win32/config_h.PL win32/dl_win32.xs win32/runperl.c win32/win32sck.c (@3667..) pod/Win32.pod pod/perlfaq4.pod pod/perltodo.pod (@3676..) lib/vars.pm (@3686..) lib/ExtUtils/Manifest.pm (@3693..) hints/README.hints hints/epix.sh hints/esix4.sh hints/next_4.sh (@3753..) ext/GDBM_File/GDBM_File.pm lib/CPAN.pm pod/perllocale.pod (@3754..) lib/bigfloat.pl (@3759..) lib/Pod/Text/Color.pm lib/Pod/Text/Termcap.pm pod/pod2text.PL (@3788..) ext/POSIX/POSIX.pm lib/AutoLoader.pm (@3794..) Porting/makerel (@3797..) t/lib/io_unix.t (@3825..) EXTERN.h Porting/patchls ext/SDBM_File/sdbm/pair.c makedepend.SH (@3852..) lib/File/Spec/Unix.pm unixish.h (@3855..) lib/ExtUtils/Mksymlists.pm (@3856..) t/pragma/utf8.t (@3892..) README (@3901..) t/op/eval.t (@3988..) MAINTAIN ext/B/B/Stash.pm ext/ByteLoader/ByteLoader.xs ext/Fcntl/Fcntl.xs ext/SDBM_File/Makefile.PL lib/Math/Trig.pm os2/OS2/REXX/Makefile.PL perlsdio.h regnodes.h utils/perlbug.PL (@4008..) epoc/epoc.c pod/perltoc.pod pod/perlvar.pod regexp.h t/lib/attrs.t t/op/time.t t/pragma/warn/2use t/pragma/warn/3both t/pragma/warn/7fatal universal.c warnings.h warnings.pl (@4076..) ext/Opcode/Opcode.pm ext/attrs/attrs.xs t/pragma/warn/pp_ctl (@4081..) t/pragma/warn/pp_sys (@4088..) t/pragma/sub_lval.t (@4090..) t/TEST (@4092..) xsutils.c (@4101..) pod/buildtoc (@4120..) djgpp/config.over djgpp/djgppsed.sh pod/pod2usage.PL pod/podselect.PL (@4121..) lib/Pod/Html.pm (@4122..) av.h (@4123..) t/pragma/locale.t (@4130..) pod/perldata.pod (@4131..) pod/perllexwarn.pod (@4132..) ext/B/typemap ext/DB_File/DB_File.pm lib/ExtUtils/typemap (@4142..) ext/B/Makefile.PL t/lib/bigfltpm.t (@4149..) lib/ExtUtils/MM_VMS.pm vms/descrip_mms.template (@4182..) ext/DynaLoader/dl_vmesa.xs ext/DynaLoader/dl_vms.xs lib/unicode/ReadMe.txt pod/perlsyn.pod t/op/groups.t (@4184..) t/pragma/warn/op (@4189..) thrdvar.h (@4197..) ext/B/B/Terse.pm (@4199..) t/lib/posix.t (@4223..) keywords.h keywords.pl pod/perlfaq3.pod pod/perlsub.pod t/pragma/strict-vars (@4227..) pod/perlfaq9.pod (@4228..) djgpp/configure.bat lib/Exporter/Heavy.pm (@4242..) Porting/findvars lib/ExtUtils/xsubpp pod/perlguts.pod t/lib/filecopy.t (@4271..) ext/attrs/attrs.pm (@4278..) t/op/avhv.t (@4279..) lib/Pod/Checker.pm lib/Pod/InputObjects.pm t/pod/testp2pt.pl (@4280..) lib/Pod/Usage.pm pod/podchecker.PL t/pod/poderrs.t t/pod/poderrs.xr t/pod/testpchk.pl (@4281..) lib/Pod/Text.pm pod/pod2man.PL (@4282..) ext/Devel/Peek/Peek.xs ext/DynaLoader/dl_beos.xs ext/DynaLoader/dl_dld.xs ext/DynaLoader/dl_mpeix.xs ext/DynaLoader/dlutils.c perlio.c (@4302..) ext/B/defsubs_h.PL t/pragma/constant.t (@4303..) ext/Thread/Thread.xs (@4316..) ext/Thread/Thread.pm (@4328..) lib/Exporter.pm (@4331..) ext/DynaLoader/dl_aix.xs (@4336..) pod/Makefile pod/roffitall (@4340..) lib/lib.pm (@4343..) pod/perlref.pod (@4345..) perly.y perly_c.diff (@4350..) t/lib/safe2.t (@4353..) hints/svr5.sh (@4377..) pod/perlfaq2.pod (@4383..) lib/Benchmark.pm (@4384..) win32/include/dirent.h (@4385..) pod/perlopentut.pod (@4390..) hints/os2.sh os2/Makefile.SHs (@4393..) lib/Pod/Parser.pm lib/Pod/Select.pm (@4400..) malloc.c (@4402..) pod/perlmodlib.pod (@4404..) perlvars.h (@4409..) t/op/sort.t (@4418..) t/op/int.t (@4430..) os2/OS2/REXX/REXX.pm t/io/fs.t t/op/magic.t (@4432..) lib/File/Path.pm (@4433..) t/op/lex_assign.t (@4436..) lib/attributes.pm (@4437..) pod/perlop.pod (@4438..) ext/POSIX/POSIX.xs (@4448..) Policy_sh.SH ext/Data/Dumper/Dumper.xs hints/dec_osf.sh t/lib/charnames.t (@4475..) lib/Time/Local.pm (@4481..) cv.h ext/B/B/Xref.pm (@4485..) doop.c handy.h hints/irix_6.sh pp.h taint.c (@4496..) deb.c (@4505..) dosish.h os2/os2ish.h perly.c vms/perly_c.vms (@4511..) ext/B/B/Lint.pm pod/perlmod.pod pod/perlrun.pod (@4515..) bytecode.pl ext/B/B.pm ext/B/B/Asmdata.pm ext/B/B/CC.pm ext/B/B/Debug.pm ext/B/B/Deparse.pm ext/ByteLoader/bytecode.h ext/ByteLoader/byterun.c ext/ByteLoader/byterun.h ext/Devel/Peek/Peek.pm gv.h (@4545..) README.epoc epoc/epocish.h ext/B/B.xs ext/Fcntl/Fcntl.pm hints/hpux.sh t/lib/syslfs.t t/op/lfs.t t/op/pat.t (@4556..) ext/DynaLoader/DynaLoader_pm.PL hints/solaris_2.sh lib/unicode/Is/SylA.pl lib/unicode/Is/SylC.pl lib/unicode/Is/SylE.pl lib/unicode/Is/SylI.pl lib/unicode/Is/SylO.pl lib/unicode/Is/SylU.pl lib/unicode/Is/SylV.pl lib/unicode/Is/SylWA.pl lib/unicode/Is/SylWC.pl lib/unicode/Is/SylWE.pl lib/unicode/Is/SylWI.pl lib/unicode/Is/SylWV.pl lib/unicode/mktables.PL t/op/pack.t t/op/regexp.t utils/h2xs.PL utils/perldoc.PL vms/vms.c vms/vmsish.h win32/win32iop.h (@4573..) t/lib/dumper.t t/pragma/overload.t (@4574..) ext/Errno/Errno_pm.PL ext/IO/lib/IO/Socket.pm (@4575..) t/op/misc.t (@4578..) ext/Opcode/Opcode.xs (@4579..) cop.h (@4588..) lib/perl5db.pl (@4601..) XSUB.h globals.c pod/perl.pod run.c scope.c (@4602..) op.h win32/perllib.c (@4603..) AUTHORS pod/perlport.pod t/op/runlevel.t (@4604..) scope.h (@4605..) README.vms hints/aix.sh vms/subconfigure.com (@4606..) pod/perlxstut.pod (@4620..) regcomp.h (@4622..) ext/Devel/DProf/DProf.pm ext/DynaLoader/Makefile.PL (@4623..) pod/perltrap.pod (@4630..) ext/B/B/Bytecode.pm (@4631..) opcode.h opcode.pl t/pragma/warn/4lint t/pragma/warn/doio t/pragma/warn/pp_hot (@4641..) mg.c (@4658..) iperlsys.h (@4660..) ext/B/B/C.pm (@4662..) pod/perlre.pod (@4666..) embedvar.h (@4668..) t/lib/filefind.t (@4671..) intrpvar.h (@4672..) ext/DynaLoader/dl_hpux.xs ext/DynaLoader/dl_next.xs ext/DynaLoader/dl_rhapsody.xs (@4686..) lib/File/Find.pm (@4687..) cygwin/Makefile.SHs (@4688..) t/op/re_tests (@4693..) hv.c (@4694..) t/op/delete.t (@4695..) utf8.c (@4698..) thread.h (@4704..) pod/perldiag.pod pp_sys.c (@4709..) Makefile.SH (@4712..) hints/cygwin.sh t/op/stat.t (@4717..) README.os2 lib/ExtUtils/Install.pm (@4720..) t/pragma/warn/doop t/pragma/warn/pp t/pragma/warn/regcomp t/pragma/warn/sv t/pragma/warn/toke t/pragma/warn/utf8 (@4721..) lib/diagnostics.pm (@4722..) regcomp.c (@4724..) configpm pp_ctl.c sv.h (@4726..) global.sym (@4727..) INTERN.h README.win32 lib/ExtUtils/MM_Win32.pm makedef.pl (@4729..) t/io/argv.t (@4732..) doio.c pp_hot.c (@4736..) toke.c (@4740..) gv.c (@4742..) win32/win32.h (@4743..) ext/Devel/DProf/DProf.xs objXSUB.h (@4744..) ext/Data/Dumper/Dumper.pm (@4745..) embed.h embed.pl ext/DynaLoader/dl_dlopen.xs proto.h (@4746..) pp.c (@4747..) sv.c (@4749..) lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MakeMaker.pm (@4754..) util.c utils/perlcc.PL (@4755..) t/io/open.t (@4757..) regexec.c (@4759..) MANIFEST installman (@4769..) Porting/Glossary (@4771..) t/lib/thread.t (@4772..) Changes INSTALL Porting/config.sh Porting/config_H config_h.SH installperl patchlevel.h win32/config.bc win32/config.gc win32/config.vc win32/config_sh.PL win32/win32.c (@4773..) win32/Makefile win32/config_H.bc win32/config_H.gc win32/config_H.vc win32/makefile.mk (@4774..) perl.c (@4779..) t/op/fork.t (@4791..) av.c pod/perldelta.pod (@4796..) pod/perlfunc.pod (@4799..) dump.c (@4800..) op.c (@4801..) perl.h (@4805..) Configure (@4814..) 'merge in' configure.com (@4767..)
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c153
1 files changed, 104 insertions, 49 deletions
diff --git a/scope.c b/scope.c
index 44c3d923a9..7052282edb 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;
@@ -278,12 +279,17 @@ 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);
+ 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;
+ GvLINE(gv) = CopLINE(PL_curcop);
GvEGV(gv) = gv;
}
else {
@@ -399,6 +405,16 @@ Perl_save_I16(pTHX_ I16 *intp)
}
void
+Perl_save_I8(pTHX_ I8 *bytep)
+{
+ dTHR;
+ SSCHECK(3);
+ SSPUSHINT(*bytep);
+ SSPUSHPTR(bytep);
+ SSPUSHINT(SAVEt_I8);
+}
+
+void
Perl_save_iv(pTHX_ IV *ivp)
{
dTHR;
@@ -422,6 +438,16 @@ Perl_save_pptr(pTHX_ char **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)
{
dTHR;
@@ -437,8 +463,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(PerlIO_stderr(), "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
@@ -541,7 +567,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);
@@ -551,6 +577,16 @@ Perl_save_destructor(pTHX_ DESTRUCTORFUNC_t f, void* p)
}
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)
{
dTHR;
@@ -646,7 +682,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) &&
@@ -725,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;
@@ -733,6 +773,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;
@@ -831,7 +872,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:
@@ -903,28 +948,38 @@ 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)) {
case CXt_NULL:
case CXt_BLOCK:
break;
+ 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%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.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",
@@ -934,8 +989,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:
@@ -943,23 +998,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);
- 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.ITERARY = 0x%"UVxf"\n",
+ PTR2UV(cx->blk_loop.iterary));
+ PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERVAR = 0x%"UVxf"\n",
+ 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",
+ PTR2UV(cx->blk_loop.iterlval));
break;
case CXt_SUBST:
@@ -973,18 +1028,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 */