From: Dave Mitchell Date: Fri, 25 May 2007 23:26:33 +0000 (+0000) Subject: delete PL_hash_seed_set, PL_lineary; move PL_runops_std/dbg X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4b8f2e61a9bd693bb1aedb3127f6c5d2e1d8c5dc;p=p5sagit%2Fp5-mst-13.2.git delete PL_hash_seed_set, PL_lineary; move PL_runops_std/dbg the first two aren't used, and the last two are just place holders to ensure that both runops functions get linked in; so make them global rather than per-interpeter p4raw-id: //depot/perl@31280 --- diff --git a/embedvar.h b/embedvar.h index acad545..cde2b39 100644 --- a/embedvar.h +++ b/embedvar.h @@ -153,7 +153,6 @@ #define PL_glob_index (vTHX->Iglob_index) #define PL_globalstash (vTHX->Iglobalstash) #define PL_hash_seed (vTHX->Ihash_seed) -#define PL_hash_seed_set (vTHX->Ihash_seed_set) #define PL_hintgv (vTHX->Ihintgv) #define PL_hints (vTHX->Ihints) #define PL_hv_fetch_ent_mh (vTHX->Ihv_fetch_ent_mh) @@ -177,7 +176,6 @@ #define PL_lastscream (vTHX->Ilastscream) #define PL_laststatval (vTHX->Ilaststatval) #define PL_laststype (vTHX->Ilaststype) -#define PL_lineary (vTHX->Ilineary) #define PL_localizing (vTHX->Ilocalizing) #define PL_localpatches (vTHX->Ilocalpatches) #define PL_lockhook (vTHX->Ilockhook) @@ -261,8 +259,6 @@ #define PL_restartop (vTHX->Irestartop) #define PL_rs (vTHX->Irs) #define PL_runops (vTHX->Irunops) -#define PL_runops_dbg (vTHX->Irunops_dbg) -#define PL_runops_std (vTHX->Irunops_std) #define PL_savebegin (vTHX->Isavebegin) #define PL_savestack (vTHX->Isavestack) #define PL_savestack_ix (vTHX->Isavestack_ix) @@ -472,7 +468,6 @@ #define PL_Iglob_index PL_glob_index #define PL_Iglobalstash PL_globalstash #define PL_Ihash_seed PL_hash_seed -#define PL_Ihash_seed_set PL_hash_seed_set #define PL_Ihintgv PL_hintgv #define PL_Ihints PL_hints #define PL_Ihv_fetch_ent_mh PL_hv_fetch_ent_mh @@ -496,7 +491,6 @@ #define PL_Ilastscream PL_lastscream #define PL_Ilaststatval PL_laststatval #define PL_Ilaststype PL_laststype -#define PL_Ilineary PL_lineary #define PL_Ilocalizing PL_localizing #define PL_Ilocalpatches PL_localpatches #define PL_Ilockhook PL_lockhook @@ -580,8 +574,6 @@ #define PL_Irestartop PL_restartop #define PL_Irs PL_rs #define PL_Irunops PL_runops -#define PL_Irunops_dbg PL_runops_dbg -#define PL_Irunops_std PL_runops_std #define PL_Isavebegin PL_savebegin #define PL_Isavestack PL_savestack #define PL_Isavestack_ix PL_savestack_ix @@ -727,6 +719,10 @@ #define PL_Gperlio_mutex (my_vars->Gperlio_mutex) #define PL_ppaddr (my_vars->Gppaddr) #define PL_Gppaddr (my_vars->Gppaddr) +#define PL_runops_dbg (my_vars->Grunops_dbg) +#define PL_Grunops_dbg (my_vars->Grunops_dbg) +#define PL_runops_std (my_vars->Grunops_std) +#define PL_Grunops_std (my_vars->Grunops_std) #define PL_sh_path (my_vars->Gsh_path) #define PL_Gsh_path (my_vars->Gsh_path) #define PL_sig_defaulting (my_vars->Gsig_defaulting) @@ -780,6 +776,8 @@ #define PL_Gperlio_fd_refcnt_size PL_perlio_fd_refcnt_size #define PL_Gperlio_mutex PL_perlio_mutex #define PL_Gppaddr PL_ppaddr +#define PL_Grunops_dbg PL_runops_dbg +#define PL_Grunops_std PL_runops_std #define PL_Gsh_path PL_sh_path #define PL_Gsig_defaulting PL_sig_defaulting #define PL_Gsig_handlers_initted PL_sig_handlers_initted diff --git a/intrpvar.h b/intrpvar.h index 0f72441..986a364 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -307,7 +307,6 @@ PERLVAR(IDBsub, GV *) PERLVAR(IDBsingle, SV *) PERLVAR(IDBtrace, SV *) PERLVAR(IDBsignal, SV *) -PERLVAR(Ilineary, AV *) /* lines of script for debugger */ PERLVAR(Idbargs, AV *) /* args to call listed by caller function */ /* symbol tables */ @@ -556,7 +555,6 @@ PERLVARI(Isig_pending, int,0) /* Number if highest signal pending */ PERLVAR(Itaint_warn, bool) /* taint warns instead of dying */ PERLVAR(Iutf8locale, bool) /* utf8 locale detected */ -PERLVARI(Ihash_seed_set, bool, FALSE) /* Hash initialized? */ PERLVARI(Irehash_seed_set, bool, FALSE) /* 582 hash initialized? */ #ifdef USE_LOCALE_NUMERIC @@ -634,10 +632,6 @@ PERLVARI(Iunlockhook, share_proc_t, MEMBER_TO_FPTR(PERL_UNLOCK_HOOK)) PERLVARI(Ithreadhook, thrhook_proc_t, MEMBER_TO_FPTR(Perl_nothreadhook)) -/* Force inclusion of both runops options */ -PERLVARI(Irunops_std, runops_proc_t, MEMBER_TO_FPTR(Perl_runops_standard)) -PERLVARI(Irunops_dbg, runops_proc_t, MEMBER_TO_FPTR(Perl_runops_debug)) - /* Stores the PPID */ #ifdef THREADS_HAVE_PIDS PERLVARI(Ippid, IV, 0) diff --git a/perlapi.h b/perlapi.h index 72073b0..a019239 100644 --- a/perlapi.h +++ b/perlapi.h @@ -342,8 +342,6 @@ END_EXTERN_C #define PL_globalstash (*Perl_Iglobalstash_ptr(aTHX)) #undef PL_hash_seed #define PL_hash_seed (*Perl_Ihash_seed_ptr(aTHX)) -#undef PL_hash_seed_set -#define PL_hash_seed_set (*Perl_Ihash_seed_set_ptr(aTHX)) #undef PL_hintgv #define PL_hintgv (*Perl_Ihintgv_ptr(aTHX)) #undef PL_hints @@ -390,8 +388,6 @@ END_EXTERN_C #define PL_laststatval (*Perl_Ilaststatval_ptr(aTHX)) #undef PL_laststype #define PL_laststype (*Perl_Ilaststype_ptr(aTHX)) -#undef PL_lineary -#define PL_lineary (*Perl_Ilineary_ptr(aTHX)) #undef PL_localizing #define PL_localizing (*Perl_Ilocalizing_ptr(aTHX)) #undef PL_localpatches @@ -558,10 +554,6 @@ END_EXTERN_C #define PL_rs (*Perl_Irs_ptr(aTHX)) #undef PL_runops #define PL_runops (*Perl_Irunops_ptr(aTHX)) -#undef PL_runops_dbg -#define PL_runops_dbg (*Perl_Irunops_dbg_ptr(aTHX)) -#undef PL_runops_std -#define PL_runops_std (*Perl_Irunops_std_ptr(aTHX)) #undef PL_savebegin #define PL_savebegin (*Perl_Isavebegin_ptr(aTHX)) #undef PL_savestack @@ -792,6 +784,10 @@ END_EXTERN_C #define PL_perlio_mutex (*Perl_Gperlio_mutex_ptr(NULL)) #undef PL_ppaddr #define PL_ppaddr (*Perl_Gppaddr_ptr(NULL)) +#undef PL_runops_dbg +#define PL_runops_dbg (*Perl_Grunops_dbg_ptr(NULL)) +#undef PL_runops_std +#define PL_runops_std (*Perl_Grunops_std_ptr(NULL)) #undef PL_sh_path #define PL_sh_path (*Perl_Gsh_path_ptr(NULL)) #undef PL_sig_defaulting diff --git a/perlvars.h b/perlvars.h index cd88e07..ee76ebc 100644 --- a/perlvars.h +++ b/perlvars.h @@ -154,3 +154,9 @@ PERLVAR(Gperlio_mutex, perl_mutex) /* Mutex for perlio fd refcounts */ * can be set atomically (ie not a bit field) */ PERLVARI(Gveto_cleanup, int, FALSE) /* exit without cleanup */ +/* dummy variables that hold pointers to both runops functions, thus forcing + * them *both* to get linked in (useful for Peek.xs, debugging etc) */ + +PERLVARI(Grunops_std, runops_proc_t, MEMBER_TO_FPTR(Perl_runops_standard)) +PERLVARI(Grunops_dbg, runops_proc_t, MEMBER_TO_FPTR(Perl_runops_debug)) + diff --git a/sv.c b/sv.c index c2c7f4d..d5655b3 100644 --- a/sv.c +++ b/sv.c @@ -11137,7 +11137,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_DBtrace = sv_dup(proto_perl->IDBtrace, param); PL_DBsignal = sv_dup(proto_perl->IDBsignal, param); PL_DBassertion = sv_dup(proto_perl->IDBassertion, param); - PL_lineary = av_dup(proto_perl->Ilineary, param); PL_dbargs = av_dup(proto_perl->Idbargs, param); /* symbol tables */ @@ -11343,9 +11342,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_unlockhook = proto_perl->Iunlockhook; PL_threadhook = proto_perl->Ithreadhook; - PL_runops_std = proto_perl->Irunops_std; - PL_runops_dbg = proto_perl->Irunops_dbg; - #ifdef THREADS_HAVE_PIDS PL_ppid = proto_perl->Ippid; #endif