summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embed.h2
-rw-r--r--embedvar.h138
-rw-r--r--global.sym2
-rw-r--r--globals.c1
-rw-r--r--hv.c6
-rw-r--r--interp.sym45
-rw-r--r--intrpvar.h74
-rw-r--r--op.c3
-rw-r--r--perl.c2
-rw-r--r--perl.h21
-rw-r--r--pp_ctl.c4
-rw-r--r--proto.h2
-rw-r--r--regcomp.c24
-rw-r--r--regexec.c48
-rw-r--r--sv.c4
-rw-r--r--toke.c16
16 files changed, 283 insertions, 109 deletions
diff --git a/embed.h b/embed.h
index 73cc786924..825ef58789 100644
--- a/embed.h
+++ b/embed.h
@@ -325,7 +325,7 @@
#define mg_find Perl_mg_find
#define mg_free Perl_mg_free
#define mg_get Perl_mg_get
-#define mg_len Perl_mg_len
+#define mg_length Perl_mg_length
#define mg_magical Perl_mg_magical
#define mg_set Perl_mg_set
#define mg_size Perl_mg_size
diff --git a/embedvar.h b/embedvar.h
index 30bac224c9..1bd27cc16f 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -80,6 +80,7 @@
#define Argv (curinterp->IArgv)
#define Cmd (curinterp->ICmd)
+#define DBcv (curinterp->IDBcv)
#define DBgv (curinterp->IDBgv)
#define DBline (curinterp->IDBline)
#define DBsignal (curinterp->IDBsignal)
@@ -87,11 +88,15 @@
#define DBsub (curinterp->IDBsub)
#define DBtrace (curinterp->IDBtrace)
#define ampergv (curinterp->Iampergv)
+#define archpat_auto (curinterp->Iarchpat_auto)
#define argvgv (curinterp->Iargvgv)
#define argvoutgv (curinterp->Iargvoutgv)
#define basetime (curinterp->Ibasetime)
#define beginav (curinterp->Ibeginav)
+#define bostr (curinterp->Ibostr)
#define cddir (curinterp->Icddir)
+#define colors (curinterp->Icolors)
+#define colorset (curinterp->Icolorset)
#define copline (curinterp->Icopline)
#define curcopdb (curinterp->Icurcopdb)
#define curstname (curinterp->Icurstname)
@@ -114,17 +119,22 @@
#define errgv (curinterp->Ierrgv)
#define eval_root (curinterp->Ieval_root)
#define eval_start (curinterp->Ieval_start)
+#define extralen (curinterp->Iextralen)
#define fdpid (curinterp->Ifdpid)
#define filemode (curinterp->Ifilemode)
#define firstgv (curinterp->Ifirstgv)
#define forkprocess (curinterp->Iforkprocess)
#define formfeed (curinterp->Iformfeed)
+#define generation (curinterp->Igeneration)
#define gensym (curinterp->Igensym)
#define globalstash (curinterp->Iglobalstash)
+#define in_clean_all (curinterp->Iin_clean_all)
+#define in_clean_objs (curinterp->Iin_clean_objs)
#define incgv (curinterp->Iincgv)
#define initav (curinterp->Iinitav)
#define inplace (curinterp->Iinplace)
#define lastfd (curinterp->Ilastfd)
+#define lastgotoprobe (curinterp->Ilastgotoprobe)
#define lastscream (curinterp->Ilastscream)
#define lastsize (curinterp->Ilastsize)
#define lastspbase (curinterp->Ilastspbase)
@@ -132,6 +142,7 @@
#define laststype (curinterp->Ilaststype)
#define leftgv (curinterp->Ileftgv)
#define lineary (curinterp->Ilineary)
+#define linestart (curinterp->Ilinestart)
#define localpatches (curinterp->Ilocalpatches)
#define main_cv (curinterp->Imain_cv)
#define main_root (curinterp->Imain_root)
@@ -139,12 +150,14 @@
#define maxscream (curinterp->Imaxscream)
#define maxsysfd (curinterp->Imaxsysfd)
#define mess_sv (curinterp->Imess_sv)
+#define mh (curinterp->Imh)
#define minus_F (curinterp->Iminus_F)
#define minus_a (curinterp->Iminus_a)
#define minus_c (curinterp->Iminus_c)
#define minus_l (curinterp->Iminus_l)
#define minus_n (curinterp->Iminus_n)
#define minus_p (curinterp->Iminus_p)
+#define modcount (curinterp->Imodcount)
#define multiline (curinterp->Imultiline)
#define mystrk (curinterp->Imystrk)
#define ofmt (curinterp->Iofmt)
@@ -158,21 +171,53 @@
#define orslen (curinterp->Iorslen)
#define parsehook (curinterp->Iparsehook)
#define patchlevel (curinterp->Ipatchlevel)
+#define pending_ident (curinterp->Ipending_ident)
#define perl_destruct_level (curinterp->Iperl_destruct_level)
#define perldb (curinterp->Iperldb)
#define preambleav (curinterp->Ipreambleav)
#define preambled (curinterp->Ipreambled)
#define preprocess (curinterp->Ipreprocess)
+#define reg_eval_set (curinterp->Ireg_eval_set)
+#define reg_flags (curinterp->Ireg_flags)
+#define reg_start_tmp (curinterp->Ireg_start_tmp)
+#define reg_start_tmpl (curinterp->Ireg_start_tmpl)
+#define regbol (curinterp->Iregbol)
+#define regcc (curinterp->Iregcc)
+#define regcode (curinterp->Iregcode)
+#define regdata (curinterp->Iregdata)
+#define regdummy (curinterp->Iregdummy)
+#define regendp (curinterp->Iregendp)
+#define regeol (curinterp->Iregeol)
+#define regflags (curinterp->Iregflags)
+#define regindent (curinterp->Iregindent)
+#define reginput (curinterp->Ireginput)
+#define reglastparen (curinterp->Ireglastparen)
+#define regnarrate (curinterp->Iregnarrate)
+#define regnaughty (curinterp->Iregnaughty)
+#define regnpar (curinterp->Iregnpar)
+#define regparse (curinterp->Iregparse)
+#define regprecomp (curinterp->Iregprecomp)
+#define regprev (curinterp->Iregprev)
+#define regprogram (curinterp->Iregprogram)
+#define regsawback (curinterp->Iregsawback)
+#define regseen (curinterp->Iregseen)
+#define regsize (curinterp->Iregsize)
+#define regstartp (curinterp->Iregstartp)
+#define regtill (curinterp->Iregtill)
+#define regxend (curinterp->Iregxend)
#define rightgv (curinterp->Irightgv)
+#define rx (curinterp->Irx)
#define sawampersand (curinterp->Isawampersand)
#define sawstudy (curinterp->Isawstudy)
#define sawvec (curinterp->Isawvec)
+#define seen_zerolen (curinterp->Iseen_zerolen)
#define screamfirst (curinterp->Iscreamfirst)
#define screamnext (curinterp->Iscreamnext)
#define secondgv (curinterp->Isecondgv)
#define siggv (curinterp->Isiggv)
#define signalstack (curinterp->Isignalstack)
#define sortcop (curinterp->Isortcop)
+#define sortcxix (curinterp->Isortcxix)
#define sortstack (curinterp->Isortstack)
#define sortstash (curinterp->Isortstash)
#define splitstr (curinterp->Isplitstr)
@@ -184,6 +229,7 @@
#define stdingv (curinterp->Istdingv)
#define strchop (curinterp->Istrchop)
#define strtab (curinterp->Istrtab)
+#define sublex_info (curinterp->Isublex_info)
#define sv_arenaroot (curinterp->Isv_arenaroot)
#define sv_count (curinterp->Isv_count)
#define sv_objcount (curinterp->Isv_objcount)
@@ -198,6 +244,7 @@
#define IArgv Argv
#define ICmd Cmd
+#define IDBcv DBcv
#define IDBgv DBgv
#define IDBline DBline
#define IDBsignal DBsignal
@@ -205,11 +252,15 @@
#define IDBsub DBsub
#define IDBtrace DBtrace
#define Iampergv ampergv
+#define Iarchpat_auto archpat_auto
#define Iargvgv argvgv
#define Iargvoutgv argvoutgv
#define Ibasetime basetime
#define Ibeginav beginav
+#define Ibostr bostr
#define Icddir cddir
+#define Icolors colors
+#define Icolorset colorset
#define Icopline copline
#define Icurcopdb curcopdb
#define Icurstname curstname
@@ -232,17 +283,22 @@
#define Ierrgv errgv
#define Ieval_root eval_root
#define Ieval_start eval_start
+#define Iextralen extralen
#define Ifdpid fdpid
#define Ifilemode filemode
#define Ifirstgv firstgv
#define Iforkprocess forkprocess
#define Iformfeed formfeed
+#define Igeneration generation
#define Igensym gensym
#define Iglobalstash globalstash
+#define Iin_clean_all in_clean_all
+#define Iin_clean_objs in_clean_objs
#define Iincgv incgv
#define Iinitav initav
#define Iinplace inplace
#define Ilastfd lastfd
+#define Ilastgotoprobe lastgotoprobe
#define Ilastscream lastscream
#define Ilastsize lastsize
#define Ilastspbase lastspbase
@@ -250,6 +306,7 @@
#define Ilaststype laststype
#define Ileftgv leftgv
#define Ilineary lineary
+#define Ilinestart linestart
#define Ilocalpatches localpatches
#define Imain_cv main_cv
#define Imain_root main_root
@@ -257,12 +314,14 @@
#define Imaxscream maxscream
#define Imaxsysfd maxsysfd
#define Imess_sv mess_sv
+#define Imh mh
#define Iminus_F minus_F
#define Iminus_a minus_a
#define Iminus_c minus_c
#define Iminus_l minus_l
#define Iminus_n minus_n
#define Iminus_p minus_p
+#define Imodcount modcount
#define Imultiline multiline
#define Imystrk mystrk
#define Iofmt ofmt
@@ -276,21 +335,53 @@
#define Iorslen orslen
#define Iparsehook parsehook
#define Ipatchlevel patchlevel
+#define Ipending_ident pending_ident
#define Iperl_destruct_level perl_destruct_level
#define Iperldb perldb
#define Ipreambleav preambleav
#define Ipreambled preambled
#define Ipreprocess preprocess
+#define Ireg_eval_set reg_eval_set
+#define Ireg_flags reg_flags
+#define Ireg_start_tmp reg_start_tmp
+#define Ireg_start_tmpl reg_start_tmpl
+#define Iregbol regbol
+#define Iregcc regcc
+#define Iregcode regcode
+#define Iregdata regdata
+#define Iregdummy regdummy
+#define Iregendp regendp
+#define Iregeol regeol
+#define Iregflags regflags
+#define Iregindent regindent
+#define Ireginput reginput
+#define Ireglastparen reglastparen
+#define Iregnarrate regnarrate
+#define Iregnaughty regnaughty
+#define Iregnpar regnpar
+#define Iregparse regparse
+#define Iregprecomp regprecomp
+#define Iregprev regprev
+#define Iregprogram regprogram
+#define Iregsawback regsawback
+#define Iregseen regseen
+#define Iregsize regsize
+#define Iregstartp regstartp
+#define Iregtill regtill
+#define Iregxend regxend
#define Irightgv rightgv
+#define Irx rx
#define Isawampersand sawampersand
#define Isawstudy sawstudy
#define Isawvec sawvec
#define Iscreamfirst screamfirst
#define Iscreamnext screamnext
#define Isecondgv secondgv
+#define Iseen_zerolen seen_zerolen
#define Isiggv siggv
#define Isignalstack signalstack
#define Isortcop sortcop
+#define Isortcxix sortcxix
#define Isortstack sortstack
#define Isortstash sortstash
#define Isplitstr splitstr
@@ -302,6 +393,7 @@
#define Istdingv stdingv
#define Istrchop strchop
#define Istrtab strtab
+#define Isublex_info sublex_info
#define Isv_arenaroot sv_arenaroot
#define Isv_count sv_count
#define Isv_objcount sv_objcount
@@ -376,6 +468,7 @@
#define Argv Perl_Argv
#define Cmd Perl_Cmd
+#define DBcv Perl_DBcv
#define DBgv Perl_DBgv
#define DBline Perl_DBline
#define DBsignal Perl_DBsignal
@@ -383,11 +476,15 @@
#define DBsub Perl_DBsub
#define DBtrace Perl_DBtrace
#define ampergv Perl_ampergv
+#define archpat_auto Perl_archpat_auto
#define argvgv Perl_argvgv
#define argvoutgv Perl_argvoutgv
#define basetime Perl_basetime
#define beginav Perl_beginav
+#define bostr Perl_bostr
#define cddir Perl_cddir
+#define colors Perl_colors
+#define colorset Perl_colorset
#define copline Perl_copline
#define curcopdb Perl_curcopdb
#define curstname Perl_curstname
@@ -410,17 +507,22 @@
#define errgv Perl_errgv
#define eval_root Perl_eval_root
#define eval_start Perl_eval_start
+#define extralen Perl_extralen
#define fdpid Perl_fdpid
#define filemode Perl_filemode
#define firstgv Perl_firstgv
#define forkprocess Perl_forkprocess
#define formfeed Perl_formfeed
+#define generation Perl_generation
#define gensym Perl_gensym
#define globalstash Perl_globalstash
+#define in_clean_all Perl_in_clean_all
+#define in_clean_objs Perl_in_clean_objs
#define incgv Perl_incgv
#define initav Perl_initav
#define inplace Perl_inplace
#define lastfd Perl_lastfd
+#define lastgotoprobe Perl_lastgotoprobe
#define lastscream Perl_lastscream
#define lastsize Perl_lastsize
#define lastspbase Perl_lastspbase
@@ -428,6 +530,7 @@
#define laststype Perl_laststype
#define leftgv Perl_leftgv
#define lineary Perl_lineary
+#define linestart Perl_linestart
#define localpatches Perl_localpatches
#define main_cv Perl_main_cv
#define main_root Perl_main_root
@@ -435,12 +538,14 @@
#define maxscream Perl_maxscream
#define maxsysfd Perl_maxsysfd
#define mess_sv Perl_mess_sv
+#define mh Perl_mh
#define minus_F Perl_minus_F
#define minus_a Perl_minus_a
#define minus_c Perl_minus_c
#define minus_l Perl_minus_l
#define minus_n Perl_minus_n
#define minus_p Perl_minus_p
+#define modcount Perl_modcount
#define multiline Perl_multiline
#define mystrk Perl_mystrk
#define ofmt Perl_ofmt
@@ -454,21 +559,53 @@
#define orslen Perl_orslen
#define parsehook Perl_parsehook
#define patchlevel Perl_patchlevel
+#define pending_ident Perl_pending_ident
#define perl_destruct_level Perl_perl_destruct_level
#define perldb Perl_perldb
#define preambleav Perl_preambleav
#define preambled Perl_preambled
#define preprocess Perl_preprocess
+#define reg_eval_set Perl_reg_eval_set
+#define reg_flags Perl_reg_flags
+#define reg_start_tmp Perl_reg_start_tmp
+#define reg_start_tmpl Perl_reg_start_tmpl
+#define regbol Perl_regbol
+#define regcc Perl_regcc
+#define regcode Perl_regcode
+#define regdata Perl_regdata
+#define regdummy Perl_regdummy
+#define regendp Perl_regendp
+#define regeol Perl_regeol
+#define regflags Perl_regflags
+#define regindent Perl_regindent
+#define reginput Perl_reginput
+#define reglastparen Perl_reglastparen
+#define regnarrate Perl_regnarrate
+#define regnaughty Perl_regnaughty
+#define regnpar Perl_regnpar
+#define regparse Perl_regparse
+#define regprecomp Perl_regprecomp
+#define regprev Perl_regprev
+#define regprogram Perl_regprogram
+#define regsawback Perl_regsawback
+#define regseen Perl_regseen
+#define regsize Perl_regsize
+#define regstartp Perl_regstartp
+#define regtill Perl_regtill
+#define regxend Perl_regxend
#define rightgv Perl_rightgv
+#define rx Perl_rx
#define sawampersand Perl_sawampersand
#define sawstudy Perl_sawstudy
#define sawvec Perl_sawvec
#define screamfirst Perl_screamfirst
#define screamnext Perl_screamnext
#define secondgv Perl_secondgv
+#define seen_zerolen Perl_seen_zerolen
#define siggv Perl_siggv
#define signalstack Perl_signalstack
#define sortcop Perl_sortcop
+#define sortcxix Perl_sortcxix
#define sortstack Perl_sortstack
#define sortstash Perl_sortstash
#define splitstr Perl_splitstr
@@ -480,6 +617,7 @@
#define stdingv Perl_stdingv
#define strchop Perl_strchop
#define strtab Perl_strtab
+#define sublex_info Perl_sublex_info
#define sv_arenaroot Perl_sv_arenaroot
#define sv_count Perl_sv_count
#define sv_objcount Perl_sv_objcount
diff --git a/global.sym b/global.sym
index afbc7c9620..b83f6d401d 100644
--- a/global.sym
+++ b/global.sym
@@ -427,7 +427,7 @@ mg_copy
mg_find
mg_free
mg_get
-mg_len
+mg_length
mg_magical
mg_set
mg_size
diff --git a/globals.c b/globals.c
index 9f77299c2c..cd42e1715f 100644
--- a/globals.c
+++ b/globals.c
@@ -1474,6 +1474,7 @@ CPerlObj::Init(void)
copline = NOLINE;
laststatval = -1;
laststype = OP_STAT;
+ generation = 100;
#ifdef WIN32
New(2904, environ, 1, char*);
diff --git a/hv.c b/hv.c
index 64ad73f1a3..3474761503 100644
--- a/hv.c
+++ b/hv.c
@@ -142,7 +142,7 @@ hv_fetch(HV *hv, char *key, U32 klen, I32 lval)
if (HvNAME(hv) && strEQ(HvNAME(hv),ENV_HV_NAME)) {
char *gotenv;
- if ((gotenv = ENV_getenv(key)) != Nullch) {
+ if ((gotenv = PerlEnv_getenv(key)) != Nullch) {
sv = newSVpv(gotenv,strlen(gotenv));
SvTAINTED_on(sv);
return hv_store(hv,key,klen,sv,hash);
@@ -172,8 +172,6 @@ hv_fetch_ent(HV *hv, SV *keysv, I32 lval, register U32 hash)
if (SvRMAGICAL(hv)) {
if (mg_find((SV*)hv,'P')) {
- static HE mh;
-
sv = sv_newmortal();
keysv = sv_2mortal(newSVsv(keysv));
mg_copy((SV*)hv, sv, (char*)keysv, HEf_SVKEY);
@@ -234,7 +232,7 @@ hv_fetch_ent(HV *hv, SV *keysv, I32 lval, register U32 hash)
if (HvNAME(hv) && strEQ(HvNAME(hv),ENV_HV_NAME)) {
char *gotenv;
- if ((gotenv = ENV_getenv(key)) != Nullch) {
+ if ((gotenv = PerlEnv_getenv(key)) != Nullch) {
sv = newSVpv(gotenv,strlen(gotenv));
SvTAINTED_on(sv);
return hv_store_ent(hv,keysv,sv,hash);
diff --git a/interp.sym b/interp.sym
index 5453afa064..efa8e83c06 100644
--- a/interp.sym
+++ b/interp.sym
@@ -1,5 +1,6 @@
Argv
Cmd
+DBcv
DBgv
DBline
DBsignal
@@ -7,13 +8,17 @@ DBsingle
DBsub
DBtrace
ampergv
+archpat_auto
argvgv
argvoutgv
basetime
beginav
bodytarget
+bostr
cddir
chopset
+colors
+colorset
copline
curcop
curcopdb
@@ -47,20 +52,25 @@ envgv
errgv
eval_root
eval_start
+extralen
fdpid
filemode
firstgv
forkprocess
formfeed
formtarget
+generation
gensym
globalstash
+in_clean_all
+in_clean_objs
in_eval
incgv
initav
inplace
last_in_gv
lastfd
+lastgotoprobe
lastscream
lastsize
lastspbase
@@ -68,6 +78,7 @@ laststatval
laststype
leftgv
lineary
+linestart
localizing
localpatches
main_cv
@@ -83,6 +94,7 @@ minus_c
minus_l
minus_n
minus_p
+modcount
multiline
mystrk
nrs
@@ -99,23 +111,55 @@ ors
orslen
parsehook
patchlevel
+pending_ident
perldb
perl_destruct_level
preambled
preambleav
preprocess
+reg_eval_set
+reg_flags
+reg_start_tmp
+reg_start_tmpl
+regbol
+regcc
+regcode
+regdata
+regdummy
+regendp
+regeol
+regflags
+regindent
+reginput
+reglastparen
+regnarrate
+regnaughty
+regnpar
+regparse
+regprecomp
+regprev
+regprogram
+regsawback
+regseen
+regsize
+regstartp
+regtill
+regxend
restartop
rightgv
rs
+rx
sawampersand
sawstudy
sawvec
screamfirst
screamnext
secondgv
+seen_zerolen
siggv
signalstack
sortcop
+sortcxix
sortstack
sortstash
splitstr
@@ -128,6 +172,7 @@ statusvalue_vms
stdingv
strchop
strtab
+sublex_info
sv_count
sv_objcount
sv_root
diff --git a/intrpvar.h b/intrpvar.h
index 21f907602e..f9eaf50ad8 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -154,17 +154,77 @@ PERLVAR(Iors, char *) /* $\ */
PERLVAR(Iorslen, STRLEN)
PERLVAR(Iofmt, char *) /* $# */
+/* more statics moved here */
+PERLVAR(Imh, HE) /* from hv.c */
+PERLVAR(Imodcount, I32) /* from op.c */
+PERLVARI(Igeneration, int, 100) /* from op.c */
+PERLVAR(IDBcv, CV *) /* from perl.c */
+PERLVAR(Iarchpat_auto, char*) /* from perl.c */
+PERLVAR(Isortcxix, I32) /* from pp_ctl.c */
+PERLVAR(Ilastgotoprobe, OP*) /* from pp_ctl.c */
+PERLVAR(Iregdummy, regnode) /* from regcomp.c */
+PERLVAR(Iregparse, char*) /* Input-scan pointer. */
+PERLVAR(Iregxend, char*) /* End of input for compile */
+PERLVAR(Iregcode, regnode*) /* Code-emit pointer; &regdummy = don't. */
+PERLVAR(Iregnaughty, I32) /* How bad is this pattern? */
+PERLVAR(Iregsawback, I32) /* Did we see \1, ...? */
+
+/* This guys appear both in regcomp.c and regexec.c, */
+PERLVAR(Iregprecomp, char *) /* uncompiled string. */
+PERLVAR(Iregnpar, I32) /* () count. */
+PERLVAR(Iregsize, I32) /* Code size. */
+PERLVAR(Iregflags, U16) /* are we folding, multilining? */
+
+PERLVAR(Iregseen, U32) /* from regcomp.c */
+PERLVAR(Iseen_zerolen, I32) /* from regcomp.c */
+PERLVAR(Irx, regexp *) /* from regcomp.c */
+PERLVAR(Iextralen, I32) /* from regcomp.c */
+#ifdef DEBUGGING
+PERLVAR(Icolorset, int) /* from regcomp.c */
+PERLVAR(Icolors[4], char *) /* from regcomp.c */
+#endif
+
+PERLVAR(Ireginput, char *) /* String-input pointer. */
+PERLVAR(Iregbol, char *) /* Beginning of input, for ^ check. */
+PERLVAR(Iregeol, char *) /* End of input, for $ check. */
+PERLVAR(Iregstartp, char **) /* Pointer to startp array. */
+PERLVAR(Iregendp, char **) /* Ditto for endp. */
+PERLVAR(Ireglastparen, U32 *) /* Similarly for lastparen. */
+PERLVAR(Iregtill, char *) /* How far we are required to go. */
+PERLVAR(Iregprev, char) /* char before regbol, \n if none */
+
+PERLVAR(Ireg_start_tmp, char **) /* from regexec.c */
+PERLVAR(Ireg_start_tmpl,U32) /* from regexec.c */
+PERLVAR(Iregdata, struct reg_data *) /* from regexec.c renamed was data */
+PERLVAR(Ibostr, char *) /* from regexec.c */
+PERLVAR(Ireg_flags, U32) /* from regexec.c */
+PERLVAR(Ireg_eval_set, I32) /* from regexec.c */
+
+#ifdef DEBUGGING
+PERLVAR(Iregnarrate, I32) /* from regexec.c */
+PERLVAR(Iregprogram, regnode *) /* from regexec.c */
+PERLVARI(Iregindent, int, 0) /* from regexec.c */
+#endif
+
+PERLVAR(Iregcc, CURCUR *) /* from regexec.c */
+PERLVARI(Iin_clean_objs,bool, FALSE) /* from sv.c */
+PERLVARI(Iin_clean_all, bool, FALSE) /* from sv.c */
+
+PERLVAR(Ilinestart, char *) /* beg. of most recently read line */
+PERLVAR(Ipending_ident, char) /* pending identifier lookup */
+PERLVAR(Isublex_info, SUBLEXINFO) /* from toke.c */
+
#ifdef USE_THREADS
PERLVAR(Ithrsv, SV *) /* holds struct perl_thread for main thread */
PERLVARI(Ithreadnum, U32, 0) /* incremented each thread creation */
#endif /* USE_THREADS */
#ifdef PERL_OBJECT
-PERLVARI(piMem, IPerlMem*, NULL)
-PERLVARI(piENV, IPerlEnv*, NULL)
-PERLVARI(piStdIO, IPerlStdIO*, NULL)
-PERLVARI(piLIO, IPerlLIO*, NULL)
-PERLVARI(piDir, IPerlDir*, NULL)
-PERLVARI(piSock, IPerlSock*, NULL)
-PERLVARI(piProc, IPerlProc*, NULL)
+PERLVARI(piMem, IPerlMem*, NULL)
+PERLVARI(piENV, IPerlEnv*, NULL)
+PERLVARI(piStdIO, IPerlStdIO*, NULL)
+PERLVARI(piLIO, IPerlLIO*, NULL)
+PERLVARI(piDir, IPerlDir*, NULL)
+PERLVARI(piSock, IPerlSock*, NULL)
+PERLVARI(piProc, IPerlProc*, NULL)
#endif
diff --git a/op.c b/op.c
index 052974552d..fae24f82ca 100644
--- a/op.c
+++ b/op.c
@@ -1067,8 +1067,6 @@ modkids(OP *o, I32 type)
return o;
}
-static I32 modcount;
-
OP *
mod(OP *o, I32 type)
{
@@ -2457,7 +2455,6 @@ newASSIGNOP(I32 flags, OP *left, I32 optype, OP *right)
list(force_list(left)) );
o->op_private = 0 | (flags >> 8);
if (!(left->op_private & OPpLVAL_INTRO)) {
- static int generation = 100;
OP *curop;
OP *lastop = o;
generation++;
diff --git a/perl.c b/perl.c
index 094ddf7c66..363d039cdc 100644
--- a/perl.c
+++ b/perl.c
@@ -1206,7 +1206,6 @@ perl_call_sv(SV *sv, I32 flags)
I32 oldmark;
I32 retval;
I32 oldscope;
- static CV *DBcv;
bool oldcatch = CATCH_GET;
dJMPENV;
int ret;
@@ -2752,7 +2751,6 @@ STATIC void
incpush(char *p, int addsubdirs)
{
SV *subdir = Nullsv;
- static char *archpat_auto;
if (!p)
return;
diff --git a/perl.h b/perl.h
index 4602537c1a..190fe0ad5b 100644
--- a/perl.h
+++ b/perl.h
@@ -1129,6 +1129,27 @@ union any {
#include "mg.h"
#include "scope.h"
+/* Current curly descriptor */
+typedef struct curcur CURCUR;
+struct curcur {
+ int parenfloor; /* how far back to strip paren data */
+ int cur; /* how many instances of scan we've matched */
+ int min; /* the minimal number of scans to match */
+ int max; /* the maximal number of scans to match */
+ int minmod; /* whether to work our way up or down */
+ regnode * scan; /* the thing to match */
+ regnode * next; /* what has to match after it */
+ char * lastloc; /* where we started matching this scan */
+ CURCUR * oldcc; /* current curly before we started this one */
+};
+
+typedef struct _sublex_info SUBLEXINFO;
+struct _sublex_info {
+ I32 super_state; /* lexer state to save */
+ I32 sub_inwhat; /* "lex_inwhat" to use */
+ OP *sub_op; /* "lex_op" to use */
+};
+
#ifdef PERL_OBJECT
struct magic_state {
SV* mgs_sv;
diff --git a/pp_ctl.c b/pp_ctl.c
index 7137f9b9d0..cd84a7e937 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -42,8 +42,6 @@ static void qsortsv _((SV **array, size_t num_elts, I32 (*fun)(SV *a, SV *b)));
static OP *doeval _((int gimme, OP** startop));
#endif
-static I32 sortcxix;
-
PP(pp_wantarray)
{
djSP;
@@ -1634,8 +1632,6 @@ PP(pp_redo)
return cx->blk_loop.redo_op;
}
-static OP* lastgotoprobe;
-
STATIC OP *
dofindlabel(OP *o, char *label, OP **opstack, OP **oplimit)
{
diff --git a/proto.h b/proto.h
index c14c3e8959..b82db6ad0f 100644
--- a/proto.h
+++ b/proto.h
@@ -1191,6 +1191,8 @@ OP *ck_trunc _((OP *o));
void unwind_handler_stack _((void *p));
void restore_magic _((void *p));
void restore_rsfp _((void *f));
+void restore_expect _((void *e));
+void restore_lex_expect _((void *e));
void yydestruct _((void *ptr));
VIRTUAL int fprintf _((PerlIO *, const char *, ...));
diff --git a/regcomp.c b/regcomp.c
index 9d9fa89a32..b457cfb2f2 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -64,20 +64,6 @@
#undef op
#endif /* op */
-static regnode regdummy;
-static char * regparse; /* Input-scan pointer. */
-static char * regxend; /* End of input for compile */
-static regnode * regcode; /* Code-emit pointer; &regdummy = don't. */
-static I32 regnaughty; /* How bad is this pattern? */
-static I32 regsawback; /* Did we see \1, ...? */
-
-/* This guys appear both in regcomp.c and regexec.c, but there is no
- other reason to have them global. */
-static char * regprecomp; /* uncompiled string. */
-static I32 regnpar; /* () count. */
-static I32 regsize; /* Code size. */
-static U16 regflags; /* are we folding, multilining? */
-
#ifdef MSDOS
# if defined(BUGGY_MSC6)
/* MSC 6.00A breaks on op/regexp.t test 85 unless we turn this off */
@@ -134,16 +120,6 @@ static void regtail _((regnode *, regnode *));
static char* nextchar _((void));
#endif
-static U32 regseen;
-static I32 seen_zerolen;
-static regexp *rx;
-static I32 extralen;
-
-#ifdef DEBUGGING
-static int colorset;
-char *colors[4];
-#endif
-
/* Length of a variant. */
#ifndef PERL_OBJECT
diff --git a/regexec.c b/regexec.c
index 32c9c75d89..d3b6783279 100644
--- a/regexec.c
+++ b/regexec.c
@@ -55,26 +55,6 @@
#include "perl.h"
#include "regcomp.h"
-static char * reginput; /* String-input pointer. */
-static char * regbol; /* Beginning of input, for ^ check. */
-static char * regeol; /* End of input, for $ check. */
-static char ** regstartp; /* Pointer to startp array. */
-static char ** regendp; /* Ditto for endp. */
-static U32 * reglastparen; /* Similarly for lastparen. */
-static char * regtill; /* How far we are required to go. */
-static char regprev; /* char before regbol, \n if none */
-
-static char * regprecomp; /* uncompiled string. */
-static I32 regnpar; /* () count. */
-static I32 regsize; /* Largest OPEN seens. */
-static char ** reg_start_tmp;
-static U32 reg_start_tmpl;
-static struct reg_data *data;
-static char *bostr;
-
-static U32 reg_flags; /* tainted/warned */
-static I32 reg_eval_set;
-
#define RF_tainted 1 /* tainted information used? */
#define RF_warned 2 /* warned about big count? */
#define RF_evaled 4 /* Did an EVAL? */
@@ -83,27 +63,6 @@ static I32 reg_eval_set;
#define STATIC static
#endif
-#ifdef DEBUGGING
-static I32 regnarrate = 0;
-static regnode* regprogram = 0;
-#endif
-
-/* Current curly descriptor */
-typedef struct curcur CURCUR;
-struct curcur {
- int parenfloor; /* how far back to strip paren data */
- int cur; /* how many instances of scan we've matched */
- int min; /* the minimal number of scans to match */
- int max; /* the maximal number of scans to match */
- int minmod; /* whether to work our way up or down */
- regnode * scan; /* the thing to match */
- regnode * next; /* what has to match after it */
- char * lastloc; /* where we started matching this scan */
- CURCUR * oldcc; /* current curly before we started this one */
-};
-
-static CURCUR* regcc;
-
#ifndef PERL_OBJECT
typedef I32 CHECKPOINT;
@@ -705,7 +664,7 @@ regtry(regexp *prog, char *startpos)
sp = prog->startp;
ep = prog->endp;
- data = prog->data;
+ regdata = prog->data;
if (prog->nparens) {
for (i = prog->nparens; i >= 0; i--) {
*sp++ = NULL;
@@ -751,7 +710,6 @@ regmatch(regnode *prog)
register I32 c1, c2, paren; /* case fold search, parenth */
int minmod = 0, sw = 0, logical = 0;
#ifdef DEBUGGING
- static int regindent = 0;
regindent++;
#endif
@@ -1017,9 +975,9 @@ regmatch(regnode *prog)
SV *ret;
n = ARG(scan);
- op = (OP_4tree*)data->data[n];
+ op = (OP_4tree*)regdata->data[n];
DEBUG_r( PerlIO_printf(Perl_debug_log, " re_eval 0x%x\n", op) );
- curpad = AvARRAY((AV*)data->data[n + 1]);
+ curpad = AvARRAY((AV*)regdata->data[n + 1]);
if (!reg_eval_set) {
/* Preserve whatever is on stack now, otherwise
OP_NEXTSTATE will overwrite it. */
diff --git a/sv.c b/sv.c
index e9e5cfb599..7562c12980 100644
--- a/sv.c
+++ b/sv.c
@@ -348,8 +348,6 @@ do_clean_named_objs(SV *sv)
}
#endif
-static bool in_clean_objs = FALSE;
-
void
sv_clean_objs(void)
{
@@ -369,8 +367,6 @@ do_clean_all(SV *sv)
SvREFCNT_dec(sv);
}
-static bool in_clean_all = FALSE;
-
void
sv_clean_all(void)
{
diff --git a/toke.c b/toke.c
index 64f0ca29ab..878555e61a 100644
--- a/toke.c
+++ b/toke.c
@@ -56,16 +56,6 @@ static void restore_lex_expect _((void *e));
static char ident_too_long[] = "Identifier too long";
-static char *linestart; /* beg. of most recently read line */
-
-static char pending_ident; /* pending identifier lookup */
-
-static struct {
- I32 super_state; /* lexer state to save */
- I32 sub_inwhat; /* "lex_inwhat" to use */
- OP *sub_op; /* "lex_op" to use */
-} sublex_info;
-
/* The following are arranged oddly so that the guard on the switch statement
* can get by with a single comparison (if the compiler is smart enough).
*/
@@ -320,16 +310,14 @@ restore_rsfp(void *f)
}
STATIC void
-restore_expect(e)
-void *e;
+restore_expect(void *e)
{
/* a safe way to store a small integer in a pointer */
expect = (expectation)((char *)e - tokenbuf);
}
STATIC void
-restore_lex_expect(e)
-void *e;
+restore_lex_expect(void *e)
{
/* a safe way to store a small integer in a pointer */
lex_expect = (expectation)((char *)e - tokenbuf);