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