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 | |
49f531da |
66 | /* shortcuts to various I/O objects */ |
cb68f92d |
67 | PERLVAR(Istdingv, GV *) |
68 | PERLVAR(Idefgv, GV *) |
69 | PERLVAR(Iargvgv, GV *) |
70 | PERLVAR(Iargvoutgv, GV *) |
49f531da |
71 | |
72 | /* shortcuts to regexp stuff */ |
5c0ca799 |
73 | /* XXX these three aren't used anywhere */ |
cb68f92d |
74 | PERLVAR(Ileftgv, GV *) |
75 | PERLVAR(Iampergv, GV *) |
76 | PERLVAR(Irightgv, GV *) |
5c0ca799 |
77 | |
78 | /* this one needs to be moved to thrdvar.h and accessed via |
79 | * find_threadsv() when USE_THREADS */ |
cb68f92d |
80 | PERLVAR(Ireplgv, GV *) |
49f531da |
81 | |
82 | /* shortcuts to misc objects */ |
cb68f92d |
83 | PERLVAR(Ierrgv, GV *) |
49f531da |
84 | |
85 | /* shortcuts to debugging objects */ |
cb68f92d |
86 | PERLVAR(IDBgv, GV *) |
87 | PERLVAR(IDBline, GV *) |
88 | PERLVAR(IDBsub, GV *) |
89 | PERLVAR(IDBsingle, SV *) |
90 | PERLVAR(IDBtrace, SV *) |
91 | PERLVAR(IDBsignal, SV *) |
49f531da |
92 | PERLVAR(Ilineary, AV *) /* lines of script for debugger */ |
93 | PERLVAR(Idbargs, AV *) /* args to call listed by caller function */ |
94 | |
95 | /* symbol tables */ |
49f531da |
96 | PERLVAR(Idebstash, HV *) /* symbol table for perldb package */ |
97 | PERLVAR(Iglobalstash, HV *) /* global keyword overrides imported here */ |
98 | PERLVAR(Icurstname, SV *) /* name of current package */ |
99 | PERLVAR(Ibeginav, AV *) /* names of BEGIN subroutines */ |
d4cce5f1 |
100 | PERLVAR(Iendav, AV *) /* names of END subroutines */ |
49f531da |
101 | PERLVAR(Iinitav, AV *) /* names of INIT subroutines */ |
102 | PERLVAR(Istrtab, HV *) /* shared string table */ |
005a453c |
103 | PERLVARI(Isub_generation,U32,1) /* incr to invalidate method cache */ |
49f531da |
104 | |
105 | /* memory management */ |
49f531da |
106 | PERLVAR(Isv_count, I32) /* how many SV* are currently allocated */ |
107 | PERLVAR(Isv_objcount, I32) /* how many objects are currently allocated */ |
108 | PERLVAR(Isv_root, SV*) /* storage for SVs belonging to interp */ |
109 | PERLVAR(Isv_arenaroot, SV*) /* list of areas for garbage collection */ |
110 | |
111 | /* funky return mechanisms */ |
cb68f92d |
112 | PERLVAR(Ilastspbase, I32) |
113 | PERLVAR(Ilastsize, I32) |
49f531da |
114 | PERLVAR(Iforkprocess, int) /* so do_open |- can return proc# */ |
115 | |
116 | /* subprocess state */ |
d4cce5f1 |
117 | PERLVAR(Ifdpid, AV *) /* keep fd-to-pid mappings for my_popen */ |
49f531da |
118 | |
119 | /* internal state */ |
49f531da |
120 | PERLVAR(Itainting, bool) /* doing taint checks */ |
121 | PERLVARI(Iop_mask, char *, NULL) /* masked operations for safe evals */ |
2a841d13 |
122 | PERLVAR(Ilast_proto, char *) /* Prototype of last sub seen. */ |
49f531da |
123 | |
124 | /* trace state */ |
cb68f92d |
125 | PERLVAR(Idlevel, I32) |
126 | PERLVARI(Idlmax, I32, 128) |
127 | PERLVAR(Idebname, char *) |
128 | PERLVAR(Idebdelim, char *) |
49f531da |
129 | |
130 | /* current interpreter roots */ |
cb68f92d |
131 | PERLVAR(Imain_cv, CV *) |
132 | PERLVAR(Imain_root, OP *) |
133 | PERLVAR(Imain_start, OP *) |
134 | PERLVAR(Ieval_root, OP *) |
135 | PERLVAR(Ieval_start, OP *) |
49f531da |
136 | |
137 | /* runtime control stuff */ |
cb68f92d |
138 | PERLVARI(Icurcopdb, COP *, NULL) |
139 | PERLVARI(Icopline, line_t, NOLINE) |
49f531da |
140 | |
141 | /* statics moved here for shared library purposes */ |
142 | PERLVAR(Istrchop, SV) /* return value from chop */ |
143 | PERLVAR(Ifilemode, int) /* so nextargv() can preserve mode */ |
144 | PERLVAR(Ilastfd, int) /* what to preserve mode on */ |
145 | PERLVAR(Ioldname, char *) /* what to preserve mode on */ |
d4cce5f1 |
146 | PERLVAR(IArgv, char **) /* stuff to free from do_aexec, vfork safe */ |
147 | PERLVAR(ICmd, char *) /* stuff to free from do_aexec, vfork safe */ |
49f531da |
148 | PERLVAR(Imystrk, SV *) /* temp key string for do_each() */ |
149 | PERLVAR(Idumplvl, I32) /* indentation level on syntax tree dump */ |
cb68f92d |
150 | PERLVAR(Ioldlastpm, PMOP *) /* for saving regexp context in debugger */ |
49f531da |
151 | PERLVAR(Igensym, I32) /* next symbol for getsym() to define */ |
cb68f92d |
152 | PERLVAR(Ipreambled, bool) |
153 | PERLVAR(Ipreambleav, AV *) |
154 | PERLVARI(Ilaststatval, int, -1) |
155 | PERLVARI(Ilaststype, I32, OP_STAT) |
156 | PERLVAR(Imess_sv, SV *) |
49f531da |
157 | |
cb68f92d |
158 | /* XXX shouldn't these be per-thread? --GSAR */ |
159 | PERLVAR(Iors, char *) /* output record separator $\ */ |
160 | PERLVAR(Iorslen, STRLEN) |
161 | PERLVAR(Iofmt, char *) /* output format for numbers $# */ |
d4cce5f1 |
162 | |
4b556e6c |
163 | /* interpreter atexit processing */ |
cb68f92d |
164 | PERLVARI(Iexitlist, PerlExitListEntry *, NULL) |
165 | /* list of exit functions */ |
166 | PERLVARI(Iexitlistlen, I32, 0) /* length of same */ |
167 | PERLVAR(Imodglobal, HV *) /* per-interp module data */ |
168 | |
169 | /* these used to be in global before 5.004_68 */ |
170 | PERLVARI(Iprofiledata, U32 *, NULL) /* table of ops, counts */ |
171 | PERLVARI(Irsfp, PerlIO * VOL, Nullfp) /* current source file pointer */ |
172 | PERLVARI(Irsfp_filters, AV *, Nullav) /* keeps active source filters */ |
173 | |
174 | PERLVAR(Icompiling, COP) /* compiling/done executing marker */ |
175 | |
176 | PERLVAR(Icompcv, CV *) /* currently compiling subroutine */ |
177 | PERLVAR(Icomppad, AV *) /* storage for lexically scoped temporaries */ |
178 | PERLVAR(Icomppad_name, AV *) /* variable names for "my" variables */ |
179 | PERLVAR(Icomppad_name_fill, I32) /* last "introduced" variable offset */ |
180 | PERLVAR(Icomppad_name_floor, I32) /* start of vars in innermost block */ |
4b556e6c |
181 | |
182 | #ifdef HAVE_INTERP_INTERN |
cb68f92d |
183 | PERLVAR(Isys_intern, struct interp_intern) |
184 | /* platform internals */ |
4b556e6c |
185 | #endif |
186 | |
7fae4e64 |
187 | /* more statics moved here */ |
7fae4e64 |
188 | PERLVARI(Igeneration, int, 100) /* from op.c */ |
189 | PERLVAR(IDBcv, CV *) /* from perl.c */ |
190 | PERLVAR(Iarchpat_auto, char*) /* from perl.c */ |
56953603 |
191 | |
cb68f92d |
192 | PERLVARI(Iin_clean_objs,bool, FALSE) /* from sv.c */ |
193 | PERLVARI(Iin_clean_all, bool, FALSE) /* from sv.c */ |
7fae4e64 |
194 | |
195 | PERLVAR(Ilinestart, char *) /* beg. of most recently read line */ |
196 | PERLVAR(Ipending_ident, char) /* pending identifier lookup */ |
197 | PERLVAR(Isublex_info, SUBLEXINFO) /* from toke.c */ |
198 | |
49f531da |
199 | #ifdef USE_THREADS |
cb68f92d |
200 | PERLVAR(Ithrsv, SV *) /* struct perl_thread for main thread */ |
940cb80d |
201 | PERLVARI(Ithreadnum, U32, 0) /* incremented each thread creation */ |
49f531da |
202 | #endif /* USE_THREADS */ |
76e3520e |
203 | |
204 | #ifdef PERL_OBJECT |
7fae4e64 |
205 | PERLVARI(piMem, IPerlMem*, NULL) |
206 | PERLVARI(piENV, IPerlEnv*, NULL) |
207 | PERLVARI(piStdIO, IPerlStdIO*, NULL) |
208 | PERLVARI(piLIO, IPerlLIO*, NULL) |
209 | PERLVARI(piDir, IPerlDir*, NULL) |
210 | PERLVARI(piSock, IPerlSock*, NULL) |
211 | PERLVARI(piProc, IPerlProc*, NULL) |
76e3520e |
212 | #endif |