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