diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-24 22:20:42 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-24 22:20:42 +0000 |
commit | f4c556ac9d141bf86702c68d95acad2db5ec6874 (patch) | |
tree | d8f4ef6b026f71b605caa1a4475b5559d30b5039 | |
parent | 1ba752a043289c0682ba096aba08751ac71b298a (diff) | |
download | perl-f4c556ac9d141bf86702c68d95acad2db5ec6874.tar.gz |
remove unused interpreter globals
p4raw-id: //depot/perl@4448
-rw-r--r-- | deb.c | 12 | ||||
-rw-r--r-- | dump.c | 2 | ||||
-rw-r--r-- | embed.h | 4 | ||||
-rwxr-xr-x | embed.pl | 1 | ||||
-rw-r--r-- | embedvar.h | 54 | ||||
-rw-r--r-- | ext/POSIX/POSIX.xs | 6 | ||||
-rw-r--r-- | global.sym | 1 | ||||
-rw-r--r-- | gv.c | 18 | ||||
-rw-r--r-- | gv.h | 4 | ||||
-rw-r--r-- | intrpvar.h | 30 | ||||
-rw-r--r-- | objXSUB.h | 40 | ||||
-rw-r--r-- | perl.c | 25 | ||||
-rw-r--r-- | perlapi.c | 7 | ||||
-rw-r--r-- | proto.h | 1 | ||||
-rw-r--r-- | toke.c | 49 |
15 files changed, 41 insertions, 213 deletions
@@ -59,22 +59,10 @@ Perl_vdeb(pTHX_ const char *pat, va_list *args) SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "<free>", (long)PL_curcop->cop_line); #endif /* USE_THREADS */ - for (i=0; i<PL_dlevel; i++) - PerlIO_printf(Perl_debug_log, "%c%c ",PL_debname[i],PL_debdelim[i]); (void) PerlIO_vprintf(Perl_debug_log, pat, *args); #endif /* DEBUGGING */ } -void -Perl_deb_growlevel(pTHX) -{ -#ifdef DEBUGGING - PL_dlmax += 128; - Renew(PL_debname, PL_dlmax, char); - Renew(PL_debdelim, PL_dlmax, char); -#endif /* DEBUGGING */ -} - I32 Perl_debstackptrs(pTHX) { @@ -1115,7 +1115,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo Perl_dump_indent(aTHX_ level, file, " HV = 0x%"UVxf"\n", PTR2UV(GvHV(sv))); Perl_dump_indent(aTHX_ level, file, " CV = 0x%"UVxf"\n", PTR2UV(GvCV(sv))); Perl_dump_indent(aTHX_ level, file, " CVGEN = 0x%"UVxf"\n", (UV)GvCVGEN(sv)); - Perl_dump_indent(aTHX_ level, file, " LASTEXPR = %"IVdf"\n", (IV)GvLASTEXPR(sv)); + Perl_dump_indent(aTHX_ level, file, " GPFLAGS = 0x%"UVxf"\n", (UV)GvGPFLAGS(sv)); Perl_dump_indent(aTHX_ level, file, " LINE = %"IVdf"\n", (IV)GvLINE(sv)); Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%"UVxf"\n", (UV)GvFLAGS(sv)); do_gv_dump (level, file, " FILEGV", GvFILEGV(sv)); @@ -123,7 +123,6 @@ #define cxinc Perl_cxinc #define deb Perl_deb #define vdeb Perl_vdeb -#define deb_growlevel Perl_deb_growlevel #define debprofdump Perl_debprofdump #define debop Perl_debop #define debstack Perl_debstack @@ -1487,7 +1486,6 @@ #define get_ppaddr() Perl_get_ppaddr(aTHX) #define cxinc() Perl_cxinc(aTHX) #define vdeb(a,b) Perl_vdeb(aTHX_ a,b) -#define deb_growlevel() Perl_deb_growlevel(aTHX) #define debprofdump() Perl_debprofdump(aTHX) #define debop(a) Perl_debop(aTHX_ a) #define debstack() Perl_debstack(aTHX) @@ -2924,8 +2922,6 @@ #define deb Perl_deb #define Perl_vdeb CPerlObj::Perl_vdeb #define vdeb Perl_vdeb -#define Perl_deb_growlevel CPerlObj::Perl_deb_growlevel -#define deb_growlevel Perl_deb_growlevel #define Perl_debprofdump CPerlObj::Perl_debprofdump #define debprofdump Perl_debprofdump #define Perl_debop CPerlObj::Perl_debop @@ -1078,7 +1078,6 @@ p |PPADDR_t*|get_ppaddr p |I32 |cxinc p |void |deb |const char* pat|... p |void |vdeb |const char* pat|va_list* args -p |void |deb_growlevel p |void |debprofdump p |I32 |debop |OP* o p |I32 |debstack diff --git a/embedvar.h b/embedvar.h index b018119e3c..94f93b08ee 100644 --- a/embedvar.h +++ b/embedvar.h @@ -188,7 +188,6 @@ #define PL_Sock (PERL_GET_INTERP->ISock) #define PL_StdIO (PERL_GET_INTERP->IStdIO) #define PL_amagic_generation (PERL_GET_INTERP->Iamagic_generation) -#define PL_ampergv (PERL_GET_INTERP->Iampergv) #define PL_an (PERL_GET_INTERP->Ian) #define PL_archpat_auto (PERL_GET_INTERP->Iarchpat_auto) #define PL_argvgv (PERL_GET_INTERP->Iargvgv) @@ -198,7 +197,6 @@ #define PL_bitcount (PERL_GET_INTERP->Ibitcount) #define PL_bufend (PERL_GET_INTERP->Ibufend) #define PL_bufptr (PERL_GET_INTERP->Ibufptr) -#define PL_cddir (PERL_GET_INTERP->Icddir) #define PL_collation_ix (PERL_GET_INTERP->Icollation_ix) #define PL_collation_name (PERL_GET_INTERP->Icollation_name) #define PL_collation_standard (PERL_GET_INTERP->Icollation_standard) @@ -220,14 +218,10 @@ #define PL_curstname (PERL_GET_INTERP->Icurstname) #define PL_curthr (PERL_GET_INTERP->Icurthr) #define PL_dbargs (PERL_GET_INTERP->Idbargs) -#define PL_debdelim (PERL_GET_INTERP->Idebdelim) -#define PL_debname (PERL_GET_INTERP->Idebname) #define PL_debstash (PERL_GET_INTERP->Idebstash) #define PL_debug (PERL_GET_INTERP->Idebug) #define PL_defgv (PERL_GET_INTERP->Idefgv) #define PL_diehook (PERL_GET_INTERP->Idiehook) -#define PL_dlevel (PERL_GET_INTERP->Idlevel) -#define PL_dlmax (PERL_GET_INTERP->Idlmax) #define PL_doextract (PERL_GET_INTERP->Idoextract) #define PL_doswitches (PERL_GET_INTERP->Idoswitches) #define PL_dowarn (PERL_GET_INTERP->Idowarn) @@ -249,7 +243,6 @@ #define PL_expect (PERL_GET_INTERP->Iexpect) #define PL_fdpid (PERL_GET_INTERP->Ifdpid) #define PL_filemode (PERL_GET_INTERP->Ifilemode) -#define PL_filter_debug (PERL_GET_INTERP->Ifilter_debug) #define PL_forkprocess (PERL_GET_INTERP->Iforkprocess) #define PL_formfeed (PERL_GET_INTERP->Iformfeed) #define PL_generation (PERL_GET_INTERP->Igeneration) @@ -276,11 +269,8 @@ #define PL_last_swash_tmps (PERL_GET_INTERP->Ilast_swash_tmps) #define PL_last_uni (PERL_GET_INTERP->Ilast_uni) #define PL_lastfd (PERL_GET_INTERP->Ilastfd) -#define PL_lastsize (PERL_GET_INTERP->Ilastsize) -#define PL_lastspbase (PERL_GET_INTERP->Ilastspbase) #define PL_laststatval (PERL_GET_INTERP->Ilaststatval) #define PL_laststype (PERL_GET_INTERP->Ilaststype) -#define PL_leftgv (PERL_GET_INTERP->Ileftgv) #define PL_lex_brackets (PERL_GET_INTERP->Ilex_brackets) #define PL_lex_brackstack (PERL_GET_INTERP->Ilex_brackstack) #define PL_lex_casemods (PERL_GET_INTERP->Ilex_casemods) @@ -321,7 +311,6 @@ #define PL_multi_open (PERL_GET_INTERP->Imulti_open) #define PL_multi_start (PERL_GET_INTERP->Imulti_start) #define PL_multiline (PERL_GET_INTERP->Imultiline) -#define PL_mystrk (PERL_GET_INTERP->Imystrk) #define PL_nexttoke (PERL_GET_INTERP->Inexttoke) #define PL_nexttype (PERL_GET_INTERP->Inexttype) #define PL_nextval (PERL_GET_INTERP->Inextval) @@ -336,7 +325,6 @@ #define PL_numeric_standard (PERL_GET_INTERP->Inumeric_standard) #define PL_ofmt (PERL_GET_INTERP->Iofmt) #define PL_oldbufptr (PERL_GET_INTERP->Ioldbufptr) -#define PL_oldlastpm (PERL_GET_INTERP->Ioldlastpm) #define PL_oldname (PERL_GET_INTERP->Ioldname) #define PL_oldoldbufptr (PERL_GET_INTERP->Ioldoldbufptr) #define PL_op_mask (PERL_GET_INTERP->Iop_mask) @@ -362,15 +350,11 @@ #define PL_preprocess (PERL_GET_INTERP->Ipreprocess) #define PL_profiledata (PERL_GET_INTERP->Iprofiledata) #define PL_replgv (PERL_GET_INTERP->Ireplgv) -#define PL_rightgv (PERL_GET_INTERP->Irightgv) #define PL_rsfp (PERL_GET_INTERP->Irsfp) #define PL_rsfp_filters (PERL_GET_INTERP->Irsfp_filters) #define PL_runops (PERL_GET_INTERP->Irunops) #define PL_sawampersand (PERL_GET_INTERP->Isawampersand) -#define PL_sawstudy (PERL_GET_INTERP->Isawstudy) -#define PL_sawvec (PERL_GET_INTERP->Isawvec) #define PL_sh_path (PERL_GET_INTERP->Ish_path) -#define PL_siggv (PERL_GET_INTERP->Isiggv) #define PL_sighandlerp (PERL_GET_INTERP->Isighandlerp) #define PL_splitstr (PERL_GET_INTERP->Isplitstr) #define PL_srand_called (PERL_GET_INTERP->Isrand_called) @@ -378,7 +362,6 @@ #define PL_statusvalue_vms (PERL_GET_INTERP->Istatusvalue_vms) #define PL_stderrgv (PERL_GET_INTERP->Istderrgv) #define PL_stdingv (PERL_GET_INTERP->Istdingv) -#define PL_strchop (PERL_GET_INTERP->Istrchop) #define PL_strtab (PERL_GET_INTERP->Istrtab) #define PL_strtab_mutex (PERL_GET_INTERP->Istrtab_mutex) #define PL_sub_generation (PERL_GET_INTERP->Isub_generation) @@ -396,7 +379,6 @@ #define PL_svref_mutex (PERL_GET_INTERP->Isvref_mutex) #define PL_sys_intern (PERL_GET_INTERP->Isys_intern) #define PL_tainting (PERL_GET_INTERP->Itainting) -#define PL_thisexpr (PERL_GET_INTERP->Ithisexpr) #define PL_thr_key (PERL_GET_INTERP->Ithr_key) #define PL_threadnum (PERL_GET_INTERP->Ithreadnum) #define PL_threads_mutex (PERL_GET_INTERP->Ithreads_mutex) @@ -464,7 +446,6 @@ #define PL_Sock (vTHX->ISock) #define PL_StdIO (vTHX->IStdIO) #define PL_amagic_generation (vTHX->Iamagic_generation) -#define PL_ampergv (vTHX->Iampergv) #define PL_an (vTHX->Ian) #define PL_archpat_auto (vTHX->Iarchpat_auto) #define PL_argvgv (vTHX->Iargvgv) @@ -474,7 +455,6 @@ #define PL_bitcount (vTHX->Ibitcount) #define PL_bufend (vTHX->Ibufend) #define PL_bufptr (vTHX->Ibufptr) -#define PL_cddir (vTHX->Icddir) #define PL_collation_ix (vTHX->Icollation_ix) #define PL_collation_name (vTHX->Icollation_name) #define PL_collation_standard (vTHX->Icollation_standard) @@ -496,14 +476,10 @@ #define PL_curstname (vTHX->Icurstname) #define PL_curthr (vTHX->Icurthr) #define PL_dbargs (vTHX->Idbargs) -#define PL_debdelim (vTHX->Idebdelim) -#define PL_debname (vTHX->Idebname) #define PL_debstash (vTHX->Idebstash) #define PL_debug (vTHX->Idebug) #define PL_defgv (vTHX->Idefgv) #define PL_diehook (vTHX->Idiehook) -#define PL_dlevel (vTHX->Idlevel) -#define PL_dlmax (vTHX->Idlmax) #define PL_doextract (vTHX->Idoextract) #define PL_doswitches (vTHX->Idoswitches) #define PL_dowarn (vTHX->Idowarn) @@ -525,7 +501,6 @@ #define PL_expect (vTHX->Iexpect) #define PL_fdpid (vTHX->Ifdpid) #define PL_filemode (vTHX->Ifilemode) -#define PL_filter_debug (vTHX->Ifilter_debug) #define PL_forkprocess (vTHX->Iforkprocess) #define PL_formfeed (vTHX->Iformfeed) #define PL_generation (vTHX->Igeneration) @@ -552,11 +527,8 @@ #define PL_last_swash_tmps (vTHX->Ilast_swash_tmps) #define PL_last_uni (vTHX->Ilast_uni) #define PL_lastfd (vTHX->Ilastfd) -#define PL_lastsize (vTHX->Ilastsize) -#define PL_lastspbase (vTHX->Ilastspbase) #define PL_laststatval (vTHX->Ilaststatval) #define PL_laststype (vTHX->Ilaststype) -#define PL_leftgv (vTHX->Ileftgv) #define PL_lex_brackets (vTHX->Ilex_brackets) #define PL_lex_brackstack (vTHX->Ilex_brackstack) #define PL_lex_casemods (vTHX->Ilex_casemods) @@ -597,7 +569,6 @@ #define PL_multi_open (vTHX->Imulti_open) #define PL_multi_start (vTHX->Imulti_start) #define PL_multiline (vTHX->Imultiline) -#define PL_mystrk (vTHX->Imystrk) #define PL_nexttoke (vTHX->Inexttoke) #define PL_nexttype (vTHX->Inexttype) #define PL_nextval (vTHX->Inextval) @@ -612,7 +583,6 @@ #define PL_numeric_standard (vTHX->Inumeric_standard) #define PL_ofmt (vTHX->Iofmt) #define PL_oldbufptr (vTHX->Ioldbufptr) -#define PL_oldlastpm (vTHX->Ioldlastpm) #define PL_oldname (vTHX->Ioldname) #define PL_oldoldbufptr (vTHX->Ioldoldbufptr) #define PL_op_mask (vTHX->Iop_mask) @@ -638,15 +608,11 @@ #define PL_preprocess (vTHX->Ipreprocess) #define PL_profiledata (vTHX->Iprofiledata) #define PL_replgv (vTHX->Ireplgv) -#define PL_rightgv (vTHX->Irightgv) #define PL_rsfp (vTHX->Irsfp) #define PL_rsfp_filters (vTHX->Irsfp_filters) #define PL_runops (vTHX->Irunops) #define PL_sawampersand (vTHX->Isawampersand) -#define PL_sawstudy (vTHX->Isawstudy) -#define PL_sawvec (vTHX->Isawvec) #define PL_sh_path (vTHX->Ish_path) -#define PL_siggv (vTHX->Isiggv) #define PL_sighandlerp (vTHX->Isighandlerp) #define PL_splitstr (vTHX->Isplitstr) #define PL_srand_called (vTHX->Isrand_called) @@ -654,7 +620,6 @@ #define PL_statusvalue_vms (vTHX->Istatusvalue_vms) #define PL_stderrgv (vTHX->Istderrgv) #define PL_stdingv (vTHX->Istdingv) -#define PL_strchop (vTHX->Istrchop) #define PL_strtab (vTHX->Istrtab) #define PL_strtab_mutex (vTHX->Istrtab_mutex) #define PL_sub_generation (vTHX->Isub_generation) @@ -672,7 +637,6 @@ #define PL_svref_mutex (vTHX->Isvref_mutex) #define PL_sys_intern (vTHX->Isys_intern) #define PL_tainting (vTHX->Itainting) -#define PL_thisexpr (vTHX->Ithisexpr) #define PL_thr_key (vTHX->Ithr_key) #define PL_threadnum (vTHX->Ithreadnum) #define PL_threads_mutex (vTHX->Ithreads_mutex) @@ -742,7 +706,6 @@ #define PL_ISock PL_Sock #define PL_IStdIO PL_StdIO #define PL_Iamagic_generation PL_amagic_generation -#define PL_Iampergv PL_ampergv #define PL_Ian PL_an #define PL_Iarchpat_auto PL_archpat_auto #define PL_Iargvgv PL_argvgv @@ -752,7 +715,6 @@ #define PL_Ibitcount PL_bitcount #define PL_Ibufend PL_bufend #define PL_Ibufptr PL_bufptr -#define PL_Icddir PL_cddir #define PL_Icollation_ix PL_collation_ix #define PL_Icollation_name PL_collation_name #define PL_Icollation_standard PL_collation_standard @@ -774,14 +736,10 @@ #define PL_Icurstname PL_curstname #define PL_Icurthr PL_curthr #define PL_Idbargs PL_dbargs -#define PL_Idebdelim PL_debdelim -#define PL_Idebname PL_debname #define PL_Idebstash PL_debstash #define PL_Idebug PL_debug #define PL_Idefgv PL_defgv #define PL_Idiehook PL_diehook -#define PL_Idlevel PL_dlevel -#define PL_Idlmax PL_dlmax #define PL_Idoextract PL_doextract #define PL_Idoswitches PL_doswitches #define PL_Idowarn PL_dowarn @@ -803,7 +761,6 @@ #define PL_Iexpect PL_expect #define PL_Ifdpid PL_fdpid #define PL_Ifilemode PL_filemode -#define PL_Ifilter_debug PL_filter_debug #define PL_Iforkprocess PL_forkprocess #define PL_Iformfeed PL_formfeed #define PL_Igeneration PL_generation @@ -830,11 +787,8 @@ #define PL_Ilast_swash_tmps PL_last_swash_tmps #define PL_Ilast_uni PL_last_uni #define PL_Ilastfd PL_lastfd -#define PL_Ilastsize PL_lastsize -#define PL_Ilastspbase PL_lastspbase #define PL_Ilaststatval PL_laststatval #define PL_Ilaststype PL_laststype -#define PL_Ileftgv PL_leftgv #define PL_Ilex_brackets PL_lex_brackets #define PL_Ilex_brackstack PL_lex_brackstack #define PL_Ilex_casemods PL_lex_casemods @@ -875,7 +829,6 @@ #define PL_Imulti_open PL_multi_open #define PL_Imulti_start PL_multi_start #define PL_Imultiline PL_multiline -#define PL_Imystrk PL_mystrk #define PL_Inexttoke PL_nexttoke #define PL_Inexttype PL_nexttype #define PL_Inextval PL_nextval @@ -890,7 +843,6 @@ #define PL_Inumeric_standard PL_numeric_standard #define PL_Iofmt PL_ofmt #define PL_Ioldbufptr PL_oldbufptr -#define PL_Ioldlastpm PL_oldlastpm #define PL_Ioldname PL_oldname #define PL_Ioldoldbufptr PL_oldoldbufptr #define PL_Iop_mask PL_op_mask @@ -916,15 +868,11 @@ #define PL_Ipreprocess PL_preprocess #define PL_Iprofiledata PL_profiledata #define PL_Ireplgv PL_replgv -#define PL_Irightgv PL_rightgv #define PL_Irsfp PL_rsfp #define PL_Irsfp_filters PL_rsfp_filters #define PL_Irunops PL_runops #define PL_Isawampersand PL_sawampersand -#define PL_Isawstudy PL_sawstudy -#define PL_Isawvec PL_sawvec #define PL_Ish_path PL_sh_path -#define PL_Isiggv PL_siggv #define PL_Isighandlerp PL_sighandlerp #define PL_Isplitstr PL_splitstr #define PL_Isrand_called PL_srand_called @@ -932,7 +880,6 @@ #define PL_Istatusvalue_vms PL_statusvalue_vms #define PL_Istderrgv PL_stderrgv #define PL_Istdingv PL_stdingv -#define PL_Istrchop PL_strchop #define PL_Istrtab PL_strtab #define PL_Istrtab_mutex PL_strtab_mutex #define PL_Isub_generation PL_sub_generation @@ -950,7 +897,6 @@ #define PL_Isvref_mutex PL_svref_mutex #define PL_Isys_intern PL_sys_intern #define PL_Itainting PL_tainting -#define PL_Ithisexpr PL_thisexpr #define PL_Ithr_key PL_thr_key #define PL_Ithreadnum PL_threadnum #define PL_Ithreads_mutex PL_threads_mutex diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index dbf2621669..6fc32b1bd5 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -3369,15 +3369,13 @@ sigaction(sig, action, oldaction = 0) # This code is really grody because we're trying to make the signal # interface look beautiful, which is hard. - if (!PL_siggv) - gv_fetchpv("SIG", TRUE, SVt_PVHV); - { + GV *siggv = gv_fetchpv("SIG", TRUE, SVt_PVHV); struct sigaction act; struct sigaction oact; POSIX__SigSet sigset; SV** svp; - SV** sigsvp = hv_fetch(GvHVn(PL_siggv), + SV** sigsvp = hv_fetch(GvHVn(siggv), PL_sig_name[sig], strlen(PL_sig_name[sig]), TRUE); diff --git a/global.sym b/global.sym index ecde292073..26561d36b2 100644 --- a/global.sym +++ b/global.sym @@ -74,7 +74,6 @@ Perl_get_ppaddr Perl_cxinc Perl_deb Perl_vdeb -Perl_deb_growlevel Perl_debprofdump Perl_debop Perl_debstack @@ -653,15 +653,14 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) if (strEQ(name, "SIG")) { HV *hv; I32 i; - PL_siggv = gv; - GvMULTI_on(PL_siggv); - hv = GvHVn(PL_siggv); - hv_magic(hv, PL_siggv, 'S'); - for(i=1;PL_sig_name[i];i++) { + GvMULTI_on(gv); + hv = GvHVn(gv); + hv_magic(hv, gv, 'S'); + for(i = 1; PL_sig_name[i]; i++) { SV ** init; - init=hv_fetch(hv,PL_sig_name[i],strlen(PL_sig_name[i]),1); - if(init) - sv_setsv(*init,&PL_sv_undef); + init = hv_fetch(hv, PL_sig_name[i], strlen(PL_sig_name[i]), 1); + if (init) + sv_setsv(*init, &PL_sv_undef); PL_psig_ptr[i] = 0; PL_psig_name[i] = 0; } @@ -675,21 +674,18 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) case '&': if (len > 1) break; - PL_ampergv = gv; PL_sawampersand = TRUE; goto ro_magicalize; case '`': if (len > 1) break; - PL_leftgv = gv; PL_sawampersand = TRUE; goto ro_magicalize; case '\'': if (len > 1) break; - PL_rightgv = gv; PL_sawampersand = TRUE; goto ro_magicalize; @@ -17,7 +17,7 @@ struct gp { GV * gp_egv; /* effective gv, if *glob */ CV * gp_cv; /* subroutine value */ U32 gp_cvgen; /* generational validity of cached gv_cv */ - I32 gp_lastexpr; /* used by nothing_in_common() */ + U32 gp_flags; /* XXX unused */ line_t gp_line; /* line first declared at (for -w) */ GV * gp_filegv; /* file first declared in (for -w) */ }; @@ -67,7 +67,7 @@ HV *GvHVn(); #define GvCVGEN(gv) (GvGP(gv)->gp_cvgen) #define GvCVu(gv) (GvGP(gv)->gp_cvgen ? Nullcv : GvGP(gv)->gp_cv) -#define GvLASTEXPR(gv) (GvGP(gv)->gp_lastexpr) +#define GvGPFLAGS(gv) (GvGP(gv)->gp_flags) #define GvLINE(gv) (GvGP(gv)->gp_line) #define GvFILEGV(gv) (GvGP(gv)->gp_filegv) diff --git a/intrpvar.h b/intrpvar.h index a60620f6c3..1d34a819c1 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -17,13 +17,13 @@ PERLVAR(Iorigargc, int) PERLVAR(Iorigargv, char **) PERLVAR(Ienvgv, GV *) -PERLVAR(Isiggv, GV *) PERLVAR(Iincgv, GV *) PERLVAR(Ihintgv, GV *) PERLVAR(Iorigfilename, char *) PERLVAR(Idiehook, SV *) PERLVAR(Iwarnhook, SV *) -PERLVAR(Icddir, char *) /* switches */ + +/* switches */ PERLVAR(Iminus_c, bool) PERLVARA(Ipatchlevel,10,char) PERLVAR(Ilocalpatches, char **) @@ -38,14 +38,12 @@ PERLVAR(Idoswitches, bool) PERLVAR(Idowarn, bool) PERLVAR(Idoextract, bool) PERLVAR(Isawampersand, bool) /* must save all match strings */ -PERLVAR(Isawstudy, bool) /* do fbm_instr on all strings */ -PERLVAR(Isawvec, bool) PERLVAR(Iunsafe, bool) PERLVAR(Iinplace, char *) PERLVAR(Ie_script, SV *) PERLVAR(Iperldb, U32) -/* This value may be raised by extensions for testing purposes */ +/* This value may be set when embedding for full cleanup */ /* 0=none, 1=full, 2=full with checks */ PERLVARI(Iperl_destruct_level, int, 0) @@ -70,11 +68,6 @@ PERLVAR(Iargvgv, GV *) PERLVAR(Iargvoutgv, GV *) /* shortcuts to regexp stuff */ -/* XXX these three aren't used anywhere */ -PERLVAR(Ileftgv, GV *) -PERLVAR(Iampergv, GV *) -PERLVAR(Irightgv, GV *) - /* this one needs to be moved to thrdvar.h and accessed via * find_threadsv() when USE_THREADS */ PERLVAR(Ireplgv, GV *) @@ -109,8 +102,6 @@ PERLVAR(Isv_root, SV*) /* storage for SVs belonging to interp */ PERLVAR(Isv_arenaroot, SV*) /* list of areas for garbage collection */ /* funky return mechanisms */ -PERLVAR(Ilastspbase, I32) -PERLVAR(Ilastsize, I32) PERLVAR(Iforkprocess, int) /* so do_open |- can return proc# */ /* subprocess state */ @@ -120,12 +111,6 @@ PERLVAR(Ifdpid, AV *) /* keep fd-to-pid mappings for my_popen */ PERLVAR(Itainting, bool) /* doing taint checks */ PERLVARI(Iop_mask, char *, NULL) /* masked operations for safe evals */ -/* trace state */ -PERLVAR(Idlevel, I32) -PERLVARI(Idlmax, I32, 128) -PERLVAR(Idebname, char *) -PERLVAR(Idebdelim, char *) - /* current interpreter roots */ PERLVAR(Imain_cv, CV *) PERLVAR(Imain_root, OP *) @@ -138,14 +123,11 @@ PERLVARI(Icurcopdb, COP *, NULL) PERLVARI(Icopline, line_t, NOLINE) /* statics moved here for shared library purposes */ -PERLVAR(Istrchop, SV) /* return value from chop */ PERLVAR(Ifilemode, int) /* so nextargv() can preserve mode */ PERLVAR(Ilastfd, int) /* what to preserve mode on */ PERLVAR(Ioldname, char *) /* what to preserve mode on */ PERLVAR(IArgv, char **) /* stuff to free from do_aexec, vfork safe */ PERLVAR(ICmd, char *) /* stuff to free from do_aexec, vfork safe */ -PERLVAR(Imystrk, SV *) /* temp key string for do_each() */ -PERLVAR(Ioldlastpm, PMOP *) /* for saving regexp context in debugger */ PERLVAR(Igensym, I32) /* next symbol for getsym() to define */ PERLVAR(Ipreambled, bool) PERLVAR(Ipreambleav, AV *) @@ -291,17 +273,16 @@ PERLVAR(Ipadix, I32) /* max used index in current "register" pad */ PERLVAR(Ipadix_floor, I32) /* how low may inner block reset padix */ PERLVAR(Ipad_reset_pending, I32) /* reset pad on next attempted alloc */ -PERLVAR(Ithisexpr, I32) /* name id for nothing_in_common() */ PERLVAR(Ilast_uni, char *) /* position of last named-unary op */ PERLVAR(Ilast_lop, char *) /* position of last list operator */ PERLVAR(Ilast_lop_op, OPCODE) /* last list operator */ PERLVAR(Iin_my, I32) /* we're compiling a "my" (or "our") declaration */ PERLVAR(Iin_my_stash, HV *) /* declared class of this "my" declaration */ #ifdef FCRYPT -PERLVAR(Icryptseen, I32) /* has fast crypt() been initialized? */ +PERLVAR(Icryptseen, bool) /* has fast crypt() been initialized? */ #endif -PERLVAR(Ihints, U32) /* pragma-tic compile-time flags */ +PERLVAR(Ihints, U32) /* pragma-tic compile-time flags */ PERLVAR(Idebug, VOL U32) /* flags given to -D switch */ @@ -364,7 +345,6 @@ PERLVAR(Iglob_index, int) PERLVAR(Isrand_called, bool) PERLVARA(Iuudmap,256, char) PERLVAR(Ibitcount, char *) -PERLVAR(Ifilter_debug, int) #ifdef USE_THREADS PERLVAR(Ithr_key, perl_key) /* For per-thread struct perl_thread* */ @@ -42,8 +42,6 @@ #define PL_StdIO (*Perl_IStdIO_ptr(aTHXo)) #undef PL_amagic_generation #define PL_amagic_generation (*Perl_Iamagic_generation_ptr(aTHXo)) -#undef PL_ampergv -#define PL_ampergv (*Perl_Iampergv_ptr(aTHXo)) #undef PL_an #define PL_an (*Perl_Ian_ptr(aTHXo)) #undef PL_archpat_auto @@ -62,8 +60,6 @@ #define PL_bufend (*Perl_Ibufend_ptr(aTHXo)) #undef PL_bufptr #define PL_bufptr (*Perl_Ibufptr_ptr(aTHXo)) -#undef PL_cddir -#define PL_cddir (*Perl_Icddir_ptr(aTHXo)) #undef PL_collation_ix #define PL_collation_ix (*Perl_Icollation_ix_ptr(aTHXo)) #undef PL_collation_name @@ -106,10 +102,6 @@ #define PL_curthr (*Perl_Icurthr_ptr(aTHXo)) #undef PL_dbargs #define PL_dbargs (*Perl_Idbargs_ptr(aTHXo)) -#undef PL_debdelim -#define PL_debdelim (*Perl_Idebdelim_ptr(aTHXo)) -#undef PL_debname -#define PL_debname (*Perl_Idebname_ptr(aTHXo)) #undef PL_debstash #define PL_debstash (*Perl_Idebstash_ptr(aTHXo)) #undef PL_debug @@ -118,10 +110,6 @@ #define PL_defgv (*Perl_Idefgv_ptr(aTHXo)) #undef PL_diehook #define PL_diehook (*Perl_Idiehook_ptr(aTHXo)) -#undef PL_dlevel -#define PL_dlevel (*Perl_Idlevel_ptr(aTHXo)) -#undef PL_dlmax -#define PL_dlmax (*Perl_Idlmax_ptr(aTHXo)) #undef PL_doextract #define PL_doextract (*Perl_Idoextract_ptr(aTHXo)) #undef PL_doswitches @@ -164,8 +152,6 @@ #define PL_fdpid (*Perl_Ifdpid_ptr(aTHXo)) #undef PL_filemode #define PL_filemode (*Perl_Ifilemode_ptr(aTHXo)) -#undef PL_filter_debug -#define PL_filter_debug (*Perl_Ifilter_debug_ptr(aTHXo)) #undef PL_forkprocess #define PL_forkprocess (*Perl_Iforkprocess_ptr(aTHXo)) #undef PL_formfeed @@ -218,16 +204,10 @@ #define PL_last_uni (*Perl_Ilast_uni_ptr(aTHXo)) #undef PL_lastfd #define PL_lastfd (*Perl_Ilastfd_ptr(aTHXo)) -#undef PL_lastsize -#define PL_lastsize (*Perl_Ilastsize_ptr(aTHXo)) -#undef PL_lastspbase -#define PL_lastspbase (*Perl_Ilastspbase_ptr(aTHXo)) #undef PL_laststatval #define PL_laststatval (*Perl_Ilaststatval_ptr(aTHXo)) #undef PL_laststype #define PL_laststype (*Perl_Ilaststype_ptr(aTHXo)) -#undef PL_leftgv -#define PL_leftgv (*Perl_Ileftgv_ptr(aTHXo)) #undef PL_lex_brackets #define PL_lex_brackets (*Perl_Ilex_brackets_ptr(aTHXo)) #undef PL_lex_brackstack @@ -308,8 +288,6 @@ #define PL_multi_start (*Perl_Imulti_start_ptr(aTHXo)) #undef PL_multiline #define PL_multiline (*Perl_Imultiline_ptr(aTHXo)) -#undef PL_mystrk -#define PL_mystrk (*Perl_Imystrk_ptr(aTHXo)) #undef PL_nexttoke #define PL_nexttoke (*Perl_Inexttoke_ptr(aTHXo)) #undef PL_nexttype @@ -338,8 +316,6 @@ #define PL_ofmt (*Perl_Iofmt_ptr(aTHXo)) #undef PL_oldbufptr #define PL_oldbufptr (*Perl_Ioldbufptr_ptr(aTHXo)) -#undef PL_oldlastpm -#define PL_oldlastpm (*Perl_Ioldlastpm_ptr(aTHXo)) #undef PL_oldname #define PL_oldname (*Perl_Ioldname_ptr(aTHXo)) #undef PL_oldoldbufptr @@ -390,8 +366,6 @@ #define PL_profiledata (*Perl_Iprofiledata_ptr(aTHXo)) #undef PL_replgv #define PL_replgv (*Perl_Ireplgv_ptr(aTHXo)) -#undef PL_rightgv -#define PL_rightgv (*Perl_Irightgv_ptr(aTHXo)) #undef PL_rsfp #define PL_rsfp (*Perl_Irsfp_ptr(aTHXo)) #undef PL_rsfp_filters @@ -400,14 +374,8 @@ #define PL_runops (*Perl_Irunops_ptr(aTHXo)) #undef PL_sawampersand #define PL_sawampersand (*Perl_Isawampersand_ptr(aTHXo)) -#undef PL_sawstudy -#define PL_sawstudy (*Perl_Isawstudy_ptr(aTHXo)) -#undef PL_sawvec -#define PL_sawvec (*Perl_Isawvec_ptr(aTHXo)) #undef PL_sh_path #define PL_sh_path (*Perl_Ish_path_ptr(aTHXo)) -#undef PL_siggv -#define PL_siggv (*Perl_Isiggv_ptr(aTHXo)) #undef PL_sighandlerp #define PL_sighandlerp (*Perl_Isighandlerp_ptr(aTHXo)) #undef PL_splitstr @@ -422,8 +390,6 @@ #define PL_stderrgv (*Perl_Istderrgv_ptr(aTHXo)) #undef PL_stdingv #define PL_stdingv (*Perl_Istdingv_ptr(aTHXo)) -#undef PL_strchop -#define PL_strchop (*Perl_Istrchop_ptr(aTHXo)) #undef PL_strtab #define PL_strtab (*Perl_Istrtab_ptr(aTHXo)) #undef PL_strtab_mutex @@ -458,8 +424,6 @@ #define PL_sys_intern (*Perl_Isys_intern_ptr(aTHXo)) #undef PL_tainting #define PL_tainting (*Perl_Itainting_ptr(aTHXo)) -#undef PL_thisexpr -#define PL_thisexpr (*Perl_Ithisexpr_ptr(aTHXo)) #undef PL_thr_key #define PL_thr_key (*Perl_Ithr_key_ptr(aTHXo)) #undef PL_threadnum @@ -1127,10 +1091,6 @@ #define Perl_vdeb pPerl->Perl_vdeb #undef vdeb #define vdeb Perl_vdeb -#undef Perl_deb_growlevel -#define Perl_deb_growlevel pPerl->Perl_deb_growlevel -#undef deb_growlevel -#define deb_growlevel Perl_deb_growlevel #undef Perl_debprofdump #define Perl_debprofdump pPerl->Perl_debprofdump #undef debprofdump @@ -220,11 +220,6 @@ perl_construct(pTHXx) PL_fdpid = newAV(); /* for remembering popen pids by fd */ PL_modglobal = newHV(); /* pointers to per-interpreter module globals */ - DEBUG( { - New(51,PL_debname,128,char); - New(52,PL_debdelim,128,char); - } ) - ENTER; } @@ -390,8 +385,6 @@ perl_destruct(pTHXx) PL_dowarn = G_WARN_OFF; PL_doextract = FALSE; PL_sawampersand = FALSE; /* must save all match strings */ - PL_sawstudy = FALSE; /* do fbm_instr on all strings */ - PL_sawvec = FALSE; PL_unsafe = FALSE; Safefree(PL_inplace); @@ -447,7 +440,6 @@ perl_destruct(pTHXx) /* shortcuts just get cleared */ PL_envgv = Nullgv; - PL_siggv = Nullgv; PL_incgv = Nullgv; PL_hintgv = Nullgv; PL_errgv = Nullgv; @@ -702,6 +694,7 @@ S_parse_body(pTHX_ va_list args) AV* comppadlist; register SV *sv; register char *s; + char *cddir = Nullch; XSINIT_t xsinit = va_arg(args, XSINIT_t); @@ -870,7 +863,7 @@ print \" \\@INC:\\n @INC\\n\";"); PL_doextract = TRUE; s++; if (*s) - PL_cddir = savepv(s); + cddir = s; break; case 0: break; @@ -958,8 +951,12 @@ print \" \\@INC:\\n @INC\\n\";"); } #endif - if (PL_doextract) + if (PL_doextract) { find_beginning(); + if (cddir && PerlDir_chdir(cddir) < 0) + Perl_croak(aTHX_ "Can't chdir to %s",cddir); + + } PL_main_cv = PL_compcv = (CV*)NEWSV(1104,0); sv_upgrade((SV *)PL_compcv, SVt_PVCV); @@ -1917,7 +1914,6 @@ S_init_interp(pTHX) PL_curcop = &PL_compiling;\ PL_curcopdb = NULL; \ PL_dbargs = 0; \ - PL_dlmax = 128; \ PL_dumpindent = 4; \ PL_laststatval = -1; \ PL_laststype = OP_STAT; \ @@ -1927,7 +1923,6 @@ S_init_interp(pTHX) PL_tmps_floor = -1; \ PL_tmps_ix = -1; \ PL_op_mask = NULL; \ - PL_dlmax = 128; \ PL_laststatval = -1; \ PL_laststype = OP_STAT; \ PL_mess_sv = Nullsv; \ @@ -2524,8 +2519,6 @@ S_find_beginning(pTHX) /*SUPPRESS 530*/ while (s = moreswitches(s)) ; } - if (PL_cddir && PerlDir_chdir(PL_cddir) < 0) - Perl_croak(aTHX_ "Can't chdir to %s",PL_cddir); } } } @@ -2640,10 +2633,6 @@ S_nuke_stacks(pTHX) Safefree(PL_scopestack); Safefree(PL_savestack); Safefree(PL_retstack); - DEBUG( { - Safefree(PL_debname); - Safefree(PL_debdelim); - } ) } #ifndef PERL_OBJECT @@ -599,13 +599,6 @@ Perl_vdeb(pTHXo_ const char* pat, va_list* args) ((CPerlObj*)pPerl)->Perl_vdeb(pat, args); } -#undef Perl_deb_growlevel -void -Perl_deb_growlevel(pTHXo) -{ - ((CPerlObj*)pPerl)->Perl_deb_growlevel(); -} - #undef Perl_debprofdump void Perl_debprofdump(pTHXo) @@ -83,7 +83,6 @@ VIRTUAL PPADDR_t* Perl_get_ppaddr(pTHX); VIRTUAL I32 Perl_cxinc(pTHX); VIRTUAL void Perl_deb(pTHX_ const char* pat, ...); VIRTUAL void Perl_vdeb(pTHX_ const char* pat, va_list* args); -VIRTUAL void Perl_deb_growlevel(pTHX); VIRTUAL void Perl_debprofdump(pTHX); VIRTUAL I32 Perl_debop(pTHX_ OP* o); VIRTUAL I32 Perl_debstack(pTHX); @@ -1772,10 +1772,9 @@ S_incl_perldb(pTHX) SV * Perl_filter_add(pTHX_ filter_t funcp, SV *datasv) { - if (!funcp){ /* temporary handy debugging hack to be deleted */ - PL_filter_debug = atoi((char*)datasv); - return NULL; - } + if (!funcp) + return Nullsv; + if (!PL_rsfp_filters) PL_rsfp_filters = newAV(); if (!datasv) @@ -1783,12 +1782,8 @@ Perl_filter_add(pTHX_ filter_t funcp, SV *datasv) if (!SvUPGRADE(datasv, SVt_PVIO)) Perl_die(aTHX_ "Can't upgrade filter_add data to SVt_PVIO"); IoDIRP(datasv) = (DIR*)funcp; /* stash funcp into spare field */ -#ifdef DEBUGGING - if (PL_filter_debug) { - STRLEN n_a; - Perl_warn(aTHX_ "filter_add func %p (%s)", funcp, SvPV(datasv, n_a)); - } -#endif /* DEBUGGING */ + DEBUG_P(PerlIO_printf(Perl_debug_log, "filter_add func %p (%s)\n", + funcp, SvPV_nolen(datasv))); av_unshift(PL_rsfp_filters, 1); av_store(PL_rsfp_filters, 0, datasv) ; return(datasv); @@ -1799,10 +1794,7 @@ Perl_filter_add(pTHX_ filter_t funcp, SV *datasv) void Perl_filter_del(pTHX_ filter_t funcp) { -#ifdef DEBUGGING - if (PL_filter_debug) - Perl_warn(aTHX_ "filter_del func %p", funcp); -#endif /* DEBUGGING */ + DEBUG_P(PerlIO_printf(Perl_debug_log, "filter_del func %p", funcp)); if (!PL_rsfp_filters || AvFILLp(PL_rsfp_filters)<0) return; /* if filter is on top of stack (usual case) just pop it off */ @@ -1832,10 +1824,8 @@ Perl_filter_read(pTHX_ int idx, SV *buf_sv, int maxlen) if (idx > AvFILLp(PL_rsfp_filters)){ /* Any more filters? */ /* Provide a default input filter to make life easy. */ /* Note that we append to the line. This is handy. */ -#ifdef DEBUGGING - if (PL_filter_debug) - Perl_warn(aTHX_ "filter_read %d: from rsfp\n", idx); -#endif /* DEBUGGING */ + DEBUG_P(PerlIO_printf(Perl_debug_log, + "filter_read %d: from rsfp\n", idx)); if (maxlen) { /* Want a block */ int len ; @@ -1863,21 +1853,16 @@ Perl_filter_read(pTHX_ int idx, SV *buf_sv, int maxlen) } /* Skip this filter slot if filter has been deleted */ if ( (datasv = FILTER_DATA(idx)) == &PL_sv_undef){ -#ifdef DEBUGGING - if (PL_filter_debug) - Perl_warn(aTHX_ "filter_read %d: skipped (filter deleted)\n", idx); -#endif /* DEBUGGING */ + DEBUG_P(PerlIO_printf(Perl_debug_log, + "filter_read %d: skipped (filter deleted)\n", + idx)); return FILTER_READ(idx+1, buf_sv, maxlen); /* recurse */ } /* Get function pointer hidden within datasv */ funcp = (filter_t)IoDIRP(datasv); -#ifdef DEBUGGING - if (PL_filter_debug) { - STRLEN n_a; - Perl_warn(aTHX_ "filter_read %d: via function %p (%s)\n", - idx, funcp, SvPV(datasv,n_a)); - } -#endif /* DEBUGGING */ + DEBUG_P(PerlIO_printf(Perl_debug_log, + "filter_read %d: via function %p (%s)\n", + idx, funcp, SvPV_nolen(datasv))); /* Call function. The function is expected to */ /* call "FILTER_READ(idx+1, buf_sv)" first. */ /* Return: <0:error, =0:eof, >0:not eof */ @@ -3858,8 +3843,10 @@ Perl_yylex(pTHX) case KEY_crypt: #ifdef FCRYPT - if (!PL_cryptseen++) + if (!PL_cryptseen) { + PL_cryptseen = TRUE; init_des(); + } #endif LOP(OP_CRYPT,XTERM); @@ -4543,7 +4530,6 @@ Perl_yylex(pTHX) UNI(OP_STAT); case KEY_study: - PL_sawstudy++; UNI(OP_STUDY); case KEY_substr: @@ -4754,7 +4740,6 @@ Perl_yylex(pTHX) UNI(OP_VALUES); case KEY_vec: - PL_sawvec = TRUE; LOP(OP_VEC,XTERM); case KEY_while: |