++ed by:
ABRAXXA ADAMJS ALEXBIO ANDREFS ARJONES

117 PAUSE user(s)
93 non-PAUSE user(s).

Ricardo SIGNES

Per-Interpreter Variables */

/* These variables are per-interpreter in threaded/multiplicity builds, * global otherwise.

 * Don't forget to re-run regen/embed.pl to propagate changes! */

/* New variables must be added to the very end for binary compatibility. */

/* Don't forget to add your variable also to perl_clone()! (in sv.c) */

/* 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. If the variable * needs to be initialized, use PERLVARI. * * When building without MULTIPLICITY, these variables will be truly global. * * Important ones in the first cache line (if alignment is done right) */

PERLVAR(I, stack_sp, SV **) /* top of the stack */ #ifdef OP_IN_REGISTER PERLVAR(I, opsave, OP *) #else PERLVAR(I, op, OP *) /* currently executing op */ #endif PERLVAR(I, curpad, SV **) /* active pad (lexicals+tmps) */

PERLVAR(I, stack_base, SV **) PERLVAR(I, stack_max, SV **)

PERLVAR(I, savestack, ANY *) /* items that need to be restored when LEAVEing scopes we've ENTERed */ PERLVAR(I, savestack_ix, I32) PERLVAR(I, savestack_max, I32)

PERLVAR(I, scopestack, I32 *) /* scopes we've ENTERed */ PERLVAR(I, scopestack_ix, I32) PERLVAR(I, scopestack_max, I32)

PERLVAR(I, tmps_stack, SV **) /* mortals we've made */ PERLVARI(I, tmps_ix, I32, -1) PERLVARI(I, tmps_floor, I32, -1) PERLVAR(I, tmps_max, I32)

PERLVARI(I, sub_generation, U32, 1) /* incr to invalidate method cache */

PERLVAR(I, markstack, I32 *) /* stack_sp locations we're remembering */ PERLVAR(I, markstack_ptr, I32 *) PERLVAR(I, markstack_max, I32 *)

#ifdef PERL_HASH_RANDOMIZE_KEYS #ifdef USE_PERL_PERTURB_KEYS PERLVARI(I, hash_rand_bits_enabled, U8, 1) /* used to randomize hash stuff 0 == no-random, 1 == random, 2 == determinsitic */ #endif PERLVARI(I, hash_rand_bits, UV, 0) /* used to randomize hash stuff */ #endif PERLVAR(I, strtab, HV *) /* shared string table */

/* Fields used by magic variables such as $@, $/ and so on */ PERLVAR(I, curpm, PMOP *) /* what to do \ interps in REs from */

PERLVAR(I, tainting, bool) /* doing taint checks */ PERLVAR(I, tainted, bool) /* using variables controlled by $< */ PERLVAR(I, delaymagic, U16) /* ($<,$>) = ... */ PERLVAR(I, localizing, U8) /* are we processing a local() list? */ PERLVAR(I, in_eval, U8) /* trap "fatal" errors? */ /*

The C variable which corresponds to Perl's $^W warning variable.

A convenience variable which is typically used with SvPV when one doesn't care about the length of the string. It is usually more efficient to either declare a local variable and use that instead or to use the SvPV_nolen macro.

The input record separator - $/ in Perl space.

The GV which was last used for a filehandle input operation. (<FH>)

The glob containing the output field separator - *, in Perl space.

Pointer to the per-subroutine peephole optimiser. This is a function that gets called at the end of compilation of a Perl subroutine (or equivalently independent piece of Perl code) to perform fixups of some ops and to perform small-scale optimisations. The function is called once for each subroutine that is compiled, and is passed, as sole parameter, a pointer to the op that is the entry point to the subroutine. It modifies the op tree in place.

The peephole optimiser should never be completely replaced. Rather, add code to it by wrapping the existing optimiser. The basic way to do this can be seen in "Compile pass 3: peephole optimization" in perlguts. If the new code wishes to operate on ops throughout the subroutine's structure, rather than just at the top level, it is likely to be more convenient to wrap the "PL_rpeepp" hook.

Pointer to the recursive peephole optimiser. This is a function that gets called at the end of compilation of a Perl subroutine (or equivalently independent piece of Perl code) to perform fixups of some ops and to perform small-scale optimisations. The function is called once for each chain of ops linked through their op_next fields; it is recursively called to handle each side chain. It is passed, as sole parameter, a pointer to the op that is at the head of the chain. It modifies the op tree in place.

The peephole optimiser should never be completely replaced. Rather, add code to it by wrapping the existing optimiser. The basic way to do this can be seen in "Compile pass 3: peephole optimization" in perlguts. If the new code wishes to operate only on ops at a subroutine's top level, rather than throughout the structure, it is likely to be more convenient to wrap the "PL_peepp" hook.

When non-NULL, the function pointed by this variable will be called each time an OP is freed with the corresponding OP as the argument. This allows extensions to free any extra attribute they have locally attached to an OP. It is also assured to first fire for the parent OP and then for its kids.

When you replace this variable, it is considered a good practice to store the possibly previously installed hook and that you recall it inside your own.

PL_modglobal is a general purpose, interpreter global HV for use by extensions that need to keep information on a per-interpreter basis. In a pinch, it can also be used as a symbol table for extensions to share data among each other. It is a good idea to use keys prefixed by the package name of the extension that owns the data.




Hosting generously
sponsored by Bytemark