1 /***********************************************/
2 /* Global only to current interpreter instance */
3 /***********************************************/
5 /* Don't forget to re-run embed.pl to propagate changes! */
7 /* The 'I' prefix is only needed for vars that need appropriate #defines
8 * generated when built with or without MULTIPLICITY. It is also used
9 * to generate the appropriate export list for win32.
11 * When building without MULTIPLICITY, these variables will be truly global.
13 * Avoid build-specific #ifdefs here, like DEBUGGING. That way,
14 * we can keep binary compatibility of the curinterp structure */
16 /* pseudo environmental stuff */
17 PERLVAR(Iorigargc, int)
18 PERLVAR(Iorigargv, char **)
22 PERLVAR(Ihintgv, GV *)
23 PERLVAR(Iorigfilename, char *)
24 PERLVAR(Idiehook, SV *)
25 PERLVAR(Iwarnhook, SV *)
26 PERLVAR(Iparsehook, SV *)
27 PERLVAR(Icddir, char *) /* switches */
28 PERLVAR(Iminus_c, bool)
29 PERLVAR(Ipatchlevel[10],char)
30 PERLVAR(Ilocalpatches, char **)
31 PERLVARI(Isplitstr, char *, " ")
32 PERLVAR(Ipreprocess, bool)
33 PERLVAR(Iminus_n, bool)
34 PERLVAR(Iminus_p, bool)
35 PERLVAR(Iminus_l, bool)
36 PERLVAR(Iminus_a, bool)
37 PERLVAR(Iminus_F, bool)
38 PERLVAR(Idoswitches, bool)
39 PERLVAR(Idowarn, bool)
40 PERLVAR(Idoextract, bool)
41 PERLVAR(Isawampersand, bool) /* must save all match strings */
42 PERLVAR(Isawstudy, bool) /* do fbm_instr on all strings */
43 PERLVAR(Isawvec, bool)
44 PERLVAR(Iunsafe, bool)
45 PERLVAR(Iinplace, char *)
46 PERLVAR(Ie_script, SV *)
49 /* This value may be raised by extensions for testing purposes */
50 /* 0=none, 1=full, 2=full with checks */
51 PERLVARI(Iperl_destruct_level, int, 0)
53 /* magical thingies */
54 PERLVAR(Ibasetime, Time_t) /* $^T */
55 PERLVAR(Iformfeed, SV *) /* $^L */
58 PERLVARI(Imaxsysfd, I32, MAXSYSFD)
59 /* top fd to pass to subprocesses */
60 PERLVAR(Imultiline, int) /* $*--do strings hold >1 line? */
61 PERLVAR(Istatusvalue, I32) /* $? */
63 PERLVAR(Istatusvalue_vms,U32)
66 PERLVAR(Istatcache, Stat_t) /* _ */
67 PERLVAR(Istatgv, GV *)
68 PERLVARI(Istatname, SV *, Nullsv)
70 /* shortcuts to various I/O objects */
71 PERLVAR(Istdingv, GV *)
73 PERLVAR(Iargvgv, GV *)
74 PERLVAR(Iargvoutgv, GV *)
76 /* shortcuts to regexp stuff */
77 PERLVAR(Ileftgv, GV *)
78 PERLVAR(Iampergv, GV *)
79 PERLVAR(Irightgv, GV *)
80 PERLVAR(Iscreamfirst, I32 *)
81 PERLVAR(Iscreamnext, I32 *)
82 PERLVARI(Imaxscream, I32, -1)
83 PERLVAR(Ilastscream, SV *)
84 PERLVAR(Ireplgv, GV *)
86 /* shortcuts to misc objects */
89 /* shortcuts to debugging objects */
91 PERLVAR(IDBline, GV *)
93 PERLVAR(IDBsingle, SV *)
94 PERLVAR(IDBtrace, SV *)
95 PERLVAR(IDBsignal, SV *)
96 PERLVAR(Ilineary, AV *) /* lines of script for debugger */
97 PERLVAR(Idbargs, AV *) /* args to call listed by caller function */
100 PERLVAR(Idebstash, HV *) /* symbol table for perldb package */
101 PERLVAR(Iglobalstash, HV *) /* global keyword overrides imported here */
102 PERLVAR(Icurstname, SV *) /* name of current package */
103 PERLVAR(Ibeginav, AV *) /* names of BEGIN subroutines */
104 PERLVAR(Iendav, AV *) /* names of END subroutines */
105 PERLVAR(Iinitav, AV *) /* names of INIT subroutines */
106 PERLVAR(Istrtab, HV *) /* shared string table */
107 PERLVARI(Isub_generation,U32,1) /* incr to invalidate method cache */
109 /* memory management */
110 PERLVAR(Isv_count, I32) /* how many SV* are currently allocated */
111 PERLVAR(Isv_objcount, I32) /* how many objects are currently allocated */
112 PERLVAR(Isv_root, SV*) /* storage for SVs belonging to interp */
113 PERLVAR(Isv_arenaroot, SV*) /* list of areas for garbage collection */
115 /* funky return mechanisms */
116 PERLVAR(Ilastspbase, I32)
117 PERLVAR(Ilastsize, I32)
118 PERLVAR(Iforkprocess, int) /* so do_open |- can return proc# */
120 /* subprocess state */
121 PERLVAR(Ifdpid, AV *) /* keep fd-to-pid mappings for my_popen */
124 PERLVAR(Itainting, bool) /* doing taint checks */
125 PERLVARI(Iop_mask, char *, NULL) /* masked operations for safe evals */
126 PERLVAR(Ilast_proto, char *) /* Prototype of last sub seen. */
129 PERLVAR(Idlevel, I32)
130 PERLVARI(Idlmax, I32, 128)
131 PERLVAR(Idebname, char *)
132 PERLVAR(Idebdelim, char *)
134 /* current interpreter roots */
135 PERLVAR(Imain_cv, CV *)
136 PERLVAR(Imain_root, OP *)
137 PERLVAR(Imain_start, OP *)
138 PERLVAR(Ieval_root, OP *)
139 PERLVAR(Ieval_start, OP *)
141 /* runtime control stuff */
142 PERLVARI(Icurcopdb, COP *, NULL)
143 PERLVARI(Icopline, line_t, NOLINE)
145 /* statics moved here for shared library purposes */
146 PERLVAR(Istrchop, SV) /* return value from chop */
147 PERLVAR(Ifilemode, int) /* so nextargv() can preserve mode */
148 PERLVAR(Ilastfd, int) /* what to preserve mode on */
149 PERLVAR(Ioldname, char *) /* what to preserve mode on */
150 PERLVAR(IArgv, char **) /* stuff to free from do_aexec, vfork safe */
151 PERLVAR(ICmd, char *) /* stuff to free from do_aexec, vfork safe */
152 PERLVAR(Isortcop, OP *) /* user defined sort routine */
153 PERLVAR(Isortstash, HV *) /* which is in some package or other */
154 PERLVAR(Ifirstgv, GV *) /* $a */
155 PERLVAR(Isecondgv, GV *) /* $b */
156 PERLVAR(Imystrk, SV *) /* temp key string for do_each() */
157 PERLVAR(Idumplvl, I32) /* indentation level on syntax tree dump */
158 PERLVAR(Ioldlastpm, PMOP *) /* for saving regexp context in debugger */
159 PERLVAR(Igensym, I32) /* next symbol for getsym() to define */
160 PERLVAR(Ipreambled, bool)
161 PERLVAR(Ipreambleav, AV *)
162 PERLVARI(Ilaststatval, int, -1)
163 PERLVARI(Ilaststype, I32, OP_STAT)
164 PERLVAR(Imess_sv, SV *)
166 /* XXX shouldn't these be per-thread? --GSAR */
167 PERLVAR(Iors, char *) /* output record separator $\ */
168 PERLVAR(Iorslen, STRLEN)
169 PERLVAR(Iofmt, char *) /* output format for numbers $# */
171 /* interpreter atexit processing */
172 PERLVARI(Iexitlist, PerlExitListEntry *, NULL)
173 /* list of exit functions */
174 PERLVARI(Iexitlistlen, I32, 0) /* length of same */
175 PERLVAR(Imodglobal, HV *) /* per-interp module data */
177 /* these used to be in global before 5.004_68 */
178 PERLVARI(Iprofiledata, U32 *, NULL) /* table of ops, counts */
179 PERLVARI(Irsfp, PerlIO * VOL, Nullfp) /* current source file pointer */
180 PERLVARI(Irsfp_filters, AV *, Nullav) /* keeps active source filters */
182 PERLVAR(Icompiling, COP) /* compiling/done executing marker */
184 PERLVAR(Icompcv, CV *) /* currently compiling subroutine */
185 PERLVAR(Icomppad, AV *) /* storage for lexically scoped temporaries */
186 PERLVAR(Icomppad_name, AV *) /* variable names for "my" variables */
187 PERLVAR(Icomppad_name_fill, I32) /* last "introduced" variable offset */
188 PERLVAR(Icomppad_name_floor, I32) /* start of vars in innermost block */
190 #ifdef HAVE_INTERP_INTERN
191 PERLVAR(Isys_intern, struct interp_intern)
192 /* platform internals */
195 /* more statics moved here */
196 PERLVARI(Igeneration, int, 100) /* from op.c */
197 PERLVAR(IDBcv, CV *) /* from perl.c */
198 PERLVAR(Iarchpat_auto, char*) /* from perl.c */
199 PERLVAR(Isortcxix, I32) /* from pp_ctl.c */
200 PERLVAR(Ilastgotoprobe, OP*) /* from pp_ctl.c */
201 PERLVAR(Iregdummy, regnode) /* from regcomp.c */
202 PERLVAR(Iregcomp_parse, char*) /* Input-scan pointer. */
203 PERLVAR(Iregxend, char*) /* End of input for compile */
204 PERLVAR(Iregcode, regnode*) /* Code-emit pointer; ®dummy = don't */
205 PERLVAR(Iregnaughty, I32) /* How bad is this pattern? */
206 PERLVAR(Iregsawback, I32) /* Did we see \1, ...? */
208 /* This guys appear both in regcomp.c and regexec.c, */
209 PERLVAR(Iregprecomp, char *) /* uncompiled string. */
210 PERLVAR(Iregnpar, I32) /* () count. */
211 PERLVAR(Iregsize, I32) /* Code size. */
212 PERLVAR(Iregflags, U16) /* are we folding, multilining? */
214 PERLVAR(Iregseen, U32) /* from regcomp.c */
215 PERLVAR(Iseen_zerolen, I32) /* from regcomp.c */
216 PERLVAR(Iregcomp_rx, regexp *) /* from regcomp.c */
217 PERLVAR(Iextralen, I32) /* from regcomp.c */
218 PERLVAR(Icolorset, int) /* from regcomp.c */
219 PERLVAR(Icolors[4], char *) /* from regcomp.c */
221 PERLVAR(Ireginput, char *) /* String-input pointer. */
222 PERLVAR(Iregbol, char *) /* Beginning of input, for ^ check. */
223 PERLVAR(Iregeol, char *) /* End of input, for $ check. */
224 PERLVAR(Iregstartp, char **) /* Pointer to startp array. */
225 PERLVAR(Iregendp, char **) /* Ditto for endp. */
226 PERLVAR(Ireglastparen, U32 *) /* Similarly for lastparen. */
227 PERLVAR(Iregtill, char *) /* How far we are required to go. */
228 PERLVAR(Iregprev, char) /* char before regbol, \n if none */
230 PERLVAR(Ireg_start_tmp, char **) /* from regexec.c */
231 PERLVAR(Ireg_start_tmpl,U32) /* from regexec.c */
232 PERLVAR(Iregdata, struct reg_data *)
233 /* from regexec.c renamed was data */
234 PERLVAR(Ibostr, char *) /* from regexec.c */
235 PERLVAR(Ireg_flags, U32) /* from regexec.c */
236 PERLVAR(Ireg_eval_set, I32) /* from regexec.c */
238 PERLVAR(Iregnarrate, I32) /* from regexec.c */
239 PERLVAR(Iregprogram, regnode *) /* from regexec.c */
240 PERLVARI(Iregindent, int, 0) /* from regexec.c */
242 PERLVAR(Iregcc, CURCUR *) /* from regexec.c */
243 PERLVARI(Iin_clean_objs,bool, FALSE) /* from sv.c */
244 PERLVARI(Iin_clean_all, bool, FALSE) /* from sv.c */
246 PERLVAR(Ilinestart, char *) /* beg. of most recently read line */
247 PERLVAR(Ipending_ident, char) /* pending identifier lookup */
248 PERLVAR(Isublex_info, SUBLEXINFO) /* from toke.c */
251 PERLVAR(Ithrsv, SV *) /* struct perl_thread for main thread */
252 PERLVARI(Ithreadnum, U32, 0) /* incremented each thread creation */
253 #endif /* USE_THREADS */
256 PERLVARI(piMem, IPerlMem*, NULL)
257 PERLVARI(piENV, IPerlEnv*, NULL)
258 PERLVARI(piStdIO, IPerlStdIO*, NULL)
259 PERLVARI(piLIO, IPerlLIO*, NULL)
260 PERLVARI(piDir, IPerlDir*, NULL)
261 PERLVARI(piSock, IPerlSock*, NULL)
262 PERLVARI(piProc, IPerlProc*, NULL)