#define PL_bufend (PERL_GET_INTERP->Ibufend)
#define PL_bufptr (PERL_GET_INTERP->Ibufptr)
#define PL_checkav (PERL_GET_INTERP->Icheckav)
+#define PL_checkav_save (PERL_GET_INTERP->Icheckav_save)
#define PL_collation_ix (PERL_GET_INTERP->Icollation_ix)
#define PL_collation_name (PERL_GET_INTERP->Icollation_name)
#define PL_collation_standard (PERL_GET_INTERP->Icollation_standard)
#define PL_bufend (vTHX->Ibufend)
#define PL_bufptr (vTHX->Ibufptr)
#define PL_checkav (vTHX->Icheckav)
+#define PL_checkav_save (vTHX->Icheckav_save)
#define PL_collation_ix (vTHX->Icollation_ix)
#define PL_collation_name (vTHX->Icollation_name)
#define PL_collation_standard (vTHX->Icollation_standard)
#define PL_Ibufend PL_bufend
#define PL_Ibufptr PL_bufptr
#define PL_Icheckav PL_checkav
+#define PL_Icheckav_save PL_checkav_save
#define PL_Icollation_ix PL_collation_ix
#define PL_Icollation_name PL_collation_name
#define PL_Icollation_standard PL_collation_standard
amagic_generation perlstring
walkoptree_slow walkoptree walkoptree_exec walksymtable
parents comppadlist sv_undef compile_stats timing_info
- begin_av init_av end_av regex_padav);
+ begin_av init_av check_av end_av regex_padav);
sub OPf_KIDS ();
use strict;
Returns the AV object (i.e. in class B::AV) representing INIT blocks.
+=item check_av
+
+Returns the AV object (i.e. in class B::AV) representing CHECK blocks.
+
=item begin_av
Returns the AV object (i.e. in class B::AV) representing BEGIN blocks.
#define B_main_cv() PL_main_cv
#define B_init_av() PL_initav
+#define B_check_av() PL_checkav_save
#define B_begin_av() PL_beginav_save
#define B_end_av() PL_endav
#define B_main_root() PL_main_root
B_init_av()
B::AV
+B_check_av()
+
+B::AV
B_begin_av()
B::AV
print qq(BEGIN { \$/ = $fs; \$\\ = $bs; }\n);
}
my @BEGINs = B::begin_av->isa("B::AV") ? B::begin_av->ARRAY : ();
+ my @CHECKs = B::check_av->isa("B::AV") ? B::check_av->ARRAY : ();
my @INITs = B::init_av->isa("B::AV") ? B::init_av->ARRAY : ();
my @ENDs = B::end_av->isa("B::AV") ? B::end_av->ARRAY : ();
- for my $block (@BEGINs, @INITs, @ENDs) {
+ for my $block (@BEGINs, @CHECKs, @INITs, @ENDs) {
$self->todo($block, 0);
}
$self->stash_subs();
PERLVAR(Isort_RealCmp, SVCOMPARE_t)
+PERLVARI(Icheckav_save, AV*, Nullav) /* save CHECK{}s when compiling */
+
/* 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. */
-
SvREFCNT_dec(PL_beginav_save);
SvREFCNT_dec(PL_endav);
SvREFCNT_dec(PL_checkav);
+ SvREFCNT_dec(PL_checkav_save);
SvREFCNT_dec(PL_initav);
PL_beginav = Nullav;
PL_beginav_save = Nullav;
PL_endav = Nullav;
PL_checkav = Nullav;
+ PL_checkav_save = Nullav;
PL_initav = Nullav;
/* shortcuts just get cleared */
while (AvFILL(paramList) >= 0) {
cv = (CV*)av_shift(paramList);
- if (PL_savebegin && (paramList == PL_beginav)) {
+ if (PL_savebegin) {
+ if (paramList == PL_beginav) {
/* save PL_beginav for compiler */
- if (! PL_beginav_save)
- PL_beginav_save = newAV();
- av_push(PL_beginav_save, (SV*)cv);
+ if (! PL_beginav_save)
+ PL_beginav_save = newAV();
+ av_push(PL_beginav_save, (SV*)cv);
+ }
+ else if (paramList == PL_checkav) {
+ /* save PL_checkav for compiler */
+ if (! PL_checkav_save)
+ PL_checkav_save = newAV();
+ av_push(PL_checkav_save, (SV*)cv);
+ }
} else {
SAVEFREESV(cv);
}
#define PL_bufptr (*Perl_Ibufptr_ptr(aTHX))
#undef PL_checkav
#define PL_checkav (*Perl_Icheckav_ptr(aTHX))
+#undef PL_checkav_save
+#define PL_checkav_save (*Perl_Icheckav_save_ptr(aTHX))
#undef PL_collation_ix
#define PL_collation_ix (*Perl_Icollation_ix_ptr(aTHX))
#undef PL_collation_name
PL_beginav = av_dup_inc(proto_perl->Ibeginav, param);
PL_beginav_save = av_dup_inc(proto_perl->Ibeginav_save, param);
+ PL_checkav_save = av_dup_inc(proto_perl->Icheckav_save, param);
PL_endav = av_dup_inc(proto_perl->Iendav, param);
PL_checkav = av_dup_inc(proto_perl->Icheckav, param);
PL_initav = av_dup_inc(proto_perl->Iinitav, param);