📄 intrpvar.h
字号:
/* intrpvar.h * * Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, * 2006, 2007 * by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. * *//*=head1 Per-Interpreter Variables*//* These variables are per-interpreter in threaded/multiplicity builds, * global otherwise. * Don't forget to re-run embed.pl to propagate changes! *//* New variables must be added to the very end for binary compatibility. * XSUB.h provides wrapper functions via perlapi.h that make this * irrelevant, but not all code may be expected to #include XSUB.h. *//* Don't forget to add your variable also to perl_clone()! *//* The 'I' prefix is only needed for vars that need appropriate #defines * generated when built with or without MULTIPLICITY. It is also used * to generate the appropriate export list for win32. * * When building without MULTIPLICITY, these variables will be truly global. * * Important ones in the first cache line (if alignment is done right) */PERLVAR(Istack_sp, SV **) /* top of the stack */#ifdef OP_IN_REGISTERPERLVAR(Iopsave, OP *)#elsePERLVAR(Iop, OP *) /* currently executing op */#endifPERLVAR(Icurpad, SV **) /* active pad (lexicals+tmps) */PERLVAR(Istack_base, SV **)PERLVAR(Istack_max, SV **)PERLVAR(Iscopestack, I32 *) /* scopes we've ENTERed */PERLVAR(Iscopestack_ix, I32)PERLVAR(Iscopestack_max,I32)PERLVAR(Isavestack, ANY *) /* items that need to be restored when LEAVEing scopes we've ENTERed */PERLVAR(Isavestack_ix, I32)PERLVAR(Isavestack_max, I32)PERLVAR(Itmps_stack, SV **) /* mortals we've made */PERLVARI(Itmps_ix, I32, -1)PERLVARI(Itmps_floor, I32, -1)PERLVAR(Itmps_max, I32)PERLVAR(Imodcount, I32) /* how much mod()ification in assignment? */PERLVAR(Imarkstack, I32 *) /* stack_sp locations we're remembering */PERLVAR(Imarkstack_ptr, I32 *)PERLVAR(Imarkstack_max, I32 *)PERLVAR(ISv, SV *) /* used to hold temporary values */PERLVAR(IXpv, XPV *) /* used to hold temporary values *//*=for apidoc Amn|STRLEN|PL_naA convenience variable which is typically used with C<SvPV> when onedoesn't care about the length of the string. It is usually more efficientto either declare a local variable and use that instead or to use theC<SvPV_nolen> macro.=cut*/PERLVAR(Ina, STRLEN) /* for use in SvPV when length is Not Applicable *//* stat stuff */PERLVAR(Istatbuf, Stat_t)PERLVAR(Istatcache, Stat_t) /* _ */PERLVAR(Istatgv, GV *)PERLVARI(Istatname, SV *, NULL)#ifdef HAS_TIMESPERLVAR(Itimesbuf, struct tms)#endif/* Fields used by magic variables such as $@, $/ and so on */PERLVAR(Icurpm, PMOP *) /* what to do \ interps in REs from *//*=for apidoc mn|SV*|PL_rsThe input record separator - C<$/> in Perl space.=for apidoc mn|GV*|PL_last_in_gvThe GV which was last used for a filehandle input operation. (C<< <FH> >>)=for apidoc mn|SV*|PL_ofs_svThe output field separator - C<$,> in Perl space.=cut*/PERLVAR(Irs, SV *) /* input record separator $/ */PERLVAR(Ilast_in_gv, GV *) /* GV used in last <FH> */PERLVAR(Iofs_sv, SV *) /* output field separator $, */PERLVAR(Idefoutgv, GV *) /* default FH for output */PERLVARI(Ichopset, const char *, " \n-") /* $: */PERLVAR(Iformtarget, SV *)PERLVAR(Ibodytarget, SV *)PERLVAR(Itoptarget, SV *)/* Stashes */PERLVAR(Idefstash, HV *) /* main symbol table */PERLVAR(Icurstash, HV *) /* symbol table for current package */PERLVAR(Irestartop, OP *) /* propagating an error from croak? */PERLVAR(Icurcop, COP * VOL)PERLVAR(Icurstack, AV *) /* THE STACK */PERLVAR(Icurstackinfo, PERL_SI *) /* current stack + context */PERLVAR(Imainstack, AV *) /* the stack when nothing funny is happening */PERLVAR(Itop_env, JMPENV *) /* ptr to current sigjmp environment */PERLVAR(Istart_env, JMPENV) /* empty startup sigjmp environment */PERLVARI(Ierrors, SV *, NULL) /* outstanding queued errors *//* statics "owned" by various functions */PERLVAR(Ihv_fetch_ent_mh, HE*) /* owned by hv_fetch_ent() */PERLVAR(Ilastgotoprobe, OP*) /* from pp_ctl.c *//* sort stuff */PERLVAR(Isortcop, OP *) /* user defined sort routine */PERLVAR(Isortstash, HV *) /* which is in some package or other */PERLVAR(Ifirstgv, GV *) /* $a */PERLVAR(Isecondgv, GV *) /* $b *//* float buffer */PERLVAR(Iefloatbuf, char *)PERLVAR(Iefloatsize, STRLEN)/* regex stuff */PERLVAR(Iscreamfirst, I32 *)PERLVAR(Iscreamnext, I32 *)PERLVAR(Ilastscream, SV *)PERLVAR(Ireg_state, struct re_save_state)PERLVAR(Iregdummy, regnode) /* from regcomp.c */PERLVARI(Idumpindent, U16, 4) /* number of blanks per dump indentation level */PERLVAR(Iutf8locale, bool) /* utf8 locale detected */PERLVARI(Irehash_seed_set, bool, FALSE) /* 582 hash initialized? */PERLVARA(Icolors,6, char *) /* from regcomp.c */PERLVARI(Ipeepp, peep_t, MEMBER_TO_FPTR(Perl_peep)) /* Pointer to peephole optimizer */PERLVARI(Imaxscream, I32, -1)PERLVARI(Ireginterp_cnt,I32, 0) /* Whether "Regexp" was interpolated. */PERLVARI(Iwatchaddr, char **, 0)PERLVAR(Iwatchok, char *)/* the currently active slab in a chain of slabs of regmatch states, * and the currently active state within that slab */PERLVARI(Iregmatch_slab, regmatch_slab *, NULL)PERLVAR(Iregmatch_state, regmatch_state *)/* Put anything new that is pointer aligned here. */PERLVAR(Idelaymagic, U16) /* ($<,$>) = ... */PERLVAR(Ilocalizing, U8) /* are we processing a local() list? */PERLVAR(Icolorset, bool) /* from regcomp.c */PERLVARI(Idirty, bool, FALSE) /* in the middle of tearing things down? */PERLVAR(Iin_eval, VOL U8) /* trap "fatal" errors? */PERLVAR(Itainted, bool) /* using variables controlled by $< *//* This value may be set when embedding for full cleanup *//* 0=none, 1=full, 2=full with checks *//* mod_perl is special, and also assigns a meaning -1 */PERLVARI(Iperl_destruct_level, signed char, 0)PERLVAR(Iperldb, U32)/* pseudo environmental stuff */PERLVAR(Iorigargc, int)PERLVAR(Iorigargv, char **)PERLVAR(Ienvgv, GV *)PERLVAR(Iincgv, GV *)PERLVAR(Ihintgv, GV *)PERLVAR(Iorigfilename, char *)PERLVAR(Idiehook, SV *)PERLVAR(Iwarnhook, SV *)/* switches */PERLVAR(Ipatchlevel, SV *)PERLVAR(Ilocalpatches, const char * const *)PERLVARI(Isplitstr, const char *, " ")PERLVAR(Iminus_c, bool)PERLVAR(Ipreprocess, bool)PERLVAR(Iminus_n, bool)PERLVAR(Iminus_p, bool)PERLVAR(Iminus_l, bool)PERLVAR(Iminus_a, bool)PERLVAR(Iminus_F, bool)PERLVAR(Idoswitches, bool)PERLVAR(Iminus_E, bool)/*=for apidoc mn|bool|PL_dowarnThe C variable which corresponds to Perl's $^W warning variable.=cut*/PERLVAR(Idowarn, U8)PERLVAR(Idoextract, bool)PERLVAR(Isawampersand, bool) /* must save all match strings */PERLVAR(Iunsafe, bool)PERLVAR(Iexit_flags, U8) /* was exit() unexpected, etc. */PERLVAR(Isrand_called, bool)/* Part of internal state, but makes the 16th 1 byte variable in a row. */PERLVAR(Itainting, bool) /* doing taint checks */PERLVAR(Iinplace, char *)PERLVAR(Ie_script, SV *)/* magical thingies */PERLVAR(Ibasetime, Time_t) /* $^T */PERLVAR(Iformfeed, SV *) /* $^L */PERLVARI(Imaxsysfd, I32, MAXSYSFD) /* top fd to pass to subprocesses */PERLVAR(Istatusvalue, I32) /* $? */#ifdef VMSPERLVAR(Istatusvalue_vms,U32)#elsePERLVAR(Istatusvalue_posix,I32)#endifPERLVARI(Isig_pending, int,0) /* Number if highest signal pending */PERLVAR(Ipsig_pend, int *) /* per-signal "count" of pending *//* shortcuts to various I/O objects */PERLVAR(Istdingv, GV *)PERLVAR(Istderrgv, GV *)PERLVAR(Idefgv, GV *)PERLVAR(Iargvgv, GV *)PERLVAR(Iargvoutgv, GV *)PERLVAR(Iargvout_stack, AV *)/* shortcuts to regexp stuff */PERLVAR(Ireplgv, GV *)/* shortcuts to misc objects */PERLVAR(Ierrgv, GV *)/* shortcuts to debugging objects */PERLVAR(IDBgv, GV *)PERLVAR(IDBline, GV *)/*=for apidoc mn|GV *|PL_DBsubWhen Perl is run in debugging mode, with the B<-d> switch, this GV containsthe SV which holds the name of the sub being debugged. This is the Cvariable which corresponds to Perl's $DB::sub variable. SeeC<PL_DBsingle>.=for apidoc mn|SV *|PL_DBsingleWhen Perl is run in debugging mode, with the B<-d> switch, this SV is aboolean which indicates whether subs are being single-stepped.Single-stepping is automatically turned on after every step. This is the Cvariable which corresponds to Perl's $DB::single variable. SeeC<PL_DBsub>.=for apidoc mn|SV *|PL_DBtraceTrace variable used when Perl is run in debugging mode, with the B<-d>switch. This is the C variable which corresponds to Perl's $DB::tracevariable. See C<PL_DBsingle>.=cut*/PERLVAR(IDBsub, GV *)PERLVAR(IDBsingle, SV *)PERLVAR(IDBtrace, SV *)PERLVAR(IDBsignal, SV *)PERLVAR(Idbargs, AV *) /* args to call listed by caller function *//* symbol tables */PERLVAR(Idebstash, HV *) /* symbol table for perldb package */PERLVAR(Iglobalstash, HV *) /* global keyword overrides imported here */PERLVAR(Icurstname, SV *) /* name of current package */PERLVAR(Ibeginav, AV *) /* names of BEGIN subroutines */PERLVAR(Iendav, AV *) /* names of END subroutines */PERLVAR(Iunitcheckav, AV *) /* names of UNITCHECK subroutines */PERLVAR(Icheckav, AV *) /* names of CHECK subroutines */PERLVAR(Iinitav, AV *) /* names of INIT subroutines */PERLVAR(Istrtab, HV *) /* shared string table */PERLVARI(Isub_generation,U32,1) /* incr to invalidate method cache *//* funky return mechanisms */PERLVAR(Iforkprocess, int) /* so do_open |- can return proc# *//* memory management */PERLVAR(Isv_count, I32) /* how many SV* are currently allocated */PERLVAR(Isv_objcount, I32) /* how many objects are currently allocated */PERLVAR(Isv_root, SV*) /* storage for SVs belonging to interp */PERLVAR(Isv_arenaroot, SV*) /* list of areas for garbage collection *//* subprocess state */PERLVAR(Ifdpid, AV *) /* keep fd-to-pid mappings for my_popen *//* internal state */PERLVARI(Iop_mask, char *, NULL) /* masked operations for safe evals *//* current interpreter roots */PERLVAR(Imain_cv, CV *)PERLVAR(Imain_root, OP *)PERLVAR(Imain_start, OP *)PERLVAR(Ieval_root, OP *)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -