summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/ext/B
diff options
context:
space:
mode:
authorafresh1 <afresh1@openbsd.org>2019-02-13 21:15:00 +0000
committerafresh1 <afresh1@openbsd.org>2019-02-13 21:15:00 +0000
commit9f11ffb7133c203312a01e4b986886bc88c7d74b (patch)
tree6618511204c614b20256e4ef9dea39a7b311d638 /gnu/usr.bin/perl/ext/B
parentImport perl-5.28.1 (diff)
downloadwireguard-openbsd-9f11ffb7133c203312a01e4b986886bc88c7d74b.tar.xz
wireguard-openbsd-9f11ffb7133c203312a01e4b986886bc88c7d74b.zip
Fix merge issues, remove excess files - match perl-5.28.1 dist
looking good sthen@, Great! bluhm@
Diffstat (limited to 'gnu/usr.bin/perl/ext/B')
-rw-r--r--gnu/usr.bin/perl/ext/B/B.pm117
-rw-r--r--gnu/usr.bin/perl/ext/B/B.xs367
-rw-r--r--gnu/usr.bin/perl/ext/B/B/Concise.pm250
-rw-r--r--gnu/usr.bin/perl/ext/B/t/OptreeCheck.pm47
-rw-r--r--gnu/usr.bin/perl/ext/B/t/b.t64
-rw-r--r--gnu/usr.bin/perl/ext/B/t/concise.t24
-rwxr-xr-xgnu/usr.bin/perl/ext/B/t/f_map.t32
-rwxr-xr-xgnu/usr.bin/perl/ext/B/t/f_sort.t124
-rwxr-xr-xgnu/usr.bin/perl/ext/B/t/optree_concise.t4
-rw-r--r--gnu/usr.bin/perl/ext/B/t/optree_misc.t74
-rwxr-xr-xgnu/usr.bin/perl/ext/B/t/optree_samples.t226
-rwxr-xr-xgnu/usr.bin/perl/ext/B/t/optree_specials.t700
-rwxr-xr-xgnu/usr.bin/perl/ext/B/t/optree_varinit.t4
-rw-r--r--gnu/usr.bin/perl/ext/B/t/showlex.t2
14 files changed, 988 insertions, 1047 deletions
diff --git a/gnu/usr.bin/perl/ext/B/B.pm b/gnu/usr.bin/perl/ext/B/B.pm
index 5c1e5997b83..ce061e49101 100644
--- a/gnu/usr.bin/perl/ext/B/B.pm
+++ b/gnu/usr.bin/perl/ext/B/B.pm
@@ -6,16 +6,21 @@
# License or the Artistic License, as specified in the README file.
#
package B;
-use strict;
-require Exporter;
@B::ISA = qw(Exporter);
+# If B is loaded without imports, we do not want to unnecessarily pollute the stash with Exporter.
+sub import {
+ return unless scalar @_ > 1; # Called as a method call.
+ require Exporter;
+ B->export_to_level(1, @_);
+}
+
# walkoptree_slow comes from B.pm (you are there),
# walkoptree comes from B.xs
BEGIN {
- $B::VERSION = '1.62';
+ $B::VERSION = '1.74';
@B::EXPORT_OK = ();
# Our BOOT code needs $VERSION set, and will append to @EXPORT_OK.
@@ -43,12 +48,12 @@ push @B::EXPORT_OK, (qw(minus_c ppname save_BEGINs
@B::IV::ISA = 'B::SV';
@B::NV::ISA = 'B::SV';
# RV is eliminated with 5.11.0, but effectively is a specialisation of IV now.
-@B::RV::ISA = $] >= 5.011 ? 'B::IV' : 'B::SV';
+@B::RV::ISA = 'B::IV';
@B::PVIV::ISA = qw(B::PV B::IV);
@B::PVNV::ISA = qw(B::PVIV B::NV);
@B::PVMG::ISA = 'B::PVNV';
-@B::REGEXP::ISA = 'B::PVMG' if $] >= 5.011;
-@B::INVLIST::ISA = 'B::PV' if $] >= 5.019;
+@B::REGEXP::ISA = 'B::PVMG';
+@B::INVLIST::ISA = 'B::PV';
@B::PVLV::ISA = 'B::GV';
@B::BM::ISA = 'B::GV';
@B::AV::ISA = 'B::PVMG';
@@ -74,13 +79,14 @@ push @B::EXPORT_OK, (qw(minus_c ppname save_BEGINs
@B::SPECIAL::ISA = 'B::OBJECT';
-@B::optype = qw(OP UNOP BINOP LOGOP LISTOP PMOP SVOP PADOP PVOP LOOP COP
+our @optype = qw(OP UNOP BINOP LOGOP LISTOP PMOP SVOP PADOP PVOP LOOP COP
METHOP UNOP_AUX);
# bytecode.pl contained the following comment:
# Nullsv *must* come first in the following so that the condition
# ($$sv == 0) can continue to be used to test (sv == Nullsv).
-@B::specialsv_name = qw(Nullsv &PL_sv_undef &PL_sv_yes &PL_sv_no
- (SV*)pWARN_ALL (SV*)pWARN_NONE (SV*)pWARN_STD);
+our @specialsv_name = qw(Nullsv &PL_sv_undef &PL_sv_yes &PL_sv_no
+ (SV*)pWARN_ALL (SV*)pWARN_NONE (SV*)pWARN_STD
+ &PL_sv_zero);
{
# Stop "-w" from complaining about the lack of a real B::OBJECT class
@@ -114,15 +120,17 @@ sub B::IV::int_value {
}
sub B::NULL::as_string() {""}
-*B::IV::as_string = \*B::IV::int_value;
-*B::PV::as_string = \*B::PV::PV;
+*B::IV::as_string = *B::IV::as_string = \*B::IV::int_value;
+*B::PV::as_string = *B::PV::as_string = \*B::PV::PV;
# The input typemap checking makes no distinction between different SV types,
# so the XS body will generate the same C code, despite the different XS
# "types". So there is no change in behaviour from doing "newXS" like this,
# compared with the old approach of having a (near) duplicate XS body.
# We should fix the typemap checking.
-*B::IV::RV = \*B::PV::RV if $] > 5.012;
+
+# Since perl 5.12.0
+*B::IV::RV = *B::IV::RV = \*B::PV::RV;
my $debug;
my $op_count = 0;
@@ -256,12 +264,12 @@ sub walkoptree_exec {
sub walksymtable {
my ($symref, $method, $recurse, $prefix) = @_;
my $sym;
- my $ref;
my $fullname;
no strict 'refs';
$prefix = '' unless defined $prefix;
foreach my $sym ( sort keys %$symref ) {
- $ref= $symref->{$sym};
+ my $dummy = $symref->{$sym}; # Copying the glob and incrementing
+ # the GPs refcnt clears cached methods
$fullname = "*main::".$prefix.$sym;
if ($sym =~ /::$/) {
$sym = $prefix . $sym;
@@ -541,52 +549,10 @@ give incomprehensible results, or worse.
=head2 SV-RELATED CLASSES
-B::IV, B::NV, B::RV, B::PV, B::PVIV, B::PVNV, B::PVMG, B::BM (5.9.5 and
-earlier), B::PVLV, B::AV, B::HV, B::CV, B::GV, B::FM, B::IO. These classes
+B::IV, B::NV, B::PV, B::PVIV, B::PVNV, B::PVMG,
+B::PVLV, B::AV, B::HV, B::CV, B::GV, B::FM, B::IO. These classes
correspond in the obvious way to the underlying C structures of similar names.
-The inheritance hierarchy mimics the underlying C "inheritance". For the
-5.10.x branch, (I<ie> 5.10.0, 5.10.1 I<etc>) this is:
-
- B::SV
- |
- +------------+------------+------------+
- | | | |
- B::PV B::IV B::NV B::RV
- \ / /
- \ / /
- B::PVIV /
- \ /
- \ /
- \ /
- B::PVNV
- |
- |
- B::PVMG
- |
- +-----+-----+-----+-----+
- | | | | |
- B::AV B::GV B::HV B::CV B::IO
- | |
- | |
- B::PVLV B::FM
-
-For 5.9.0 and earlier, PVLV is a direct subclass of PVMG, and BM is still
-present as a distinct type, so the base of this diagram is
-
-
- |
- |
- B::PVMG
- |
- +------+-----+-----+-----+-----+-----+
- | | | | | | |
- B::PVLV B::BM B::AV B::GV B::HV B::CV B::IO
- |
- |
- B::FM
-
-For 5.11.0 and later, B::RV is abolished, and IVs can be used to store
-references, and a new type B::REGEXP is introduced, giving this structure:
+The inheritance hierarchy mimics the underlying C "inheritance":
B::SV
|
@@ -950,17 +916,6 @@ IoIFP($io) == PerlIO_stderr().
Like C<ARRAY>, but takes an index as an argument to get only one element,
rather than a list of all of them.
-=item OFF
-
-This method is deprecated if running under Perl 5.8, and is no longer present
-if running under Perl 5.9
-
-=item AvFLAGS
-
-This method returns the AV specific
-flags. In Perl 5.9 these are now stored
-in with the main SV flags, so this method is no longer present.
-
=back
=head2 B::CV Methods
@@ -981,8 +936,7 @@ in with the main SV flags, so this method is no longer present.
=item PADLIST
-Returns a B::PADLIST object under Perl 5.18 or higher, or a B::AV in
-earlier versions.
+Returns a B::PADLIST object.
=item OUTSIDE
@@ -1020,11 +974,6 @@ Returns the name of a lexical sub, otherwise C<undef>.
=item ARRAY
-=item PMROOT
-
-This method is not present if running under Perl 5.9, as the PMROOT
-information is no longer stored directly in the hash.
-
=back
=head2 OP-RELATED CLASSES
@@ -1167,16 +1116,8 @@ op is contained within.
=item pmreplstart
-=item pmnext
-
-Only up to Perl 5.9.4
-
=item pmflags
-=item extflags
-
-Since Perl 5.9.5
-
=item precomp
=item pmoffset
@@ -1292,10 +1233,8 @@ Perl 5.22 introduced the B::PADNAMELIST and B::PADNAME classes.
=item ARRAY
-A list of pads. The first one contains the names.
-
-The first one is a B::PADNAMELIST under Perl 5.22, and a B::AV under
-earlier versions. The rest are currently B::AV objects, but that could
+A list of pads. The first one is a B::PADNAMELIST containing the names.
+The rest are currently B::AV objects, but that could
change in future versions.
=item ARRAYelt
diff --git a/gnu/usr.bin/perl/ext/B/B.xs b/gnu/usr.bin/perl/ext/B/B.xs
index b4b6a40ac53..d9d77157c67 100644
--- a/gnu/usr.bin/perl/ext/B/B.xs
+++ b/gnu/usr.bin/perl/ext/B/B.xs
@@ -39,22 +39,6 @@ static const char* const svclassnames[] = {
"B::IO",
};
-typedef enum {
- OPc_NULL, /* 0 */
- OPc_BASEOP, /* 1 */
- OPc_UNOP, /* 2 */
- OPc_BINOP, /* 3 */
- OPc_LOGOP, /* 4 */
- OPc_LISTOP, /* 5 */
- OPc_PMOP, /* 6 */
- OPc_SVOP, /* 7 */
- OPc_PADOP, /* 8 */
- OPc_PVOP, /* 9 */
- OPc_LOOP, /* 10 */
- OPc_COP, /* 11 */
- OPc_METHOP, /* 12 */
- OPc_UNOP_AUX /* 13 */
-} opclass;
static const char* const opclassnames[] = {
"B::NULL",
@@ -93,7 +77,7 @@ static const size_t opsizes[] = {
#define MY_CXT_KEY "B::_guts" XS_VERSION
typedef struct {
- SV * x_specialsv_list[7];
+ SV * x_specialsv_list[8];
int x_walkoptree_debug; /* Flag for walkoptree debug hook */
} my_cxt_t;
@@ -111,148 +95,15 @@ static void B_init_my_cxt(pTHX_ my_cxt_t * cxt) {
cxt->x_specialsv_list[4] = (SV *) pWARN_ALL;
cxt->x_specialsv_list[5] = (SV *) pWARN_NONE;
cxt->x_specialsv_list[6] = (SV *) pWARN_STD;
+ cxt->x_specialsv_list[7] = &PL_sv_zero;
}
-static opclass
-cc_opclass(pTHX_ const OP *o)
-{
- bool custom = 0;
-
- if (!o)
- return OPc_NULL;
-
- if (o->op_type == 0) {
- if (o->op_targ == OP_NEXTSTATE || o->op_targ == OP_DBSTATE)
- return OPc_COP;
- return (o->op_flags & OPf_KIDS) ? OPc_UNOP : OPc_BASEOP;
- }
-
- if (o->op_type == OP_SASSIGN)
- return ((o->op_private & OPpASSIGN_BACKWARDS) ? OPc_UNOP : OPc_BINOP);
-
- if (o->op_type == OP_AELEMFAST) {
-#ifdef USE_ITHREADS
- return OPc_PADOP;
-#else
- return OPc_SVOP;
-#endif
- }
-
-#ifdef USE_ITHREADS
- if (o->op_type == OP_GV || o->op_type == OP_GVSV ||
- o->op_type == OP_RCATLINE)
- return OPc_PADOP;
-#endif
-
- if (o->op_type == OP_CUSTOM)
- custom = 1;
-
- switch (OP_CLASS(o)) {
- case OA_BASEOP:
- return OPc_BASEOP;
-
- case OA_UNOP:
- return OPc_UNOP;
-
- case OA_BINOP:
- return OPc_BINOP;
-
- case OA_LOGOP:
- return OPc_LOGOP;
-
- case OA_LISTOP:
- return OPc_LISTOP;
-
- case OA_PMOP:
- return OPc_PMOP;
-
- case OA_SVOP:
- return OPc_SVOP;
-
- case OA_PADOP:
- return OPc_PADOP;
-
- case OA_PVOP_OR_SVOP:
- /*
- * Character translations (tr///) are usually a PVOP, keeping a
- * pointer to a table of shorts used to look up translations.
- * Under utf8, however, a simple table isn't practical; instead,
- * the OP is an SVOP (or, under threads, a PADOP),
- * and the SV is a reference to a swash
- * (i.e., an RV pointing to an HV).
- */
- return (!custom &&
- (o->op_private & (OPpTRANS_TO_UTF|OPpTRANS_FROM_UTF))
- )
-#if defined(USE_ITHREADS)
- ? OPc_PADOP : OPc_PVOP;
-#else
- ? OPc_SVOP : OPc_PVOP;
-#endif
-
- case OA_LOOP:
- return OPc_LOOP;
-
- case OA_COP:
- return OPc_COP;
-
- case OA_BASEOP_OR_UNOP:
- /*
- * UNI(OP_foo) in toke.c returns token UNI or FUNC1 depending on
- * whether parens were seen. perly.y uses OPf_SPECIAL to
- * signal whether a BASEOP had empty parens or none.
- * Some other UNOPs are created later, though, so the best
- * test is OPf_KIDS, which is set in newUNOP.
- */
- return (o->op_flags & OPf_KIDS) ? OPc_UNOP : OPc_BASEOP;
-
- case OA_FILESTATOP:
- /*
- * The file stat OPs are created via UNI(OP_foo) in toke.c but use
- * the OPf_REF flag to distinguish between OP types instead of the
- * usual OPf_SPECIAL flag. As usual, if OPf_KIDS is set, then we
- * return OPc_UNOP so that walkoptree can find our children. If
- * OPf_KIDS is not set then we check OPf_REF. Without OPf_REF set
- * (no argument to the operator) it's an OP; with OPf_REF set it's
- * an SVOP (and op_sv is the GV for the filehandle argument).
- */
- return ((o->op_flags & OPf_KIDS) ? OPc_UNOP :
-#ifdef USE_ITHREADS
- (o->op_flags & OPf_REF) ? OPc_PADOP : OPc_BASEOP);
-#else
- (o->op_flags & OPf_REF) ? OPc_SVOP : OPc_BASEOP);
-#endif
- case OA_LOOPEXOP:
- /*
- * next, last, redo, dump and goto use OPf_SPECIAL to indicate that a
- * label was omitted (in which case it's a BASEOP) or else a term was
- * seen. In this last case, all except goto are definitely PVOP but
- * goto is either a PVOP (with an ordinary constant label), an UNOP
- * with OPf_STACKED (with a non-constant non-sub) or an UNOP for
- * OP_REFGEN (with goto &sub) in which case OPf_STACKED also seems to
- * get set.
- */
- if (o->op_flags & OPf_STACKED)
- return OPc_UNOP;
- else if (o->op_flags & OPf_SPECIAL)
- return OPc_BASEOP;
- else
- return OPc_PVOP;
- case OA_METHOP:
- return OPc_METHOP;
- case OA_UNOP_AUX:
- return OPc_UNOP_AUX;
- }
- warn("can't determine class of operator %s, assuming BASEOP\n",
- OP_NAME(o));
- return OPc_BASEOP;
-}
static SV *
make_op_object(pTHX_ const OP *o)
{
SV *opsv = sv_newmortal();
- sv_setiv(newSVrv(opsv, opclassnames[cc_opclass(aTHX_ o)]), PTR2IV(o));
+ sv_setiv(newSVrv(opsv, opclassnames[op_class(o)]), PTR2IV(o));
return opsv;
}
@@ -509,7 +360,7 @@ walkoptree(pTHX_ OP *o, const char *method, SV *ref)
dSP;
OP *kid;
SV *object;
- const char *const classname = opclassnames[cc_opclass(aTHX_ o)];
+ const char *const classname = opclassnames[op_class(o)];
dMY_CXT;
/* Check that no-one has changed our reference, or is holding a reference
@@ -542,7 +393,7 @@ walkoptree(pTHX_ OP *o, const char *method, SV *ref)
ref = walkoptree(aTHX_ kid, method, ref);
}
}
- if (o && (cc_opclass(aTHX_ o) == OPc_PMOP) && o->op_type != OP_PUSHRE
+ if (o && (op_class(o) == OPclass_PMOP) && o->op_type != OP_SPLIT
&& (kid = PMOP_pmreplroot(cPMOPo)))
{
ref = walkoptree(aTHX_ kid, method, ref);
@@ -617,9 +468,7 @@ typedef IO *B__IO;
typedef MAGIC *B__MAGIC;
typedef HE *B__HE;
typedef struct refcounted_he *B__RHE;
-#ifdef PadlistARRAY
typedef PADLIST *B__PADLIST;
-#endif
typedef PADNAMELIST *B__PADNAMELIST;
typedef PADNAME *B__PADNAME;
@@ -777,10 +626,6 @@ BOOT:
ASSIGN_COMMON_ALIAS(I, defstash);
cv = newXS("B::curstash", intrpvar_sv_common, file);
ASSIGN_COMMON_ALIAS(I, curstash);
-#ifdef PL_formfeed
- cv = newXS("B::formfeed", intrpvar_sv_common, file);
- ASSIGN_COMMON_ALIAS(I, formfeed);
-#endif
#ifdef USE_ITHREADS
cv = newXS("B::regex_padav", intrpvar_sv_common, file);
ASSIGN_COMMON_ALIAS(I, regex_padav);
@@ -797,15 +642,11 @@ BOOT:
#endif
}
-#ifndef PL_formfeed
-
void
formfeed()
PPCODE:
PUSHs(make_sv_object(aTHX_ GvSV(gv_fetchpvs("\f", GV_ADD, SVt_PV))));
-#endif
-
long
amagic_generation()
CODE:
@@ -818,16 +659,12 @@ comppadlist()
PREINIT:
PADLIST *padlist = CvPADLIST(PL_main_cv ? PL_main_cv : PL_compcv);
PPCODE:
-#ifdef PadlistARRAY
{
SV * const rv = sv_newmortal();
sv_setiv(newSVrv(rv, padlist ? "B::PADLIST" : "B::NULL"),
PTR2IV(padlist));
PUSHs(rv);
}
-#else
- PUSHs(make_sv_object(aTHX_ (SV *)padlist));
-#endif
void
sv_undef()
@@ -894,11 +731,11 @@ CODE:
int i;
IV result = -1;
ST(0) = sv_newmortal();
- if (strncmp(name,"pp_",3) == 0)
+ if (strBEGINs(name,"pp_"))
name += 3;
for (i = 0; i < PL_maxo; i++)
{
- if (strcmp(name, PL_op_name[i]) == 0)
+ if (strEQ(name, PL_op_name[i]))
{
result = i;
break;
@@ -923,7 +760,7 @@ hash(sv)
U32 hash = 0;
const char *s = SvPVbyte(sv, len);
PERL_HASH(hash, s, len);
- ST(0) = sv_2mortal(Perl_newSVpvf(aTHX_ "0x%"UVxf, (UV)hash));
+ ST(0) = sv_2mortal(Perl_newSVpvf(aTHX_ "0x%" UVxf, (UV)hash));
#define cast_I32(foo) (I32)foo
IV
@@ -1083,7 +920,7 @@ next(o)
: &PL_sv_undef);
break;
case 26: /* B::OP::size */
- ret = sv_2mortal(newSVuv((UV)(opsizes[cc_opclass(aTHX_ o)])));
+ ret = sv_2mortal(newSVuv((UV)(opsizes[op_class(o)])));
break;
case 27: /* B::OP::name */
case 28: /* B::OP::desc */
@@ -1128,16 +965,19 @@ next(o)
}
break;
case 34: /* B::PMOP::pmreplroot */
- if (cPMOPo->op_type == OP_PUSHRE) {
-#ifdef USE_ITHREADS
+ if (cPMOPo->op_type == OP_SPLIT) {
ret = sv_newmortal();
- sv_setiv(ret, cPMOPo->op_pmreplrootu.op_pmtargetoff);
-#else
- GV *const target = cPMOPo->op_pmreplrootu.op_pmtargetgv;
- ret = sv_newmortal();
- sv_setiv(newSVrv(ret, target ?
- svclassnames[SvTYPE((SV*)target)] : "B::SV"),
- PTR2IV(target));
+#ifndef USE_ITHREADS
+ if (o->op_private & OPpSPLIT_LEX)
+#endif
+ sv_setiv(ret, cPMOPo->op_pmreplrootu.op_pmtargetoff);
+#ifndef USE_ITHREADS
+ else {
+ GV *const target = cPMOPo->op_pmreplrootu.op_pmtargetgv;
+ sv_setiv(newSVrv(ret, target ?
+ svclassnames[SvTYPE((SV*)target)] : "B::SV"),
+ PTR2IV(target));
+ }
#endif
}
else {
@@ -1182,20 +1022,18 @@ next(o)
ret = make_sv_object(aTHX_ NULL);
break;
case 41: /* B::PVOP::pv */
- /* OP_TRANS uses op_pv to point to a table of 256 or >=258
- * shorts whereas other PVOPs point to a null terminated
- * string. */
- if ( (cPVOPo->op_type == OP_TRANS
- || cPVOPo->op_type == OP_TRANSR) &&
- (cPVOPo->op_private & OPpTRANS_COMPLEMENT) &&
- !(cPVOPo->op_private & OPpTRANS_DELETE))
- {
- const short* const tbl = (short*)cPVOPo->op_pv;
- const short entries = 257 + tbl[256];
- ret = newSVpvn_flags(cPVOPo->op_pv, entries * sizeof(short), SVs_TEMP);
- }
- else if (cPVOPo->op_type == OP_TRANS || cPVOPo->op_type == OP_TRANSR) {
- ret = newSVpvn_flags(cPVOPo->op_pv, 256 * sizeof(short), SVs_TEMP);
+ /* OP_TRANS uses op_pv to point to a OPtrans_map struct,
+ * whereas other PVOPs point to a null terminated string.
+ * For trans, for now just return the whole struct as a
+ * string and let the caller unpack() it */
+ if ( cPVOPo->op_type == OP_TRANS
+ || cPVOPo->op_type == OP_TRANSR)
+ {
+ const OPtrans_map *const tbl = (OPtrans_map*)cPVOPo->op_pv;
+ ret = newSVpvn_flags(cPVOPo->op_pv,
+ (char*)(&tbl->map[tbl->size + 1])
+ - (char*)tbl,
+ SVs_TEMP);
}
else
ret = newSVpvn_flags(cPVOPo->op_pv, strlen(cPVOPo->op_pv), SVs_TEMP);
@@ -1325,14 +1163,34 @@ string(o, cv)
B::CV cv
PREINIT:
SV *ret;
+ UNOP_AUX_item *aux;
PPCODE:
+ aux = cUNOP_AUXo->op_aux;
switch (o->op_type) {
+ case OP_MULTICONCAT:
+ ret = multiconcat_stringify(o);
+ break;
+
case OP_MULTIDEREF:
ret = multideref_stringify(o, cv);
break;
+
+ case OP_ARGELEM:
+ ret = sv_2mortal(Perl_newSVpvf(aTHX_ "%" IVdf,
+ PTR2IV(aux)));
+ break;
+
+ case OP_ARGCHECK:
+ ret = Perl_newSVpvf(aTHX_ "%" IVdf ",%" IVdf, aux[0].iv, aux[1].iv);
+ if (aux[2].iv)
+ Perl_sv_catpvf(aTHX_ ret, ",%c", (char)aux[2].iv);
+ ret = sv_2mortal(ret);
+ break;
+
default:
ret = sv_2mortal(newSVpvn("", 0));
}
+
ST(0) = ret;
XSRETURN(1);
@@ -1346,12 +1204,83 @@ void
aux_list(o, cv)
B::OP o
B::CV cv
+ PREINIT:
+ UNOP_AUX_item *aux;
PPCODE:
PERL_UNUSED_VAR(cv); /* not needed on unthreaded builds */
+ aux = cUNOP_AUXo->op_aux;
switch (o->op_type) {
default:
XSRETURN(0); /* by default, an empty list */
+ case OP_ARGELEM:
+ XPUSHs(sv_2mortal(newSViv(PTR2IV(aux))));
+ XSRETURN(1);
+ break;
+
+ case OP_ARGCHECK:
+ EXTEND(SP, 3);
+ PUSHs(sv_2mortal(newSViv(aux[0].iv)));
+ PUSHs(sv_2mortal(newSViv(aux[1].iv)));
+ PUSHs(sv_2mortal(aux[2].iv ? Perl_newSVpvf(aTHX_ "%c",
+ (char)aux[2].iv) : &PL_sv_no));
+ break;
+
+ case OP_MULTICONCAT:
+ {
+ SSize_t nargs;
+ char *p;
+ STRLEN len;
+ U32 utf8 = 0;
+ SV *sv;
+ UNOP_AUX_item *lens;
+
+ /* return (nargs, const string, segment len 0, 1, 2, ...) */
+
+ /* if this changes, this block of code probably needs fixing */
+ assert(PERL_MULTICONCAT_HEADER_SIZE == 5);
+ nargs = aux[PERL_MULTICONCAT_IX_NARGS].ssize;
+ EXTEND(SP, ((SSize_t)(2 + (nargs+1))));
+ PUSHs(sv_2mortal(newSViv((IV)nargs)));
+
+ p = aux[PERL_MULTICONCAT_IX_PLAIN_PV].pv;
+ len = aux[PERL_MULTICONCAT_IX_PLAIN_LEN].ssize;
+ if (!p) {
+ p = aux[PERL_MULTICONCAT_IX_UTF8_PV].pv;
+ len = aux[PERL_MULTICONCAT_IX_UTF8_LEN].ssize;
+ utf8 = SVf_UTF8;
+ }
+ sv = newSVpvn(p, len);
+ SvFLAGS(sv) |= utf8;
+ PUSHs(sv_2mortal(sv));
+
+ lens = aux + PERL_MULTICONCAT_IX_LENGTHS;
+ nargs++; /* loop (nargs+1) times */
+ if (utf8) {
+ U8 *p = (U8*)SvPVX(sv);
+ while (nargs--) {
+ SSize_t bytes = lens->ssize;
+ SSize_t chars;
+ if (bytes <= 0)
+ chars = bytes;
+ else {
+ /* return char lengths rather than byte lengths */
+ chars = utf8_length(p, p + bytes);
+ p += bytes;
+ }
+ lens++;
+ PUSHs(sv_2mortal(newSViv(chars)));
+ }
+ }
+ else {
+ while (nargs--) {
+ PUSHs(sv_2mortal(newSViv(lens->ssize)));
+ lens++;
+ }
+ }
+ break;
+ }
+
case OP_MULTIDEREF:
#ifdef USE_ITHREADS
# define ITEM_SV(item) *av_fetch(comppad, (item)->pad_offset, FALSE);
@@ -1722,19 +1651,12 @@ PV(sv)
U32 utf8 = 0;
CODE:
if (ix == 3) {
-#ifndef PERL_FBM_TABLE_OFFSET
const MAGIC *const mg = mg_find(sv, PERL_MAGIC_bm);
if (!mg)
croak("argument to B::BM::TABLE is not a PVBM");
p = mg->mg_ptr;
len = mg->mg_len;
-#else
- p = SvPV(sv, len);
- /* Boyer-Moore table is just after string and its safety-margin \0 */
- p += len + PERL_FBM_TABLE_OFFSET;
- len = 256;
-#endif
} else if (ix == 2) {
/* This used to read 257. I think that that was buggy - should have
been 258. (The "\0", the flags byte, and 256 for the table.)
@@ -1752,38 +1674,22 @@ PV(sv)
5.15 and later store the BM table via MAGIC, so the compiler
should handle this just fine without changes if PVBM now
always returns the SvPVX() buffer. */
-#ifdef isREGEXP
p = isREGEXP(sv)
? RX_WRAPPED_const((REGEXP*)sv)
: SvPVX_const(sv);
-#else
- p = SvPVX_const(sv);
-#endif
-#ifdef PERL_FBM_TABLE_OFFSET
- len = SvCUR(sv) + (SvVALID(sv) ? 256 + PERL_FBM_TABLE_OFFSET : 0);
-#else
len = SvCUR(sv);
-#endif
} else if (ix) {
-#ifdef isREGEXP
p = isREGEXP(sv) ? RX_WRAPPED((REGEXP*)sv) : SvPVX(sv);
-#else
- p = SvPVX(sv);
-#endif
len = strlen(p);
} else if (SvPOK(sv)) {
len = SvCUR(sv);
p = SvPVX_const(sv);
utf8 = SvUTF8(sv);
- }
-#ifdef isREGEXP
- else if (isREGEXP(sv)) {
+ } else if (isREGEXP(sv)) {
len = SvCUR(sv);
p = RX_WRAPPED_const((REGEXP*)sv);
utf8 = SvUTF8(sv);
- }
-#endif
- else {
+ } else {
/* XXX for backward compatibility, but should fail */
/* croak( "argument is not SvPOK" ); */
p = NULL;
@@ -1906,7 +1812,7 @@ is_empty(gv)
isGV_with_GP = 1
CODE:
if (ix) {
- RETVAL = isGV_with_GP(gv) ? TRUE : FALSE;
+ RETVAL = cBOOL(isGV_with_GP(gv));
} else {
RETVAL = GvGP(gv) == Null(GP*);
}
@@ -2063,8 +1969,6 @@ I32
CvDEPTH(cv)
B::CV cv
-#ifdef PadlistARRAY
-
B::PADLIST
CvPADLIST(cv)
B::CV cv
@@ -2073,17 +1977,6 @@ CvPADLIST(cv)
OUTPUT:
RETVAL
-#else
-
-B::AV
-CvPADLIST(cv)
- B::CV cv
- PPCODE:
- PUSHs(make_sv_object(aTHX_ (SV *)CvPADLIST(cv)));
-
-
-#endif
-
SV *
CvHSCXT(cv)
B::CV cv
@@ -2179,13 +2072,11 @@ SV*
HASH(h)
B::RHE h
CODE:
- RETVAL = newRV( (SV*)cophh_2hv(h, 0) );
+ RETVAL = newRV_noinc( (SV*)cophh_2hv(h, 0) );
OUTPUT:
RETVAL
-#ifdef PadlistARRAY
-
MODULE = B PACKAGE = B::PADLIST PREFIX = Padlist
SSize_t
@@ -2245,8 +2136,6 @@ PadlistREFCNT(padlist)
OUTPUT:
RETVAL
-#endif
-
MODULE = B PACKAGE = B::PADNAMELIST PREFIX = Padnamelist
void
diff --git a/gnu/usr.bin/perl/ext/B/B/Concise.pm b/gnu/usr.bin/perl/ext/B/B/Concise.pm
index 311e0e738a9..9032e9b082b 100644
--- a/gnu/usr.bin/perl/ext/B/B/Concise.pm
+++ b/gnu/usr.bin/perl/ext/B/B/Concise.pm
@@ -14,7 +14,7 @@ use warnings; # uses #3 and #4, since warnings uses Carp
use Exporter (); # use #5
-our $VERSION = "0.996";
+our $VERSION = "1.003";
our @ISA = qw(Exporter);
our @EXPORT_OK = qw( set_style set_style_standard add_callback
concise_subref concise_cv concise_main
@@ -28,7 +28,10 @@ our %EXPORT_TAGS =
# use #6
use B qw(class ppname main_start main_root main_cv cstring svref_2object
SVf_IOK SVf_NOK SVf_POK SVf_IVisUV SVf_FAKE OPf_KIDS OPf_SPECIAL
- CVf_ANON PAD_FAKELEX_ANON PAD_FAKELEX_MULTI SVf_ROK);
+ OPf_STACKED
+ OPpSPLIT_ASSIGN OPpSPLIT_LEX
+ CVf_ANON CVf_LEXICAL CVf_NAMED
+ PAD_FAKELEX_ANON PAD_FAKELEX_MULTI SVf_ROK);
my %style =
("terse" =>
@@ -143,13 +146,14 @@ sub concise_subref {
sub concise_stashref {
my($order, $h) = @_;
- local *s;
+ my $name = svref_2object($h)->NAME;
foreach my $k (sort keys %$h) {
next unless defined $h->{$k};
- *s = $h->{$k};
- my $coderef = *s{CODE} or next;
+ my $coderef = ref $h->{$k} eq 'CODE' ? $h->{$k}
+ : ref\$h->{$k} eq 'GLOB' ? *{$h->{$k}}{CODE} || next
+ : next;
reset_sequence();
- print "FUNC: ", *s, "\n";
+ print "FUNC: *", $name, "::", $k, "\n";
my $codeobj = svref_2object($coderef);
next unless ref $codeobj eq 'B::CV';
eval { concise_cv_obj($order, $codeobj, $k) };
@@ -595,31 +599,43 @@ require B::Op_private;
our %hints; # used to display each COP's op_hints values
# strict refs, subs, vars
-@hints{2,512,1024,32,64,128} = ('$', '&', '*', 'x$', 'x&', 'x*');
+@hints{0x2,0x200,0x400,0x20,0x40,0x80} = ('$', '&', '*', 'x$', 'x&', 'x*');
# integers, locale, bytes
-@hints{1,4,8,16} = ('i', 'l', 'b');
+@hints{0x1,0x4,0x8,0x10} = ('i', 'l', 'b');
# block scope, localise %^H, $^OPEN (in), $^OPEN (out)
-@hints{256,131072,262144,524288} = ('{','%','<','>');
+@hints{0x100,0x20000,0x40000,0x80000} = ('{','%','<','>');
# overload new integer, float, binary, string, re
-@hints{4096,8192,16384,32768,65536} = ('I', 'F', 'B', 'S', 'R');
+@hints{0x1000,0x2000,0x4000,0x8000,0x10000} = ('I', 'F', 'B', 'S', 'R');
# taint and eval
-@hints{1048576,2097152} = ('T', 'E');
-# filetest access, UTF-8
-@hints{4194304,8388608} = ('X', 'U');
+@hints{0x100000,0x200000} = ('T', 'E');
+# filetest access, use utf8, unicode_strings feature
+@hints{0x400000,0x800000,0x800} = ('X', 'U', 'us');
-sub _flags {
- my($hash, $x) = @_;
+# pick up the feature hints constants.
+# Note that we're relying on non-API parts of feature.pm,
+# but its less naughty than just blindly copying those constants into
+# this src file.
+#
+require feature;
+
+sub hints_flags {
+ my($x) = @_;
my @s;
- for my $flag (sort {$b <=> $a} keys %$hash) {
- if ($hash->{$flag} and $x & $flag and $x >= $flag) {
+ for my $flag (sort {$b <=> $a} keys %hints) {
+ if ($hints{$flag} and $x & $flag and $x >= $flag) {
$x -= $flag;
- push @s, $hash->{$flag};
+ push @s, $hints{$flag};
}
}
- push @s, $x if $x;
+ if ($x & $feature::hint_mask) {
+ push @s, "fea=" . (($x & $feature::hint_mask) >> $feature::hint_shift);
+ $x &= ~$feature::hint_mask;
+ }
+ push @s, sprintf "0x%x", $x if $x;
return join(",", @s);
}
+
# return a string like 'LVINTRO,1' for the op $name with op_private
# value $x
@@ -677,11 +693,6 @@ sub private_flags {
return join ",", @flags;
}
-sub hints_flags {
- my($x) = @_;
- _flags(\%hints, $x);
-}
-
sub concise_sv {
my($sv, $hr, $preferpv) = @_;
$hr->{svclass} = class($sv);
@@ -706,30 +717,47 @@ sub concise_sv {
$hr->{svval} = "*$stash" . $gv->SAFENAME;
return "*$stash" . $gv->SAFENAME;
} else {
- if ($] >= 5.011) {
- while (class($sv) eq "IV" && $sv->FLAGS & SVf_ROK) {
- $hr->{svval} .= "\\";
- $sv = $sv->RV;
- }
- } else {
- while (class($sv) eq "RV") {
- $hr->{svval} .= "\\";
- $sv = $sv->RV;
- }
+ while (class($sv) eq "IV" && $sv->FLAGS & SVf_ROK) {
+ $hr->{svval} .= "\\";
+ $sv = $sv->RV;
}
if (class($sv) eq "SPECIAL") {
- $hr->{svval} .= ["Null", "sv_undef", "sv_yes", "sv_no"]->[$$sv];
+ $hr->{svval} .= ["Null", "sv_undef", "sv_yes", "sv_no",
+ '', '', '', "sv_zero"]->[$$sv];
} elsif ($preferpv
- && ($sv->FLAGS & SVf_POK || class($sv) eq "REGEXP")) {
+ && ($sv->FLAGS & SVf_POK)) {
$hr->{svval} .= cstring($sv->PV);
} elsif ($sv->FLAGS & SVf_NOK) {
$hr->{svval} .= $sv->NV;
} elsif ($sv->FLAGS & SVf_IOK) {
$hr->{svval} .= $sv->int_value;
- } elsif ($sv->FLAGS & SVf_POK || class($sv) eq "REGEXP") {
+ } elsif ($sv->FLAGS & SVf_POK) {
$hr->{svval} .= cstring($sv->PV);
} elsif (class($sv) eq "HV") {
$hr->{svval} .= 'HASH';
+ } elsif (class($sv) eq "AV") {
+ $hr->{svval} .= 'ARRAY';
+ } elsif (class($sv) eq "CV") {
+ if ($sv->CvFLAGS & CVf_ANON) {
+ $hr->{svval} .= 'CODE';
+ } elsif ($sv->CvFLAGS & CVf_NAMED) {
+ $hr->{svval} .= "&";
+ unless ($sv->CvFLAGS & CVf_LEXICAL) {
+ my $stash = $sv->STASH;
+ unless (class($stash) eq "SPECIAL") {
+ $hr->{svval} .= $stash->NAME . "::";
+ }
+ }
+ $hr->{svval} .= $sv->NAME_HEK;
+ } else {
+ $hr->{svval} .= "&";
+ $sv = $sv->GV;
+ my $stash = $sv->STASH;
+ unless (class($stash) eq "SPECIAL") {
+ $hr->{svval} .= $stash->NAME . "::";
+ }
+ $hr->{svval} .= $sv->SAFENAME;
+ }
}
$hr->{svval} = 'undef' unless defined $hr->{svval};
@@ -755,6 +783,50 @@ sub fill_srclines {
$srclines{$fullnm} = \@l;
}
+# Given a pad target, return the pad var's name and cop range /
+# fakeness, or failing that, its target number.
+# e.g.
+# ('$i', '$i:5,7')
+# or
+# ('$i', '$i:fake:a')
+# or
+# ('t5', 't5')
+
+sub padname {
+ my ($targ) = @_;
+
+ my ($targarg, $targarglife);
+ my $padname = (($curcv->PADLIST->ARRAY)[0]->ARRAY)[$targ];
+ if (defined $padname and class($padname) ne "SPECIAL" and
+ $padname->LEN)
+ {
+ $targarg = $padname->PVX;
+ if ($padname->FLAGS & SVf_FAKE) {
+ # These changes relate to the jumbo closure fix.
+ # See changes 19939 and 20005
+ my $fake = '';
+ $fake .= 'a'
+ if $padname->PARENT_FAKELEX_FLAGS & PAD_FAKELEX_ANON;
+ $fake .= 'm'
+ if $padname->PARENT_FAKELEX_FLAGS & PAD_FAKELEX_MULTI;
+ $fake .= ':' . $padname->PARENT_PAD_INDEX
+ if $curcv->CvFLAGS & CVf_ANON;
+ $targarglife = "$targarg:FAKE:$fake";
+ }
+ else {
+ my $intro = $padname->COP_SEQ_RANGE_LOW - $cop_seq_base;
+ my $finish = int($padname->COP_SEQ_RANGE_HIGH) - $cop_seq_base;
+ $finish = "end" if $finish == 999999999 - $cop_seq_base;
+ $targarglife = "$targarg:$intro,$finish";
+ }
+ } else {
+ $targarglife = $targarg = "t" . $targ;
+ }
+ return $targarg, $targarglife;
+}
+
+
+
sub concise_op {
my ($op, $level, $format) = @_;
my %h;
@@ -787,39 +859,14 @@ sub concise_op {
: 1;
my (@targarg, @targarglife);
for my $i (0..$count-1) {
- my ($targarg, $targarglife);
- my $padname = (($curcv->PADLIST->ARRAY)[0]->ARRAY)[$h{targ}+$i];
- if (defined $padname and class($padname) ne "SPECIAL" and
- $padname->LEN)
- {
- $targarg = $padname->PVX;
- if ($padname->FLAGS & SVf_FAKE) {
- # These changes relate to the jumbo closure fix.
- # See changes 19939 and 20005
- my $fake = '';
- $fake .= 'a'
- if $padname->PARENT_FAKELEX_FLAGS & PAD_FAKELEX_ANON;
- $fake .= 'm'
- if $padname->PARENT_FAKELEX_FLAGS & PAD_FAKELEX_MULTI;
- $fake .= ':' . $padname->PARENT_PAD_INDEX
- if $curcv->CvFLAGS & CVf_ANON;
- $targarglife = "$targarg:FAKE:$fake";
- }
- else {
- my $intro = $padname->COP_SEQ_RANGE_LOW - $cop_seq_base;
- my $finish = int($padname->COP_SEQ_RANGE_HIGH) - $cop_seq_base;
- $finish = "end" if $finish == 999999999 - $cop_seq_base;
- $targarglife = "$targarg:$intro,$finish";
- }
- } else {
- $targarglife = $targarg = "t" . ($h{targ}+$i);
- }
+ my ($targarg, $targarglife) = padname($h{targ} + $i);
push @targarg, $targarg;
push @targarglife, $targarglife;
}
$h{targarg} = join '; ', @targarg;
$h{targarglife} = join '; ', @targarglife;
}
+
$h{arg} = "";
$h{svclass} = $h{svaddr} = $h{svval} = "";
if ($h{class} eq "PMOP") {
@@ -837,22 +884,35 @@ sub concise_op {
$extra = " replstart->" . seq($op->pmreplstart);
}
}
- elsif ($op->name eq 'pushre') {
- # with C<@stash_array = split(/pat/, str);>,
- # *stash_array is stored in /pat/'s pmreplroot.
- my $gv = $op->pmreplroot;
- if (!ref($gv)) {
- # threaded: the value is actually a pad offset for where
- # the GV is kept (op_pmtargetoff)
- if ($gv) {
- $gv = (($curcv->PADLIST->ARRAY)[1]->ARRAY)[$gv]->NAME;
- }
- }
- else {
- # unthreaded: its a GV (if it exists)
- $gv = (ref($gv) eq "B::GV") ? $gv->NAME : undef;
- }
- $extra = " => \@$gv" if $gv;
+ elsif ($op->name eq 'split') {
+ if ( ($op->private & OPpSPLIT_ASSIGN) # @array = split
+ && (not $op->flags & OPf_STACKED)) # @{expr} = split
+ {
+ # with C<@array = split(/pat/, str);>,
+ # array is stored in /pat/'s pmreplroot; either
+ # as an integer index into the pad (for a lexical array)
+ # or as GV for a package array (which will be a pad index
+ # on threaded builds)
+
+ if ($op->private & $B::Op_private::defines{'OPpSPLIT_LEX'}) {
+ my $off = $op->pmreplroot; # union with op_pmtargetoff
+ my ($name, $full) = padname($off);
+ $extra = " => $full";
+ }
+ else {
+ # union with op_pmtargetoff, op_pmtargetgv
+ my $gv = $op->pmreplroot;
+ if (!ref($gv)) {
+ # the value is actually a pad offset
+ $gv = (($curcv->PADLIST->ARRAY)[1]->ARRAY)[$gv]->NAME;
+ }
+ else {
+ # unthreaded: its a GV
+ $gv = $gv->NAME;
+ }
+ $extra = " => \@$gv";
+ }
+ }
}
$h{arg} = "($precomp$extra)";
} elsif ($h{class} eq "PVOP" and $h{name} !~ '^transr?\z') {
@@ -871,10 +931,7 @@ sub concise_op {
$h{arg} = "($label$stash $cseq $loc)";
if ($show_src) {
fill_srclines($pathnm) unless exists $srclines{$pathnm};
- # Would love to retain Jim's use of // but this code needs to be
- # portable to 5.8.x
- my $line = $srclines{$pathnm}[$ln];
- $line = "-src unavailable under -e" unless defined $line;
+ my $line = $srclines{$pathnm}[$ln] // "-src unavailable under -e";
$h{src} = "$ln: $line";
}
} elsif ($h{class} eq "LOOP") {
@@ -884,6 +941,11 @@ sub concise_op {
undef $lastnext;
$h{arg} = "(other->" . seq($op->other) . ")";
$h{otheraddr} = sprintf("%#x", $ {$op->other});
+ if ($h{name} eq "argdefelem") {
+ # targ used for element index
+ $h{targarglife} = $h{targarg} = "";
+ $h{arg} .= "[" . $op->targ . "]";
+ }
}
elsif ($h{class} eq "SVOP" or $h{class} eq "PADOP") {
unless ($h{name} eq 'aelemfast' and $op->flags & OPf_SPECIAL) {
@@ -1039,10 +1101,6 @@ sub tree {
# number for the user's program as being a small offset later, so all we
# have to worry about are changes in the offset.
-# [For 5.8.x and earlier perl is generating sequence numbers for all ops,
-# and using them to reference labels]
-
-
# When you say "perl -MO=Concise -e '$a'", the output should look like:
# 4 <@> leave[t1] vKP/REFC ->(end)
@@ -1057,7 +1115,7 @@ sub tree {
# to update the corresponding magic number in the next line.
# Remember, this needs to stay the last things in the module.
-my $cop_seq_mnum = 16;
+my $cop_seq_mnum = 12;
$cop_seq_base = svref_2object(eval 'sub{0;}')->START->cop_seq + $cop_seq_mnum;
1;
@@ -1591,6 +1649,9 @@ string if this is not a COP. Here are the symbols used:
X filetest access
U utf-8
+ us use feature 'unicode_strings'
+ fea=NNN feature bundle number
+
=item B<#hintsval>
The numeric value of the COP's hint flags, or an empty string if this is not
@@ -1642,21 +1703,10 @@ The numeric value of the OP's private flags.
The sequence number of the OP. Note that this is a sequence number
generated by B::Concise.
-=item B<#seqnum>
-
-5.8.x and earlier only. 5.9 and later do not provide this.
-
-The real sequence number of the OP, as a regular number and not adjusted
-to be relative to the start of the real program. (This will generally be
-a fairly large number because all of B<B::Concise> is compiled before
-your program is).
-
=item B<#opt>
Whether or not the op has been optimized by the peephole optimizer.
-Only available in 5.9 and later.
-
=item B<#sibaddr>
The address of the OP's next youngest sibling, in hexadecimal.
diff --git a/gnu/usr.bin/perl/ext/B/t/OptreeCheck.pm b/gnu/usr.bin/perl/ext/B/t/OptreeCheck.pm
index a099a97ec9d..53236c91d4e 100644
--- a/gnu/usr.bin/perl/ext/B/t/OptreeCheck.pm
+++ b/gnu/usr.bin/perl/ext/B/t/OptreeCheck.pm
@@ -2,10 +2,10 @@ package OptreeCheck;
use parent 'Exporter';
use strict;
use warnings;
-use vars qw($TODO $Level $using_open);
+our ($TODO, $Level, $using_open);
require "test.pl";
-our $VERSION = '0.13';
+our $VERSION = '0.16';
# now export checkOptree, and those test.pl functions used by tests
our @EXPORT = qw( checkOptree plan skip skip_all pass is like unlike
@@ -208,15 +208,10 @@ In either case, $coderef is then passed to B::Concise::compile():
=head2 expect and expect_nt
expect and expect_nt args are the B<golden-sample> renderings, and are
-sampled from known-ok threaded and un-threaded bleadperl (5.9.1) builds.
+sampled from known-ok threaded and un-threaded bleadperl builds.
They're both required, and the correct one is selected for the platform
being tested, and saved into the synthesized property B<wanted>.
-Individual sample lines may be suffixed with whitespace followed
-by (<|<=|==|>=|>)5.nnnn (up to two times) to
-select that line only for the listed perl
-version; the whitespace and conditional are stripped.
-
=head2 bcopts => $bcopts || [ @bcopts ]
When getRendering() runs, it passes bcopts into B::Concise::compile().
@@ -640,33 +635,6 @@ sub mkCheckRex {
$str =~ s/^\# //mg; # ease cut-paste testcase authoring
- # strip out conditional lines
-
- $str =~ s{^(.*?) \s+(<|<=|==|>=|>)\s*(5\.\d+)
- (?:\s+(<|<=|==|>=|>)\s*(5\.\d+))? \ *\n}
- {
- my ($line, $cmp, $version, $cmp2, $v2) = ($1,$2,$3,$4,$5,$6);
- my $repl = "";
- if ( $cmp eq '<' ? $] < $version
- : $cmp eq '<=' ? $] <= $version
- : $cmp eq '==' ? $] == $version
- : $cmp eq '>=' ? $] >= $version
- : $cmp eq '>' ? $] > $version
- : die("bad comparison '$cmp' in string [$str]\n")
- and !$cmp2 || (
- $cmp2 eq '<' ? $] < $v2
- : $cmp2 eq '<=' ? $] <= $v2
- : $cmp2 eq '==' ? $] == $v2
- : $cmp2 eq '>=' ? $] >= $v2
- : $cmp2 eq '>' ? $] > $v2
- : die("bad comparison '$cmp2' in string [$str]\n")
- )
- ) {
- $repl = "$line\n";
- }
- $repl;
- }gemx;
-
$tc->{wantstr} = $str;
# make UNOP_AUX flag type literal
@@ -703,12 +671,12 @@ sub mkCheckRex {
.* # all sorts of things follow it
v # The opening v
)
- (?:(:>,<,%,\\{) # hints when open.pm is in force
+ (?:(:>,<,%,\\\{) # hints when open.pm is in force
|(:>,<,%)) # (two variations)
(\ ->(?:-|[0-9a-z]+))?
$
]
- [$1 . ($2 && ':{') . $4]xegm; # change to the hints without open.pm
+ [$1 . ($2 && ':\{') . $4]xegm; # change to the hints without open.pm
}
@@ -781,8 +749,9 @@ sub reduceDiffs {
my $exp = shift @want;
my $line = shift @got;
# remove matches, and report
- unless ($got =~ s/($rex\n)//msg) {
+ unless ($got =~ s/^($rex\n)//ms) {
_diag("got:\t\t'$line'\nwant:\t $rex\n");
+ last;
}
}
_diag("remainder:\n$got");
@@ -1001,7 +970,7 @@ sub OptreeCheck::processExamples {
# turned into optreeCheck tests,
foreach my $file (@files) {
- open (my $fh, $file) or die "cant open $file: $!\n";
+ open (my $fh, '<', $file) or die "cant open $file: $!\n";
$/ = "";
my @chunks = <$fh>;
print preamble (scalar @chunks);
diff --git a/gnu/usr.bin/perl/ext/B/t/b.t b/gnu/usr.bin/perl/ext/B/t/b.t
index 4638c3e5770..09dba39b1dd 100644
--- a/gnu/usr.bin/perl/ext/B/t/b.t
+++ b/gnu/usr.bin/perl/ext/B/t/b.t
@@ -21,7 +21,7 @@ BEGIN { use_ok( 'B' ); }
package Testing::Symtable;
-use vars qw($This @That %wibble $moo %moo);
+our ($This, @That, %wibble, $moo, %moo);
my $not_a_sym = 'moo';
sub moo { 42 }
@@ -35,7 +35,7 @@ package Testing::Symtable::Bar;
sub hock { "yarrow" }
package main;
-use vars qw(%Subs);
+our %Subs;
local %Subs = ();
B::walksymtable(\%Testing::Symtable::, 'find_syms', sub { $_[0] =~ /Foo/ },
'Testing::Symtable::');
@@ -46,8 +46,7 @@ sub B::GV::find_syms {
$main::Subs{$symbol->STASH->NAME . '::' . $symbol->NAME}++;
}
-my @syms = map { 'Testing::Symtable::'.$_ } qw(This That wibble moo car
- BEGIN);
+my @syms = map { 'Testing::Symtable::'.$_ } qw(This That wibble moo car);
push @syms, "Testing::Symtable::Foo::yarrow";
# Make sure we hit all the expected symbols.
@@ -56,6 +55,21 @@ ok( join('', sort @syms) eq join('', sort keys %Subs), 'all symbols found' );
# Make sure we only hit them each once.
ok( (!grep $_ != 1, values %Subs), '...and found once' );
+
+# Make sure method caches are not present when walking the sym tab
+@Testing::Method::Caches::Foo::ISA='Testing::Method::Caches::Bar';
+sub Testing::Method::Caches::Bar::foo{}
+Testing::Method::Caches::Foo->foo; # caches the sub in the *foo glob
+
+my $have_cv;
+sub B::GV::method_cache_test { ${shift->CV} and ++$have_cv }
+
+B::walksymtable(\%Testing::Method::Caches::, 'method_cache_test',
+ sub { 1 }, 'Testing::Method::Caches::');
+# $have_cv should only have been incremented for ::Bar::foo
+is $have_cv, 1, 'walksymtable clears cached methods';
+
+
# Tests for MAGIC / MOREMAGIC
ok( B::svref_2object(\$.)->MAGIC->TYPE eq "\0", '$. has \0 magic' );
{
@@ -107,8 +121,7 @@ ok( B::svref_2object(\$.)->MAGIC->TYPE eq "\0", '$. has \0 magic' );
}
my $r = qr/foo/;
-my $obj = B::svref_2object($r);
-my $regexp = ($] < 5.011) ? $obj->MAGIC : $obj;
+my $regexp = B::svref_2object($r);
ok($regexp->precomp() eq 'foo', 'Get string from qr//');
like($regexp->REGEX(), qr/\d+/, "REGEX() returns numeric value");
like($regexp->compflags, qr/^\d+\z/, "compflags returns numeric value");
@@ -179,25 +192,21 @@ my $null_ret = $nv_ref->object_2svref();
is(ref $null_ret, "SCALAR", "Test object_2svref() return is SCALAR");
is($$null_ret, $nv, "Test object_2svref()");
-my $RV_class = $] >= 5.011 ? 'B::IV' : 'B::RV';
my $cv = sub{ 1; };
my $cv_ref = B::svref_2object(\$cv);
-is($cv_ref->REFCNT, 1, "Test $RV_class->REFCNT");
-is(ref $cv_ref, "$RV_class",
- "Test $RV_class return from svref_2object - code");
+is($cv_ref->REFCNT, 1, "Test B::IV->REFCNT");
+is(ref $cv_ref, "B::IV", "Test B::IV return from svref_2object - code");
my $cv_ret = $cv_ref->object_2svref();
is(ref $cv_ret, "REF", "Test object_2svref() return is REF");
is($$cv_ret, $cv, "Test object_2svref()");
my $av = [];
my $av_ref = B::svref_2object(\$av);
-is(ref $av_ref, "$RV_class",
- "Test $RV_class return from svref_2object - array");
+is(ref $av_ref, "B::IV", "Test B::IV return from svref_2object - array");
my $hv = [];
my $hv_ref = B::svref_2object(\$hv);
-is(ref $hv_ref, "$RV_class",
- "Test $RV_class return from svref_2object - hash");
+is(ref $hv_ref, "B::IV", "Test B::IV return from svref_2object - hash");
local *gv = *STDOUT;
my $gv_ref = B::svref_2object(\*gv);
@@ -298,8 +307,7 @@ is(B::opnumber("pp_null"), 0, "Testing opnumber with opname (pp_null)");
is(B::class(bless {}, "Wibble::Bibble"), "Bibble", "Testing B::class()");
is(B::cast_I32(3.14), 3, "Testing B::cast_I32()");
-is(B::opnumber("chop"), $] >= 5.015 ? 39 : 38,
- "Testing opnumber with opname (chop)");
+is(B::opnumber("chop"), 38, "Testing opnumber with opname (chop)");
{
no warnings 'once';
@@ -313,9 +321,8 @@ like( B::amagic_generation, qr/^\d+\z/, "amagic_generation" );
is(B::svref_2object(sub {})->ROOT->ppaddr, 'PL_ppaddr[OP_LEAVESUB]',
'OP->ppaddr');
-# This one crashes from perl 5.8.9 to B 1.24 (perl 5.13.6):
B::svref_2object(sub{y/\x{100}//})->ROOT->first->first->sibling->sv;
-ok 1, 'B knows that UTF trans is a padop in 5.8.9, not an svop';
+ok 1, 'B knows that UTF trans is a padop, not an svop';
{
my $o = B::svref_2object(sub{0;0})->ROOT->first->first;
@@ -346,13 +353,10 @@ my $bobby = B::svref_2object($sub2)->ROOT->first->first;
is $cop->stash->object_2svref, \%main::, 'COP->stash';
is $cop->stashpv, 'main', 'COP->stashpv';
-SKIP: {
- skip "no nulls in packages before 5.17", 1 if $] < 5.017;
- is $bobby->stashpv, "Pe\0e\x{142}", 'COP->stashpv with utf8 and nulls';
-}
+is $bobby->stashpv, "Pe\0e\x{142}", 'COP->stashpv with utf8 and nulls';
SKIP: {
- skip "no stashoff", 2 if $] < 5.017 || !$Config::Config{useithreads};
+ skip "no stashoff", 2 unless $Config::Config{useithreads};
like $cop->stashoff, qr/^[1-9]\d*\z/a, 'COP->stashoff';
isnt $cop->stashoff, $bobby->stashoff,
'different COP->stashoff for different stashes';
@@ -429,17 +433,9 @@ is $regexp->precomp, 'fit', 'pmregexp returns the right regexp';
ok($gv, "we get a GV from a GV on a normal sub");
isa_ok($gv, "B::GV");
is($gv->NAME, "foo", "check the GV name");
- SKIP:
- { # do we need these version checks?
- skip "no HEK before 5.18", 1 if $] < 5.018;
- is($cv->NAME_HEK, undef, "no hek for a global sub");
- }
+ is($cv->NAME_HEK, undef, "no hek for a global sub");
}
-SKIP:
- {
- skip "no HEK before 5.18", 4 if $] < 5.018;
- eval <<'EOS'
{
use feature 'lexical_subs';
no warnings 'experimental::lexical_subs';
@@ -452,10 +448,6 @@ SKIP:
my $gv = $cv->GV;
isa_ok($gv, "B::GV", "GV on a lexical sub");
}
- 1;
-EOS
- or die "lexical_subs test failed to compile: $@";
- }
}
{ # [perl #120535]
diff --git a/gnu/usr.bin/perl/ext/B/t/concise.t b/gnu/usr.bin/perl/ext/B/t/concise.t
index bb1056fe5c2..3541ce3504b 100644
--- a/gnu/usr.bin/perl/ext/B/t/concise.t
+++ b/gnu/usr.bin/perl/ext/B/t/concise.t
@@ -10,7 +10,7 @@ BEGIN {
require 'test.pl'; # we use runperl from 'test.pl', so can't use Test::More
}
-plan tests => 163;
+plan tests => 167;
require_ok("B::Concise");
@@ -502,4 +502,26 @@ $end =~ s/<NEXT>/$next/;
like $out, qr/$end/, 'OP_AND->op_other points correctly';
+# test nextstate hints display
+
+{
+
+ $out = runperl(
+ switches => ["-MO=Concise"],
+ prog => q{my $x; use strict; use warnings; $x++; use feature q(:5.11); $x++},
+ stderr => 1,
+ );
+
+ my @hints = $out =~ /nextstate\([^)]+\) (.*) ->/g;
+
+ # handle test script run with PERL_UNICODE=""
+ s/>,<,// for @hints;
+ s/%,// for @hints;
+
+ is(scalar(@hints), 3, "3 hints");
+ is($hints[0], 'v:{', "hints[0]");
+ is($hints[1], 'v:*,&,{,x*,x&,x$,$', "hints[1]");
+ is($hints[2], 'v:us,*,&,{,x*,x&,x$,$,fea=7', "hints[2]");
+}
+
__END__
diff --git a/gnu/usr.bin/perl/ext/B/t/f_map.t b/gnu/usr.bin/perl/ext/B/t/f_map.t
index a1cbc38c012..221f2926e2a 100755
--- a/gnu/usr.bin/perl/ext/B/t/f_map.t
+++ b/gnu/usr.bin/perl/ext/B/t/f_map.t
@@ -108,7 +108,7 @@ checkOptree(note => q{},
# goto 7
# g <0> pushmark s
# h <#> gv[*hash] s
-# i <1> rv2hv lKRM*/1
+# i <1> rv2hv[t2] lKRM*
# j <2> aassign[t10] KS/COM_AGG
# k <1> leavesub[1 ref] K/REFC,1
EOT_EOT
@@ -130,7 +130,7 @@ EOT_EOT
# goto 7
# g <0> pushmark s
# h <$> gv(*hash) s
-# i <1> rv2hv lKRM*/1
+# i <1> rv2hv[t1] lKRM*
# j <2> aassign[t5] KS/COM_AGG
# k <1> leavesub[1 ref] K/REFC,1
EONT_EONT
@@ -157,7 +157,7 @@ checkOptree(note => q{},
# 4 <0> pushmark s
# 5 <0> pushmark s
# 6 <#> gv[*hash] s
-# 7 <1> rv2hv lKRM*/1
+# 7 <1> rv2hv[t2] lKRM*
# 8 <2> aassign[t3] vKS
# 9 <;> nextstate(main 476 (eval 10):1) v:{
# a <0> pushmark sM
@@ -171,7 +171,7 @@ checkOptree(note => q{},
# g <;> nextstate(main 475 (eval 10):1) v:{
# h <#> gvsv[*_] s
# i <#> gv[*hash] s
-# j <1> rv2hv sKR/1
+# j <1> rv2hv sKR
# k <0> pushmark s
# l <#> gvsv[*_] s
# m <#> gv[*getkey] s/EARLYCV
@@ -190,7 +190,7 @@ EOT_EOT
# 4 <0> pushmark s
# 5 <0> pushmark s
# 6 <$> gv(*hash) s
-# 7 <1> rv2hv lKRM*/1
+# 7 <1> rv2hv[t1] lKRM*
# 8 <2> aassign[t2] vKS
# 9 <;> nextstate(main 560 (eval 15):1) v:{
# a <0> pushmark sM
@@ -204,7 +204,7 @@ EOT_EOT
# g <;> nextstate(main 559 (eval 15):1) v:{
# h <$> gvsv(*_) s
# i <$> gv(*hash) s
-# j <1> rv2hv sKR/1
+# j <1> rv2hv sKR
# k <0> pushmark s
# l <$> gvsv(*_) s
# m <$> gv(*getkey) s/EARLYCV
@@ -243,7 +243,7 @@ checkOptree(note => q{},
# goto 7
# b <0> pushmark s
# c <#> gv[*hash] s
-# d <1> rv2hv lKRM*/1
+# d <1> rv2hv[t2] lKRM*
# e <2> aassign[t10] KS/COM_AGG
# f <1> leavesub[1 ref] K/REFC,1
EOT_EOT
@@ -260,7 +260,7 @@ EOT_EOT
# goto 7
# b <0> pushmark s
# c <$> gv(*hash) s
-# d <1> rv2hv lKRM*/1
+# d <1> rv2hv[t1] lKRM*
# e <2> aassign[t6] KS/COM_AGG
# f <1> leavesub[1 ref] K/REFC,1
EONT_EONT
@@ -289,7 +289,7 @@ checkOptree(note => q{},
# goto 7
# b <0> pushmark s
# c <#> gv[*hash] s
-# d <1> rv2hv lKRM*/1
+# d <1> rv2hv[t2] lKRM*
# e <2> aassign[t10] KS/COM_AGG
# f <1> leavesub[1 ref] K/REFC,1
EOT_EOT
@@ -306,7 +306,7 @@ EOT_EOT
# goto 7
# b <0> pushmark s
# c <$> gv(*hash) s
-# d <1> rv2hv lKRM*/1
+# d <1> rv2hv[t1] lKRM*
# e <2> aassign[t6] KS/COM_AGG
# f <1> leavesub[1 ref] K/REFC,1
EONT_EONT
@@ -335,7 +335,7 @@ checkOptree(note => q{},
# goto 7
# b <0> pushmark s
# c <#> gv[*hash] s
-# d <1> rv2hv lKRM*/1
+# d <1> rv2hv[t2] lKRM*
# e <2> aassign[t9] KS/COM_AGG
# f <1> leavesub[1 ref] K/REFC,1
EOT_EOT
@@ -352,7 +352,7 @@ EOT_EOT
# goto 7
# b <0> pushmark s
# c <$> gv(*hash) s
-# d <1> rv2hv lKRM*/1
+# d <1> rv2hv[t1] lKRM*
# e <2> aassign[t5] KS/COM_AGG
# f <1> leavesub[1 ref] K/REFC,1
EONT_EONT
@@ -381,7 +381,7 @@ checkOptree(note => q{},
# goto 7
# b <0> pushmark s
# c <#> gv[*hash] s
-# d <1> rv2hv lKRM*/1
+# d <1> rv2hv[t2] lKRM*
# e <2> aassign[t8] KS/COM_AGG
# f <1> leavesub[1 ref] K/REFC,1
EOT_EOT
@@ -398,7 +398,7 @@ EOT_EOT
# goto 7
# b <0> pushmark s
# c <$> gv(*hash) s
-# d <1> rv2hv lKRM*/1
+# d <1> rv2hv[t1] lKRM*
# e <2> aassign[t5] KS/COM_AGG
# f <1> leavesub[1 ref] K/REFC,1
EONT_EONT
@@ -426,7 +426,7 @@ checkOptree(note => q{},
# goto 7
# a <0> pushmark s
# b <#> gv[*hash] s
-# c <1> rv2hv lKRM*/1
+# c <1> rv2hv[t2] lKRM*
# d <2> aassign[t6] KS/COM_AGG
# e <#> gv[*array] s
# f <1> rv2av[t8] K/1
@@ -445,7 +445,7 @@ EOT_EOT
# goto 7
# a <0> pushmark s
# b <$> gv(*hash) s
-# c <1> rv2hv lKRM*/1
+# c <1> rv2hv[t1] lKRM*
# d <2> aassign[t4] KS/COM_AGG
# e <$> gv(*array) s
# f <1> rv2av[t5] K/1
diff --git a/gnu/usr.bin/perl/ext/B/t/f_sort.t b/gnu/usr.bin/perl/ext/B/t/f_sort.t
index eda5a21cc58..24a9f2e38c6 100755
--- a/gnu/usr.bin/perl/ext/B/t/f_sort.t
+++ b/gnu/usr.bin/perl/ext/B/t/f_sort.t
@@ -13,7 +13,7 @@ BEGIN {
}
}
use OptreeCheck;
-plan tests => 40;
+plan tests => 38;
=head1 f_sort.t
@@ -129,8 +129,7 @@ checkOptree(note => q{},
# 2 <0> pushmark s
# 3 <0> pushmark s
# 4 <#> gv[*files] s
-# 5 <1> rv2av[t9] lK/1 < 5.019002
-# 5 <1> rv2av[t9] lKM/1 >=5.019002
+# 5 <1> rv2av[t9] lKM/1
# 6 <@> sort lKS*
# 7 <0> pushmark s
# 8 <#> gv[*articles] s
@@ -142,8 +141,7 @@ EOT_EOT
# 2 <0> pushmark s
# 3 <0> pushmark s
# 4 <$> gv(*files) s
-# 5 <1> rv2av[t5] lK/1 < 5.019002
-# 5 <1> rv2av[t5] lKM/1 >=5.019002
+# 5 <1> rv2av[t5] lKM/1
# 6 <@> sort lKS*
# 7 <0> pushmark s
# 8 <$> gv(*articles) s
@@ -280,10 +278,8 @@ checkOptree(note => q{},
# 2 <0> pushmark s
# 3 <0> pushmark s
# 4 <#> gv[*age] s
-# 5 <1> rv2hv[t9] lKRM/1 < 5.019006
-# 5 <1> rv2hv lKRM/1 >=5.019006
-# 6 <1> keys[t10] lK/1 < 5.019002
-# 6 <1> keys[t10] lKM/1 >=5.019002
+# 5 <1> rv2hv[t9] lKRM
+# 6 <1> keys[t10] lKM/1
# 7 <@> sort lKS*
# 8 <0> pushmark s
# 9 <#> gv[*eldest] s
@@ -295,10 +291,8 @@ EOT_EOT
# 2 <0> pushmark s
# 3 <0> pushmark s
# 4 <$> gv(*age) s
-# 5 <1> rv2hv[t3] lKRM/1 < 5.019006
-# 5 <1> rv2hv lKRM/1 >=5.019006
-# 6 <1> keys[t4] lK/1 < 5.019002
-# 6 <1> keys[t4] lKM/1 >=5.019002
+# 5 <1> rv2hv[t3] lKRM
+# 6 <1> keys[t4] lKM/1
# 7 <@> sort lKS*
# 8 <0> pushmark s
# 9 <$> gv(*eldest) s
@@ -327,8 +321,7 @@ checkOptree(note => q{},
# 3 <0> pushmark s
# 4 <$> const[PV "byage"] s/BARE
# 5 <#> gv[*class] s
-# 6 <1> rv2av[t4] lK/1 < 5.019002
-# 6 <1> rv2av[t4] lKM/1 >=5.019002
+# 6 <1> rv2av[t4] lKM/1
# 7 <@> sort lKS
# 8 <0> pushmark s
# 9 <#> gv[*sortedclass] s
@@ -341,8 +334,7 @@ EOT_EOT
# 3 <0> pushmark s
# 4 <$> const(PV "byage") s/BARE
# 5 <$> gv(*class) s
-# 6 <1> rv2av[t2] lK/1 < 5.019002
-# 6 <1> rv2av[t2] lKM/1 >=5.019002
+# 6 <1> rv2av[t2] lKM/1
# 7 <@> sort lKS
# 8 <0> pushmark s
# 9 <$> gv(*sortedclass) s
@@ -408,8 +400,7 @@ checkOptree(name => q{sort USERSUB LIST },
# w <0> pushmark s
# x <$> const[PV "backwards"] s/BARE
# y <#> gv[*harry] s
-# z <1> rv2av[t10] lK/1 < 5.019002
-# z <1> rv2av[t10] lKM/1 >=5.019002
+# z <1> rv2av[t10] lKM/1
# 10 <@> sort lKS
# 11 <@> print vK
# 12 <;> nextstate(main 602 (eval 32):5) v:{
@@ -458,8 +449,7 @@ EOT_EOT
# w <0> pushmark s
# x <$> const(PV "backwards") s/BARE
# y <$> gv(*harry) s
-# z <1> rv2av[t6] lK/1 < 5.019002
-# z <1> rv2av[t6] lKM/1 >=5.019002
+# z <1> rv2av[t6] lKM/1
# 10 <@> sort lKS
# 11 <@> print vK
# 12 <;> nextstate(main 602 (eval 32):5) v:{
@@ -516,7 +506,7 @@ checkOptree(name => q{Compound sort/map Expression },
# b <;> nextstate(main 608 (eval 34):2) v:{
# c <0> pushmark s
# d <#> gvsv[*_] s
-# e </> match(/"=(\\d+)"/) l/RTIME
+# e </> match(/"=(\\d+)"/) l
# f <#> gvsv[*_] s
# g <1> uc[t17] sK/1
# h <@> anonlist sK*/1
@@ -546,7 +536,7 @@ EOT_EOT
# b <;> nextstate(main 608 (eval 34):2) v:{
# c <0> pushmark s
# d <$> gvsv(*_) s
-# e </> match(/"=(\\d+)"/) l/RTIME
+# e </> match(/"=(\\d+)"/) l
# f <$> gvsv(*_) s
# g <1> uc[t9] sK/1
# h <@> anonlist sK*/1
@@ -586,8 +576,7 @@ checkOptree(name => q{sort other::sub LIST },
# 3 <0> pushmark s
# 4 <$> const[PV "other::backwards"] s/BARE
# 5 <#> gv[*old] s
-# 6 <1> rv2av[t4] lK/1 < 5.019002
-# 6 <1> rv2av[t4] lKM/1 >=5.019002
+# 6 <1> rv2av[t4] lKM/1
# 7 <@> sort lKS
# 8 <0> pushmark s
# 9 <#> gv[*new] s
@@ -600,8 +589,7 @@ EOT_EOT
# 3 <0> pushmark s
# 4 <$> const(PV "other::backwards") s/BARE
# 5 <$> gv(*old) s
-# 6 <1> rv2av[t2] lK/1 < 5.019002
-# 6 <1> rv2av[t2] lKM/1 >=5.019002
+# 6 <1> rv2av[t2] lKM/1
# 7 <@> sort lKS
# 8 <0> pushmark s
# 9 <$> gv(*new) s
@@ -628,8 +616,7 @@ checkOptree(note => q{},
# 3 <0> pushmark s
# 4 <$> const[PV "other::backwards"] s/BARE
# 5 <#> gv[*old] s
-# 6 <1> rv2av[t4] lK/1 < 5.019002
-# 6 <1> rv2av[t4] lKM/1 >=5.019002
+# 6 <1> rv2av[t4] lKM/1
# 7 <@> sort lKS
# 8 <0> pushmark s
# 9 <#> gv[*new] s
@@ -642,8 +629,7 @@ EOT_EOT
# 3 <0> pushmark s
# 4 <$> const(PV "other::backwards") s/BARE
# 5 <$> gv(*old) s
-# 6 <1> rv2av[t2] lK/1 < 5.019002
-# 6 <1> rv2av[t2] lKM/1 >=5.019002
+# 6 <1> rv2av[t2] lKM/1
# 7 <@> sort lKS
# 8 <0> pushmark s
# 9 <$> gv(*new) s
@@ -666,8 +652,7 @@ my ($expect, $expect_nt) = (<<'EOT_EOT', <<'EONT_EONT');
# 2 <0> pushmark s
# 3 <0> pushmark s
# 4 <#> gv[*old] s
-# 5 <1> rv2av[t9] lK/1 < 5.019002
-# 5 <1> rv2av[t9] lKM/1 >=5.019002
+# 5 <1> rv2av[t9] lKM/1
# 6 <@> sort lKS*/STABLE
# 7 <0> pushmark s
# 8 <#> gv[*new] s
@@ -679,8 +664,7 @@ EOT_EOT
# 2 <0> pushmark s
# 3 <0> pushmark s
# 4 <$> gv(*old) s
-# 5 <1> rv2av[t5] lK/1 < 5.019002
-# 5 <1> rv2av[t5] lKM/1 >=5.019002
+# 5 <1> rv2av[t5] lKM/1
# 6 <@> sort lKS*/STABLE
# 7 <0> pushmark s
# 8 <$> gv(*new) s
@@ -697,46 +681,6 @@ checkOptree(note => q{},
=for gentest
-# chunk: # force use of mergesort (not portable outside Perl 5.8)
-use sort '_mergesort';
-@new = sort { substr($a, 3, 5) cmp substr($b, 3, 5) } @old;
-
-=cut
-
-checkOptree(note => q{},
- bcopts => q{-exec},
- code => q{use sort '_mergesort'; @new = sort { substr($a, 3, 5) cmp substr($b, 3, 5) } @old; },
- expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
-# 1 <;> nextstate(main 662 (eval 42):1) v:%,{
-# 2 <0> pushmark s
-# 3 <0> pushmark s
-# 4 <#> gv[*old] s
-# 5 <1> rv2av[t9] lK/1 < 5.019002
-# 5 <1> rv2av[t9] lKM/1 >=5.019002
-# 6 <@> sort lKS*
-# 7 <0> pushmark s
-# 8 <#> gv[*new] s
-# 9 <1> rv2av[t2] lKRM*/1
-# a <2> aassign[t14] KS/COM_AGG
-# b <1> leavesub[1 ref] K/REFC,1
-EOT_EOT
-# 1 <;> nextstate(main 578 (eval 15):1) v:%,{
-# 2 <0> pushmark s
-# 3 <0> pushmark s
-# 4 <$> gv(*old) s
-# 5 <1> rv2av[t5] lK/1 < 5.019002
-# 5 <1> rv2av[t5] lKM/1 >=5.019002
-# 6 <@> sort lKS*
-# 7 <0> pushmark s
-# 8 <$> gv(*new) s
-# 9 <1> rv2av[t1] lKRM*/1
-# a <2> aassign[t6] KS/COM_AGG
-# b <1> leavesub[1 ref] K/REFC,1
-EONT_EONT
-
-
-=for gentest
-
# chunk: # you should have a good reason to do this!
@articles = sort {$FooPack::b <=> $FooPack::a} @files;
@@ -750,8 +694,7 @@ checkOptree(note => q{},
# 2 <0> pushmark s
# 3 <0> pushmark s
# 4 <#> gv[*files] s
-# 5 <1> rv2av[t7] lK/1 < 5.019002
-# 5 <1> rv2av[t7] lKM/1 >=5.019002
+# 5 <1> rv2av[t7] lKM/1
# 6 <@> sort lKS*
# 7 <0> pushmark s
# 8 <#> gv[*articles] s
@@ -763,8 +706,7 @@ EOT_EOT
# 2 <0> pushmark s
# 3 <0> pushmark s
# 4 <$> gv(*files) s
-# 5 <1> rv2av[t3] lK/1 < 5.019002
-# 5 <1> rv2av[t3] lKM/1 >=5.019002
+# 5 <1> rv2av[t3] lKM/1
# 6 <@> sort lKS*
# 7 <0> pushmark s
# 8 <$> gv(*articles) s
@@ -791,13 +733,11 @@ checkOptree(note => q{},
# 4 <0> pushmark s
# 5 <#> gv[*input] s
# 6 <1> rv2av[t9] lKM/1
-# 7 <@> grepstart lK* < 5.017002
-# 7 <@> grepstart lK >=5.017002
+# 7 <@> grepstart lK
# 8 <|> grepwhile(other->9)[t10] lK
# 9 <#> gvsv[*_] s
# a <#> gvsv[*_] s
# b <2> eq sK/2
-# - <@> scope sK < 5.017002
# goto 8
# c <@> sort lK/NUM
# d <0> pushmark s
@@ -812,13 +752,11 @@ EOT_EOT
# 4 <0> pushmark s
# 5 <$> gv(*input) s
# 6 <1> rv2av[t3] lKM/1
-# 7 <@> grepstart lK* < 5.017002
-# 7 <@> grepstart lK >=5.017002
+# 7 <@> grepstart lK
# 8 <|> grepwhile(other->9)[t4] lK
# 9 <$> gvsv(*_) s
# a <$> gvsv(*_) s
# b <2> eq sK/2
-# - <@> scope sK < 5.017002
# goto 8
# c <@> sort lK/NUM
# d <0> pushmark s
@@ -872,13 +810,11 @@ checkOptree(note => q{},
# 3 <0> pushmark s
# 4 <#> gv[*input] s
# 5 <1> rv2av[t7] lKM/1
-# 6 <@> grepstart lK* < 5.017002
-# 6 <@> grepstart lK >=5.017002
+# 6 <@> grepstart lK
# 7 <|> grepwhile(other->8)[t8] lK
# 8 <#> gvsv[*_] s
# 9 <#> gvsv[*_] s
# a <2> eq sK/2
-# - <@> scope sK < 5.017002
# goto 7
# b <@> sort K/NUM
# c <1> leavesub[1 ref] K/REFC,1
@@ -888,13 +824,11 @@ EOT_EOT
# 3 <0> pushmark s
# 4 <$> gv(*input) s
# 5 <1> rv2av[t2] lKM/1
-# 6 <@> grepstart lK* < 5.017002
-# 6 <@> grepstart lK >=5.017002
+# 6 <@> grepstart lK
# 7 <|> grepwhile(other->8)[t3] lK
# 8 <$> gvsv(*_) s
# 9 <$> gvsv(*_) s
# a <2> eq sK/2
-# - <@> scope sK < 5.017002
# goto 7
# b <@> sort K/NUM
# c <1> leavesub[1 ref] K/REFC,1
@@ -947,13 +881,11 @@ checkOptree(note => q{},
# 3 <0> pushmark s
# 4 <#> gv[*input] s
# 5 <1> rv2av[t8] lKM/1
-# 6 <@> grepstart lK* < 5.017002
-# 6 <@> grepstart lK >=5.017002
+# 6 <@> grepstart lK
# 7 <|> grepwhile(other->8)[t9] lK
# 8 <#> gvsv[*_] s
# 9 <#> gvsv[*_] s
# a <2> eq sK/2
-# - <@> scope sK < 5.017002
# goto 7
# b <@> sort sK/NUM
# c <#> gvsv[*s] s
@@ -965,13 +897,11 @@ EOT_EOT
# 3 <0> pushmark s
# 4 <$> gv(*input) s
# 5 <1> rv2av[t2] lKM/1
-# 6 <@> grepstart lK* < 5.017002
-# 6 <@> grepstart lK >=5.017002
+# 6 <@> grepstart lK
# 7 <|> grepwhile(other->8)[t3] lK
# 8 <$> gvsv(*_) s
# 9 <$> gvsv(*_) s
# a <2> eq sK/2
-# - <@> scope sK < 5.017002
# goto 7
# b <@> sort sK/NUM
# c <$> gvsv(*s) s
diff --git a/gnu/usr.bin/perl/ext/B/t/optree_concise.t b/gnu/usr.bin/perl/ext/B/t/optree_concise.t
index 12781acdb82..1e2594703fe 100755
--- a/gnu/usr.bin/perl/ext/B/t/optree_concise.t
+++ b/gnu/usr.bin/perl/ext/B/t/optree_concise.t
@@ -183,13 +183,13 @@ checkOptree ( name => "terse basic",
UNOP (0x82b0918) leavesub [1]
LISTOP (0x82b08d8) lineseq
COP (0x82b0880) nextstate
- UNOP (0x82b0860) null [15]
+ UNOP (0x82b0860) null [14]
PADOP (0x82b0840) gvsv GV (0x82a818c) *a
EOT_EOT
# UNOP (0x8282310) leavesub [1]
# LISTOP (0x82822f0) lineseq
# COP (0x82822b8) nextstate
-# UNOP (0x812fc20) null [15]
+# UNOP (0x812fc20) null [14]
# SVOP (0x812fc00) gvsv GV (0x814692c) *a
EONT_EONT
diff --git a/gnu/usr.bin/perl/ext/B/t/optree_misc.t b/gnu/usr.bin/perl/ext/B/t/optree_misc.t
index 2d6b80f820b..f8ff3ce9689 100644
--- a/gnu/usr.bin/perl/ext/B/t/optree_misc.t
+++ b/gnu/usr.bin/perl/ext/B/t/optree_misc.t
@@ -37,11 +37,11 @@ checkOptree ( name => 'OP_AELEMFAST opclass',
# 3 <;> nextstate(main 636 optree_misc.t:25) v:>,<,%,{ ->4
# 6 <2> add[t6] sK/2 ->7
# - <1> ex-aelem sK/2 ->5
-# 4 <0> aelemfast_lex[@x:634,636] sR/127 ->5
+# 4 <0> aelemfast_lex[@x:634,636] sR/key=127 ->5
# - <0> ex-const s ->-
# - <1> ex-aelem sK/2 ->6
# - <1> ex-rv2av sKR/1 ->-
-# 5 <#> aelemfast[*y] s/128 ->6
+# 5 <#> aelemfast[*y] s/key=128 ->6
# - <0> ex-const s/FOLD ->-
EOT_EOT
# 7 <1> leavesub[1 ref] K/REFC,1 ->(end)
@@ -54,41 +54,18 @@ EOT_EOT
# 3 <;> nextstate(main 636 optree_misc.t:27) v:>,<,%,{ ->4
# 6 <2> add[t4] sK/2 ->7
# - <1> ex-aelem sK/2 ->5
-# 4 <0> aelemfast_lex[@x:634,636] sR/127 ->5
+# 4 <0> aelemfast_lex[@x:634,636] sR/key=127 ->5
# - <0> ex-const s ->-
# - <1> ex-aelem sK/2 ->6
# - <1> ex-rv2av sKR/1 ->-
-# 5 <$> aelemfast(*y) s/128 ->6
+# 5 <$> aelemfast(*y) s/key=128 ->6
# - <0> ex-const s/FOLD ->-
EONT_EONT
checkOptree ( name => 'PMOP children',
code => sub { $foo =~ s/(a)/$1/ },
strip_open_hints => 1,
- ( $] < 5.017002
- ? (expect => <<'EOT_EOT16', expect_nt => <<'EONT_EONT16')
-# 6 <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq KP ->6
-# 1 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->2
-# 3 </> subst(/"(a)"/ replstart->4) KS ->6
-# - <1> ex-rv2sv sKRM/1 ->3
-# 2 <#> gvsv[*foo] s ->3
-# 5 <|> substcont(other->3) sK/1 ->(end)
-# - <1> ex-rv2sv sK/1 ->5
-# 4 <#> gvsv[*1] s ->5
-EOT_EOT16
-# 6 <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq KP ->6
-# 1 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->2
-# 3 </> subst(/"(a)"/ replstart->4) KS ->6
-# - <1> ex-rv2sv sKRM/1 ->3
-# 2 <$> gvsv(*foo) s ->3
-# 5 <|> substcont(other->3) sK/1 ->(end)
-# - <1> ex-rv2sv sK/1 ->5
-# 4 <$> gvsv(*1) s ->5
-EONT_EONT16
-
- : (expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT')));
+ expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->5
# 1 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->2
@@ -149,7 +126,6 @@ checkOptree ( name => 'formats',
bcopts => 'STDOUT',
progfile => $tmpfile,
strip_open_hints => 1,
- skip => ($] < 5.017003),
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# main::STDOUT (FORMAT):
# c <1> leavewrite[1 ref] K/REFC,1 ->(end)
@@ -195,19 +171,18 @@ EONT_EONT
checkOptree ( name => 'padrange',
code => sub { my ($x,$y); @a = ($x,$y); ($x,$y) = @a },
strip_open_hints => 1,
- skip => ($] < 5.017006),
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# f <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->f
# 1 <;> nextstate(main 1 -e:1) v:>,<,% ->2
# - <@> list vKP ->3
-# 2 <0> padrange[$x:1,2; $y:1,2] vM/LVINTRO,2 ->3
+# 2 <0> padrange[$x:1,2; $y:1,2] vM/LVINTRO,range=2 ->3
# - <0> padsv[$x:1,2] vM/LVINTRO ->-
# - <0> padsv[$y:1,2] vM/LVINTRO ->-
# 3 <;> nextstate(main 2 -e:1) v:>,<,% ->4
# 8 <2> aassign[t4] vKS/COM_AGG ->9
# - <1> ex-list lKP ->5
-# 4 <0> padrange[$x:1,2; $y:1,2] /2 ->5
+# 4 <0> padrange[$x:1,2; $y:1,2] /range=2 ->5
# - <0> padsv[$x:1,2] s ->-
# - <0> padsv[$y:1,2] s ->-
# - <1> ex-list lK ->8
@@ -221,7 +196,7 @@ checkOptree ( name => 'padrange',
# c <1> rv2av[t5] lK/1 ->d
# b <#> gv[*a] s ->c
# - <1> ex-list lKPRM* ->e
-# d <0> padrange[$x:1,2; $y:1,2] RM/2 ->e
+# d <0> padrange[$x:1,2; $y:1,2] RM/range=2 ->e
# - <0> padsv[$x:1,2] sRM* ->-
# - <0> padsv[$y:1,2] sRM* ->-
EOT_EOT
@@ -229,13 +204,13 @@ EOT_EOT
# - <@> lineseq KP ->f
# 1 <;> nextstate(main 1 -e:1) v:>,<,% ->2
# - <@> list vKP ->3
-# 2 <0> padrange[$x:1,2; $y:1,2] vM/LVINTRO,2 ->3
+# 2 <0> padrange[$x:1,2; $y:1,2] vM/LVINTRO,range=2 ->3
# - <0> padsv[$x:1,2] vM/LVINTRO ->-
# - <0> padsv[$y:1,2] vM/LVINTRO ->-
# 3 <;> nextstate(main 2 -e:1) v:>,<,% ->4
# 8 <2> aassign[t4] vKS/COM_AGG ->9
# - <1> ex-list lKP ->5
-# 4 <0> padrange[$x:1,2; $y:1,2] /2 ->5
+# 4 <0> padrange[$x:1,2; $y:1,2] /range=2 ->5
# - <0> padsv[$x:1,2] s ->-
# - <0> padsv[$y:1,2] s ->-
# - <1> ex-list lK ->8
@@ -249,7 +224,7 @@ EOT_EOT
# c <1> rv2av[t5] lK/1 ->d
# b <$> gv(*a) s ->c
# - <1> ex-list lKPRM* ->e
-# d <0> padrange[$x:1,2; $y:1,2] RM/2 ->e
+# d <0> padrange[$x:1,2; $y:1,2] RM/range=2 ->e
# - <0> padsv[$x:1,2] sRM* ->-
# - <0> padsv[$y:1,2] sRM* ->-
EONT_EONT
@@ -261,14 +236,13 @@ checkOptree ( name => 'padrange and @_',
my ($e,$f) = @_;
},
strip_open_hints => 1,
- skip => ($] < 5.017006),
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# d <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->d
# 1 <;> nextstate(main 1 p3:1) v:>,<,% ->2
# 3 <2> aassign[t5] vKS ->4
# - <1> ex-list lK ->-
-# 2 <0> padrange[$a:1,4; $b:1,4] */LVINTRO,2 ->3
+# 2 <0> padrange[$a:1,4; $b:1,4] */LVINTRO,range=2 ->3
# - <1> rv2av[t4] lK/1 ->-
# - <#> gv[*_] s ->-
# - <1> ex-list lKPRM* ->3
@@ -282,13 +256,13 @@ checkOptree ( name => 'padrange and @_',
# 7 <1> rv2av[t9] lK/1 ->8
# 6 <#> gv[*X::_] s ->7
# - <1> ex-list lKPRM* ->9
-# 8 <0> padrange[$c:2,4; $d:2,4] RM/LVINTRO,2 ->9
+# 8 <0> padrange[$c:2,4; $d:2,4] RM/LVINTRO,range=2 ->9
# - <0> padsv[$c:2,4] sRM*/LVINTRO ->-
# - <0> padsv[$d:2,4] sRM*/LVINTRO ->-
# a <;> nextstate(Y 3 p3:4) v:>,<,%,{ ->b
# c <2> aassign[t15] KS ->d
# - <1> ex-list lK ->-
-# b <0> padrange[$e:3,4; $f:3,4] */LVINTRO,2 ->c
+# b <0> padrange[$e:3,4; $f:3,4] */LVINTRO,range=2 ->c
# - <1> rv2av[t14] lK/1 ->-
# - <#> gv[*_] s ->-
# - <1> ex-list lKPRM* ->c
@@ -301,7 +275,7 @@ EOT_EOT
# 1 <;> nextstate(main 1 p3:1) v:>,<,% ->2
# 3 <2> aassign[t5] vKS ->4
# - <1> ex-list lK ->-
-# 2 <0> padrange[$a:1,4; $b:1,4] */LVINTRO,2 ->3
+# 2 <0> padrange[$a:1,4; $b:1,4] */LVINTRO,range=2 ->3
# - <1> rv2av[t4] lK/1 ->-
# - <$> gv(*_) s ->-
# - <1> ex-list lKPRM* ->3
@@ -315,13 +289,13 @@ EOT_EOT
# 7 <1> rv2av[t9] lK/1 ->8
# 6 <$> gv(*X::_) s ->7
# - <1> ex-list lKPRM* ->9
-# 8 <0> padrange[$c:2,4; $d:2,4] RM/LVINTRO,2 ->9
+# 8 <0> padrange[$c:2,4; $d:2,4] RM/LVINTRO,range=2 ->9
# - <0> padsv[$c:2,4] sRM*/LVINTRO ->-
# - <0> padsv[$d:2,4] sRM*/LVINTRO ->-
# a <;> nextstate(Y 3 p3:4) v:>,<,%,{ ->b
# c <2> aassign[t15] KS ->d
# - <1> ex-list lK ->-
-# b <0> padrange[$e:3,4; $f:3,4] */LVINTRO,2 ->c
+# b <0> padrange[$e:3,4; $f:3,4] */LVINTRO,range=2 ->c
# - <1> rv2av[t14] lK/1 ->-
# - <$> gv(*_) s ->-
# - <1> ex-list lKPRM* ->c
@@ -333,13 +307,12 @@ EONT_EONT
checkOptree ( name => 'consolidate padranges',
code => sub { my ($a,$b); my ($c,$d); 1 },
strip_open_hints => 1,
- skip => ($] < 5.017006),
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->5
# 1 <;> nextstate(main 900 optree_misc.t:334) v:>,<,% ->2
# - <@> list vKP ->-
-# 2 <0> padrange[$a:900,902; $b:900,902; $c:901,902; $d:901,902] vM/LVINTRO,4 ->3
+# 2 <0> padrange[$a:900,902; $b:900,902; $c:901,902; $d:901,902] vM/LVINTRO,range=4 ->3
# - <0> padsv[$a:900,902] vM/LVINTRO ->-
# - <0> padsv[$b:900,902] vM/LVINTRO ->-
# - <;> nextstate(main 901 optree_misc.t:334) v:>,<,% ->-
@@ -354,7 +327,7 @@ EOT_EOT
# - <@> lineseq KP ->5
# 1 <;> nextstate(main 900 optree_misc.t:334) v:>,<,% ->2
# - <@> list vKP ->-
-# 2 <0> padrange[$a:900,902; $b:900,902; $c:901,902; $d:901,902] vM/LVINTRO,4 ->3
+# 2 <0> padrange[$a:900,902; $b:900,902; $c:901,902; $d:901,902] vM/LVINTRO,range=4 ->3
# - <0> padsv[$a:900,902] vM/LVINTRO ->-
# - <0> padsv[$b:900,902] vM/LVINTRO ->-
# - <;> nextstate(main 901 optree_misc.t:334) v:>,<,% ->-
@@ -371,13 +344,12 @@ checkOptree ( name => 'consolidate padranges and singletons',
code => sub { my ($a,$b); my $c; my ($d,$e);
my @f; my $g; my ($h,$i); my %j; 1 },
strip_open_hints => 1,
- skip => ($] < 5.017006),
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->5
# 1 <;> nextstate(main 903 optree_misc.t:371) v:>,<,% ->2
# - <@> list vKP ->-
-# 2 <0> padrange[$a:903,910; $b:903,910; $c:904,910; $d:905,910; $e:905,910; @f:906,910; $g:907,910; $h:908,910; $i:908,910; %j:909,910] vM/LVINTRO,10 ->3
+# 2 <0> padrange[$a:903,910; $b:903,910; $c:904,910; $d:905,910; $e:905,910; @f:906,910; $g:907,910; $h:908,910; $i:908,910; %j:909,910] vM/LVINTRO,range=10 ->3
# - <0> padsv[$a:903,910] vM/LVINTRO ->-
# - <0> padsv[$b:903,910] vM/LVINTRO ->-
# - <;> nextstate(main 904 optree_misc.t:371) v:>,<,% ->-
@@ -405,7 +377,7 @@ EOT_EOT
# - <@> lineseq KP ->5
# 1 <;> nextstate(main 903 optree_misc.t:371) v:>,<,% ->2
# - <@> list vKP ->-
-# 2 <0> padrange[$a:903,910; $b:903,910; $c:904,910; $d:905,910; $e:905,910; @f:906,910; $g:907,910; $h:908,910; $i:908,910; %j:909,910] vM/LVINTRO,10 ->3
+# 2 <0> padrange[$a:903,910; $b:903,910; $c:904,910; $d:905,910; $e:905,910; @f:906,910; $g:907,910; $h:908,910; $i:908,910; %j:909,910] vM/LVINTRO,range=10 ->3
# - <0> padsv[$a:903,910] vM/LVINTRO ->-
# - <0> padsv[$b:903,910] vM/LVINTRO ->-
# - <;> nextstate(main 904 optree_misc.t:371) v:>,<,% ->-
@@ -438,12 +410,12 @@ checkOptree ( name => 'm?x?',
# 3 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->3
# 1 <;> nextstate(main 914 optree_misc.t:434) v:>,<,%,{ ->2
-# 2 </> match(/"x"/) /RTIME ->3
+# 2 </> match(/"x"/) ->3
EOT_EOT
# 3 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->3
# 1 <;> nextstate(main 914 optree_misc.t:434) v:>,<,%,{ ->2
-# 2 </> match(/"x"/) /RTIME ->3
+# 2 </> match(/"x"/) ->3
EONT_EONT
diff --git a/gnu/usr.bin/perl/ext/B/t/optree_samples.t b/gnu/usr.bin/perl/ext/B/t/optree_samples.t
index c6288d940b7..15b5799ce08 100755
--- a/gnu/usr.bin/perl/ext/B/t/optree_samples.t
+++ b/gnu/usr.bin/perl/ext/B/t/optree_samples.t
@@ -240,38 +240,36 @@ checkOptree ( name => '-exec sub { foreach (1..10) {print "foo $_"} }',
# 3 <$> const[IV 1] s
# 4 <$> const[IV 10] s
# 5 <#> gv[*_] s
-# 6 <{> enteriter(next->d last->g redo->7) KS/DEF
-# e <0> iter s
-# f <|> and(other->7) K/1
-# 7 <;> nextstate(main 442 optree.t:158) v:>,<,%
+# 6 <{> enteriter(next->c last->f redo->7) KS/DEF
+# d <0> iter s
+# e <|> and(other->7) K/1
+# 7 <;> nextstate(main 1659 optree_samples.t:234) v:>,<,%
# 8 <0> pushmark s
-# 9 <$> const[PV "foo "] s
-# a <#> gvsv[*_] s
-# b <2> concat[t4] sK/2
-# c <@> print vK
-# d <0> unstack s
-# goto e
-# g <2> leaveloop K/2
-# h <1> leavesub[1 ref] K/REFC,1
+# 9 <#> gvsv[*_] s
+# a <+> multiconcat("foo ",4,-1)[t5] sK/STRINGIFY
+# b <@> print vK
+# c <0> unstack s
+# goto d
+# f <2> leaveloop K/2
+# g <1> leavesub[1 ref] K/REFC,1
EOT_EOT
# 1 <;> nextstate(main 444 optree_samples.t:182) v:>,<,%
# 2 <0> pushmark s
# 3 <$> const(IV 1) s
# 4 <$> const(IV 10) s
# 5 <$> gv(*_) s
-# 6 <{> enteriter(next->d last->g redo->7) KS/DEF
-# e <0> iter s
-# f <|> and(other->7) K/1
+# 6 <{> enteriter(next->c last->f redo->7) KS/DEF
+# d <0> iter s
+# e <|> and(other->7) K/1
# 7 <;> nextstate(main 443 optree_samples.t:182) v:>,<,%
# 8 <0> pushmark s
-# 9 <$> const(PV "foo ") s
-# a <$> gvsv(*_) s
-# b <2> concat[t3] sK/2
-# c <@> print vK
-# d <0> unstack s
-# goto e
-# g <2> leaveloop K/2
-# h <1> leavesub[1 ref] K/REFC,1
+# 9 <$> gvsv(*_) s
+# a <+> multiconcat("foo ",4,-1)[t4] sK/STRINGIFY
+# b <@> print vK
+# c <0> unstack s
+# goto d
+# f <2> leaveloop K/2
+# g <1> leavesub[1 ref] K/REFC,1
EONT_EONT
checkOptree ( name => '-basic sub { print "foo $_" foreach (1..10) }',
@@ -279,55 +277,53 @@ checkOptree ( name => '-basic sub { print "foo $_" foreach (1..10) }',
bcopts => '-basic',
strip_open_hints => 1,
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
-# g <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq KP ->g
+# f <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->f
# 1 <;> nextstate(main 445 optree.t:167) v:>,<,% ->2
-# f <2> leaveloop K/2 ->g
-# 6 <{> enteriter(next->c last->f redo->7) KS/DEF ->d
+# e <2> leaveloop K/2 ->f
+# 6 <{> enteriter(next->b last->e redo->7) KS/DEF ->c
# - <0> ex-pushmark s ->2
# - <1> ex-list lK ->5
# 2 <0> pushmark s ->3
# 3 <$> const[IV 1] s ->4
# 4 <$> const[IV 10] s ->5
# 5 <#> gv[*_] s ->6
-# - <1> null K/1 ->f
-# e <|> and(other->7) K/1 ->f
-# d <0> iter s ->e
+# - <1> null K/1 ->e
+# d <|> and(other->7) K/1 ->e
+# c <0> iter s ->d
# - <@> lineseq sK ->-
-# b <@> print vK ->c
+# a <@> print vK ->b
# 7 <0> pushmark s ->8
-# - <1> ex-stringify sK/1 ->b
-# - <0> ex-pushmark s ->8
-# a <2> concat[t2] sK/2 ->b
-# 8 <$> const[PV "foo "] s ->9
-# - <1> ex-rv2sv sK/1 ->a
-# 9 <#> gvsv[*_] s ->a
-# c <0> unstack s ->d
+# 9 <+> multiconcat("foo ",4,-1)[t3] sK/STRINGIFY ->a
+# - <0> ex-pushmark s ->-
+# - <0> ex-const s ->8
+# - <1> ex-rv2sv sK/1 ->9
+# 8 <#> gvsv[*_] s ->9
+# b <0> unstack s ->c
EOT_EOT
-# g <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq KP ->g
+# f <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->f
# 1 <;> nextstate(main 446 optree_samples.t:192) v:>,<,% ->2
-# f <2> leaveloop K/2 ->g
-# 6 <{> enteriter(next->c last->f redo->7) KS/DEF ->d
+# e <2> leaveloop K/2 ->f
+# 6 <{> enteriter(next->b last->e redo->7) KS/DEF ->c
# - <0> ex-pushmark s ->2
# - <1> ex-list lK ->5
# 2 <0> pushmark s ->3
# 3 <$> const(IV 1) s ->4
# 4 <$> const(IV 10) s ->5
# 5 <$> gv(*_) s ->6
-# - <1> null K/1 ->f
-# e <|> and(other->7) K/1 ->f
-# d <0> iter s ->e
+# - <1> null K/1 ->e
+# d <|> and(other->7) K/1 ->e
+# c <0> iter s ->d
# - <@> lineseq sK ->-
-# b <@> print vK ->c
+# a <@> print vK ->b
# 7 <0> pushmark s ->8
-# - <1> ex-stringify sK/1 ->b
-# - <0> ex-pushmark s ->8
-# a <2> concat[t1] sK/2 ->b
-# 8 <$> const(PV "foo ") s ->9
-# - <1> ex-rv2sv sK/1 ->a
-# 9 <$> gvsv(*_) s ->a
-# c <0> unstack s ->d
+# 9 <+> multiconcat("foo ",4,-1)[t2] sK/STRINGIFY ->a
+# - <0> ex-pushmark s ->-
+# - <0> ex-const s ->8
+# - <1> ex-rv2sv sK/1 ->9
+# 8 <$> gvsv(*_) s ->9
+# b <0> unstack s ->c
EONT_EONT
checkOptree ( name => '-exec -e foreach (1..10) {print qq{foo $_}}',
@@ -341,19 +337,18 @@ checkOptree ( name => '-exec -e foreach (1..10) {print qq{foo $_}}',
# 4 <$> const[IV 1] s
# 5 <$> const[IV 10] s
# 6 <#> gv[*_] s
-# 7 <{> enteriter(next->e last->h redo->8) vKS/DEF
-# f <0> iter s
-# g <|> and(other->8) vK/1
+# 7 <{> enteriter(next->d last->g redo->8) vKS/DEF
+# e <0> iter s
+# f <|> and(other->8) vK/1
# 8 <;> nextstate(main 1 -e:1) v:>,<,%
# 9 <0> pushmark s
-# a <$> const[PV "foo "] s
-# b <#> gvsv[*_] s
-# c <2> concat[t4] sK/2
-# d <@> print vK
-# e <0> unstack v
-# goto f
-# h <2> leaveloop vK/2
-# i <@> leave[1 ref] vKP/REFC
+# a <#> gvsv[*_] s
+# b <+> multiconcat("foo ",4,-1)[t5] sK/STRINGIFY
+# c <@> print vK
+# d <0> unstack v
+# goto e
+# g <2> leaveloop vK/2
+# h <@> leave[1 ref] vKP/REFC
EOT_EOT
# 1 <0> enter
# 2 <;> nextstate(main 2 -e:1) v:>,<,%,{
@@ -361,19 +356,18 @@ EOT_EOT
# 4 <$> const(IV 1) s
# 5 <$> const(IV 10) s
# 6 <$> gv(*_) s
-# 7 <{> enteriter(next->e last->h redo->8) vKS/DEF
-# f <0> iter s
-# g <|> and(other->8) vK/1
+# 7 <{> enteriter(next->d last->g redo->8) vKS/DEF
+# e <0> iter s
+# f <|> and(other->8) vK/1
# 8 <;> nextstate(main 1 -e:1) v:>,<,%
# 9 <0> pushmark s
-# a <$> const(PV "foo ") s
-# b <$> gvsv(*_) s
-# c <2> concat[t3] sK/2
-# d <@> print vK
-# e <0> unstack v
-# goto f
-# h <2> leaveloop vK/2
-# i <@> leave[1 ref] vKP/REFC
+# a <$> gvsv(*_) s
+# b <+> multiconcat("foo ",4,-1)[t4] sK/STRINGIFY
+# c <@> print vK
+# d <0> unstack v
+# goto e
+# g <2> leaveloop vK/2
+# h <@> leave[1 ref] vKP/REFC
EONT_EONT
checkOptree ( name => '-exec sub { print "foo $_" foreach (1..10) }',
@@ -386,36 +380,34 @@ checkOptree ( name => '-exec sub { print "foo $_" foreach (1..10) }',
# 3 <$> const[IV 1] s
# 4 <$> const[IV 10] s
# 5 <#> gv[*_] s
-# 6 <{> enteriter(next->c last->f redo->7) KS/DEF
-# d <0> iter s
-# e <|> and(other->7) K/1
+# 6 <{> enteriter(next->b last->e redo->7) KS/DEF
+# c <0> iter s
+# d <|> and(other->7) K/1
# 7 <0> pushmark s
-# 8 <$> const[PV "foo "] s
-# 9 <#> gvsv[*_] s
-# a <2> concat[t2] sK/2
-# b <@> print vK
-# c <0> unstack s
-# goto d
-# f <2> leaveloop K/2
-# g <1> leavesub[1 ref] K/REFC,1
+# 8 <#> gvsv[*_] s
+# 9 <+> multiconcat("foo ",4,-1)[t3] sK/STRINGIFY
+# a <@> print vK
+# b <0> unstack s
+# goto c
+# e <2> leaveloop K/2
+# f <1> leavesub[1 ref] K/REFC,1
EOT_EOT
# 1 <;> nextstate(main 447 optree_samples.t:252) v:>,<,%
# 2 <0> pushmark s
# 3 <$> const(IV 1) s
# 4 <$> const(IV 10) s
# 5 <$> gv(*_) s
-# 6 <{> enteriter(next->c last->f redo->7) KS/DEF
-# d <0> iter s
-# e <|> and(other->7) K/1
+# 6 <{> enteriter(next->b last->e redo->7) KS/DEF
+# c <0> iter s
+# d <|> and(other->7) K/1
# 7 <0> pushmark s
-# 8 <$> const(PV "foo ") s
-# 9 <$> gvsv(*_) s
-# a <2> concat[t1] sK/2
-# b <@> print vK
-# c <0> unstack s
-# goto d
-# f <2> leaveloop K/2
-# g <1> leavesub[1 ref] K/REFC,1
+# 8 <$> gvsv(*_) s
+# 9 <+> multiconcat("foo ",4,-1)[t2] sK/STRINGIFY
+# a <@> print vK
+# b <0> unstack s
+# goto c
+# e <2> leaveloop K/2
+# f <1> leavesub[1 ref] K/REFC,1
EONT_EONT
pass("GREP: SAMPLES FROM PERLDOC -F GREP");
@@ -431,7 +423,7 @@ checkOptree ( name => '@foo = grep(!/^\#/, @bar)',
# 5 <1> rv2av[t4] lKM/1
# 6 <@> grepstart lK
# 7 <|> grepwhile(other->8)[t5] lK
-# 8 </> match(/"^#"/) s/RTIME
+# 8 </> match(/"^#"/) s
# 9 <1> not sK/1
# goto 7
# a <0> pushmark s
@@ -447,7 +439,7 @@ EOT_EOT
# 5 <1> rv2av[t2] lKM/1
# 6 <@> grepstart lK
# 7 <|> grepwhile(other->8)[t3] lK
-# 8 </> match(/"^\\#"/) s/RTIME
+# 8 </> match(/"^\\#"/) s
# 9 <1> not sK/1
# goto 7
# a <0> pushmark s
@@ -469,8 +461,7 @@ checkOptree ( name => '%h = map { getkey($_) => $_ } @a',
# 3 <0> pushmark s
# 4 <#> gv[*a] s
# 5 <1> rv2av[t8] lKM/1
-# 6 <@> mapstart lK* < 5.017002
-# 6 <@> mapstart lK >=5.017002
+# 6 <@> mapstart lK
# 7 <|> mapwhile(other->8)[t9] lK
# 8 <0> enter l
# 9 <;> nextstate(main 500 (eval 22):1) v:{
@@ -483,8 +474,7 @@ checkOptree ( name => '%h = map { getkey($_) => $_ } @a',
# goto 7
# g <0> pushmark s
# h <#> gv[*h] s
-# i <1> rv2hv[t2] lKRM*/1 < 5.019006
-# i <1> rv2hv lKRM*/1 >=5.019006
+# i <1> rv2hv[t2] lKRM*
# j <2> aassign[t10] KS/COM_AGG
# k <1> leavesub[1 ref] K/REFC,1
EOT_EOT
@@ -493,8 +483,7 @@ EOT_EOT
# 3 <0> pushmark s
# 4 <$> gv(*a) s
# 5 <1> rv2av[t3] lKM/1
-# 6 <@> mapstart lK* < 5.017002
-# 6 <@> mapstart lK >=5.017002
+# 6 <@> mapstart lK
# 7 <|> mapwhile(other->8)[t4] lK
# 8 <0> enter l
# 9 <;> nextstate(main 500 (eval 22):1) v:{
@@ -507,8 +496,7 @@ EOT_EOT
# goto 7
# g <0> pushmark s
# h <$> gv(*h) s
-# i <1> rv2hv[t1] lKRM*/1 < 5.019006
-# i <1> rv2hv lKRM*/1 >=5.019006
+# i <1> rv2hv[t1] lKRM*
# j <2> aassign[t5] KS/COM_AGG
# k <1> leavesub[1 ref] K/REFC,1
EONT_EONT
@@ -521,8 +509,7 @@ checkOptree ( name => '%h=(); for $_(@a){$h{getkey($_)} = $_}',
# 2 <0> pushmark s
# 3 <0> pushmark s
# 4 <#> gv[*h] s
-# 5 <1> rv2hv[t2] lKRM*/1 < 5.019006
-# 5 <1> rv2hv lKRM*/1 >=5.019006
+# 5 <1> rv2hv[t2] lKRM*
# 6 <2> aassign[t3] vKS
# 7 <;> nextstate(main 506 (eval 24):1) v:{
# 8 <0> pushmark sM
@@ -536,7 +523,7 @@ checkOptree ( name => '%h=(); for $_(@a){$h{getkey($_)} = $_}',
# e <;> nextstate(main 505 (eval 24):1) v:{
# f <#> gvsv[*_] s
# g <#> gv[*h] s
-# h <1> rv2hv sKR/1
+# h <1> rv2hv sKR
# i <0> pushmark s
# j <#> gvsv[*_] s
# k <#> gv[*getkey] s/EARLYCV
@@ -552,8 +539,7 @@ EOT_EOT
# 2 <0> pushmark s
# 3 <0> pushmark s
# 4 <$> gv(*h) s
-# 5 <1> rv2hv[t1] lKRM*/1 < 5.019006
-# 5 <1> rv2hv lKRM*/1 >=5.019006
+# 5 <1> rv2hv[t1] lKRM*
# 6 <2> aassign[t2] vKS
# 7 <;> nextstate(main 506 (eval 24):1) v:{
# 8 <0> pushmark sM
@@ -567,7 +553,7 @@ EOT_EOT
# e <;> nextstate(main 505 (eval 24):1) v:{
# f <$> gvsv(*_) s
# g <$> gv(*h) s
-# h <1> rv2hv sKR/1
+# h <1> rv2hv sKR
# i <0> pushmark s
# j <$> gvsv(*_) s
# k <$> gv(*getkey) s/EARLYCV
@@ -586,7 +572,7 @@ checkOptree ( name => 'map $_+42, 10..20',
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# 1 <;> nextstate(main 497 (eval 20):1) v
# 2 <0> pushmark s
-# 3 <$> const[AV ] s
+# 3 <$> const[AV ARRAY] s
# 4 <1> rv2av lKPM/1
# 5 <@> mapstart K
# 6 <|> mapwhile(other->7)[t5] K
@@ -598,7 +584,7 @@ checkOptree ( name => 'map $_+42, 10..20',
EOT_EOT
# 1 <;> nextstate(main 511 (eval 26):1) v
# 2 <0> pushmark s
-# 3 <$> const(AV ) s
+# 3 <$> const(AV ARRAY) s
# 4 <1> rv2av lKPM/1
# 5 <@> mapstart K
# 6 <|> mapwhile(other->7)[t4] K
@@ -619,16 +605,14 @@ checkOptree ( name => '-e use constant j => qq{junk}; print j',
# 1 <0> enter
# 2 <;> nextstate(main 71 -e:1) v:>,<,%,{
# 3 <0> pushmark s
-# 4 <$> const[PV "junk"] s* < 5.017002
-# 4 <$> const[PV "junk"] s*/FOLD >=5.017002
+# 4 <$> const[PV "junk"] s*/FOLD
# 5 <@> print vK
# 6 <@> leave[1 ref] vKP/REFC
EOT_EOT
# 1 <0> enter
# 2 <;> nextstate(main 71 -e:1) v:>,<,%,{
# 3 <0> pushmark s
-# 4 <$> const(PV "junk") s* < 5.017002
-# 4 <$> const(PV "junk") s*/FOLD >=5.017002
+# 4 <$> const(PV "junk") s*/FOLD
# 5 <@> print vK
# 6 <@> leave[1 ref] vKP/REFC
EONT_EONT
@@ -710,13 +694,13 @@ checkOptree ( name => 'my $a; my @b; my %c; return 1',
bcopts => '-exec',
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# 1 <;> nextstate(main 991 (eval 17):1) v
-# 2 <0> padrange[$a:991,994; @b:992,994; %c:993,994] vM/LVINTRO,3
+# 2 <0> padrange[$a:991,994; @b:992,994; %c:993,994] vM/LVINTRO,range=3
# 3 <;> nextstate(main 994 (eval 17):1) v:{
# 4 <$> const[IV 1] s
# 5 <1> leavesub[1 ref] K/REFC,1
EOT_EOT
# 1 <;> nextstate(main 991 (eval 17):1) v
-# 2 <0> padrange[$a:991,994; @b:992,994; %c:993,994] vM/LVINTRO,3
+# 2 <0> padrange[$a:991,994; @b:992,994; %c:993,994] vM/LVINTRO,range=3
# 3 <;> nextstate(main 994 (eval 17):1) v:{
# 4 <$> const(IV 1) s
# 5 <1> leavesub[1 ref] K/REFC,1
diff --git a/gnu/usr.bin/perl/ext/B/t/optree_specials.t b/gnu/usr.bin/perl/ext/B/t/optree_specials.t
index d7200db9894..96e430e3030 100755
--- a/gnu/usr.bin/perl/ext/B/t/optree_specials.t
+++ b/gnu/usr.bin/perl/ext/B/t/optree_specials.t
@@ -6,6 +6,12 @@
# output is matched losely. If the match fails even though the "got" and
# "expected" output look exactly the same, then watch for trailing, invisible
# spaces.
+#
+# Note that if this test is mysteriously failing smokes and is hard to
+# reproduce, try running with LC_ALL=en_US.UTF-8 PERL_UNICODE="".
+# This causes nextstate ops to have a bunch of extra hint info, which
+# needs adding to the expected output (for both thraded and non-threaded
+# versions)
BEGIN {
unshift @INC, 't';
@@ -39,108 +45,183 @@ checkOptree ( name => 'BEGIN',
prog => $src,
strip_open_hints => 1,
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
-# BEGIN 1:
-# a <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq KP ->a
-# 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,x*,x&,x$,$ ->2
-# 3 <1> require sK/1 ->4
-# 2 <$> const[PV "strict.pm"] s/BARE ->3
-# - <;> ex-nextstate(B::Concise -837 Concise.pm:366) v:*,&,{,x*,x&,x$,$ ->4
-# - <@> lineseq K ->-
-# 4 <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,x*,x&,x$,$ ->5
-# 9 <1> entersub[t1] KS*/TARG,STRICT ->a
-# 5 <0> pushmark s ->6
-# 6 <$> const[PV "strict"] sM ->7
-# 7 <$> const[PV "refs"] sM ->8
-# 8 <.> method_named[PV "unimport"] ->9
+# - <@> lineseq KP ->7
+# 1 <;> nextstate(B::Concise -1151 Concise.pm:116) v:*,&,{,x*,x&,x$,$ ->2
+# 6 <2> sassign sKS/2 ->7
+# 4 <1> srefgen sK/1 ->5
+# - <1> ex-list lKRM ->4
+# 3 <1> rv2gv sKRM/STRICT,1 ->4
+# 2 <#> gv[*STDOUT] s ->3
+# - <1> ex-rv2sv sKRM*/STRICT,1 ->6
+# 5 <#> gvsv[*B::Concise::walkHandle] s ->6
# BEGIN 2:
-# k <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq K ->k
-# b <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,x*,x&,x$,$ ->c
-# d <1> require sK/1 ->e
-# c <$> const[PV "strict.pm"] s/BARE ->d
-# - <;> ex-nextstate(B::Concise -812 Concise.pm:386) v:*,&,x*,x&,x$,$ ->e
+# h <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq K ->h
+# 8 <;> nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$ ->9
+# a <1> require sK/1 ->b
+# 9 <$> const[PV "strict.pm"] s/BARE ->a
+# - <;> ex-nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$ ->b
# - <@> lineseq K ->-
-# e <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,x*,x&,x$,$ ->f
-# j <1> entersub[t1] KS*/TARG,STRICT ->k
-# f <0> pushmark s ->g
-# g <$> const[PV "strict"] sM ->h
-# h <$> const[PV "refs"] sM ->i
-# i <.> method_named[PV "unimport"] ->j
+# b <;> nextstate(B::Concise -1113 Concise.pm:181) :*,&,x*,x&,x$,$ ->c
+# g <1> entersub[t1] KRS*/TARG,STRICT ->h
+# c <0> pushmark s ->d
+# d <$> const[PV "strict"] sM ->e
+# e <$> const[PV "refs"] sM ->f
+# f <.> method_named[PV "unimport"] ->g
# BEGIN 3:
-# u <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq KP ->u
-# l <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,x*,x&,x$,$ ->m
-# n <1> require sK/1 ->o
-# m <$> const[PV "warnings.pm"] s/BARE ->n
-# - <;> ex-nextstate(B::Concise -798 Concise.pm:406) v:*,&,{,x*,x&,x$,$ ->o
+# r <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq K ->r
+# i <;> nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$ ->j
+# k <1> require sK/1 ->l
+# j <$> const[PV "strict.pm"] s/BARE ->k
+# - <;> ex-nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$ ->l
# - <@> lineseq K ->-
-# o <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,x*,x&,x$,$ ->p
-# t <1> entersub[t1] KS*/TARG,STRICT ->u
-# p <0> pushmark s ->q
-# q <$> const[PV "warnings"] sM ->r
-# r <$> const[PV "qw"] sM ->s
-# s <.> method_named[PV "unimport"] ->t
+# l <;> nextstate(B::Concise -1010 Concise.pm:303) :*,&,x*,x&,x$,$ ->m
+# q <1> entersub[t1] KRS*/TARG,STRICT ->r
+# m <0> pushmark s ->n
+# n <$> const[PV "strict"] sM ->o
+# o <$> const[PV "refs"] sM ->p
+# p <.> method_named[PV "unimport"] ->q
# BEGIN 4:
-# y <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq KP ->y
-# v <;> nextstate(main 2 -e:1) v:>,<,%,{ ->w
-# x <1> postinc[t3] sK/1 ->y
-# - <1> ex-rv2sv sKRM/1 ->x
-# w <#> gvsv[*beg] s ->x
+# 11 <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->11
+# s <;> nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$ ->t
+# u <1> require sK/1 ->v
+# t <$> const[PV "strict.pm"] s/BARE ->u
+# - <;> ex-nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$ ->v
+# - <@> lineseq K ->-
+# v <;> nextstate(B::Concise -963 Concise.pm:368) :*,&,{,x*,x&,x$,$ ->w
+# 10 <1> entersub[t1] KRS*/TARG,STRICT ->11
+# w <0> pushmark s ->x
+# x <$> const[PV "strict"] sM ->y
+# y <$> const[PV "refs"] sM ->z
+# z <.> method_named[PV "unimport"] ->10
+# BEGIN 5:
+# 1b <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq K ->1b
+# 12 <;> nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$ ->13
+# 14 <1> require sK/1 ->15
+# 13 <$> const[PV "strict.pm"] s/BARE ->14
+# - <;> ex-nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$ ->15
+# - <@> lineseq K ->-
+# 15 <;> nextstate(B::Concise -938 Concise.pm:388) :*,&,x*,x&,x$,$ ->16
+# 1a <1> entersub[t1] KRS*/TARG,STRICT ->1b
+# 16 <0> pushmark s ->17
+# 17 <$> const[PV "strict"] sM ->18
+# 18 <$> const[PV "refs"] sM ->19
+# 19 <.> method_named[PV "unimport"] ->1a
+# BEGIN 6:
+# 1l <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->1l
+# 1c <;> nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$ ->1d
+# 1e <1> require sK/1 ->1f
+# 1d <$> const[PV "warnings.pm"] s/BARE ->1e
+# - <;> ex-nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$ ->1f
+# - <@> lineseq K ->-
+# 1f <;> nextstate(B::Concise -924 Concise.pm:408) :*,&,{,x*,x&,x$,$ ->1g
+# 1k <1> entersub[t1] KRS*/TARG,STRICT ->1l
+# 1g <0> pushmark s ->1h
+# 1h <$> const[PV "warnings"] sM ->1i
+# 1i <$> const[PV "qw"] sM ->1j
+# 1j <.> method_named[PV "unimport"] ->1k
+# BEGIN 7:
+# 1p <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->1p
+# 1m <;> nextstate(main 3 -e:1) v:>,<,%,{ ->1n
+# 1o <1> postinc[t3] sK/1 ->1p
+# - <1> ex-rv2sv sKRM/1 ->1o
+# 1n <#> gvsv[*beg] s ->1o
EOT_EOT
# BEGIN 1:
-# a <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq KP ->a
-# 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,x*,x&,x$,$ ->2
-# 3 <1> require sK/1 ->4
-# 2 <$> const(PV "strict.pm") s/BARE ->3
-# - <;> ex-nextstate(B::Concise -837 Concise.pm:366) v:*,&,{,x*,x&,x$,$ ->4
-# - <@> lineseq K ->-
-# 4 <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,x*,x&,x$,$ ->5
-# 9 <1> entersub[t1] KS*/TARG,STRICT ->a
-# 5 <0> pushmark s ->6
-# 6 <$> const(PV "strict") sM ->7
-# 7 <$> const(PV "refs") sM ->8
-# 8 <.> method_named(PV "unimport") ->9
+# 7 <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->7
+# 1 <;> nextstate(B::Concise -1151 Concise.pm:116) v:*,&,{,x*,x&,x$,$ ->2
+# 6 <2> sassign sKS/2 ->7
+# 4 <1> srefgen sK/1 ->5
+# - <1> ex-list lKRM ->4
+# 3 <1> rv2gv sKRM/STRICT,1 ->4
+# 2 <$> gv(*STDOUT) s ->3
+# - <1> ex-rv2sv sKRM*/STRICT,1 ->6
+# 5 <$> gvsv(*B::Concise::walkHandle) s ->6
# BEGIN 2:
-# k <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq K ->k
-# b <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,x*,x&,x$,$ ->c
-# d <1> require sK/1 ->e
-# c <$> const(PV "strict.pm") s/BARE ->d
-# - <;> ex-nextstate(B::Concise -812 Concise.pm:386) v:*,&,x*,x&,x$,$ ->e
+# h <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq K ->h
+# 8 <;> nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$ ->9
+# a <1> require sK/1 ->b
+# 9 <$> const(PV "strict.pm") s/BARE ->a
+# - <;> ex-nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$ ->b
# - <@> lineseq K ->-
-# e <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,x*,x&,x$,$ ->f
-# j <1> entersub[t1] KS*/TARG,STRICT ->k
-# f <0> pushmark s ->g
-# g <$> const(PV "strict") sM ->h
-# h <$> const(PV "refs") sM ->i
-# i <.> method_named(PV "unimport") ->j
+# b <;> nextstate(B::Concise -1113 Concise.pm:181) :*,&,x*,x&,x$,$ ->c
+# g <1> entersub[t1] KRS*/TARG,STRICT ->h
+# c <0> pushmark s ->d
+# d <$> const(PV "strict") sM ->e
+# e <$> const(PV "refs") sM ->f
+# f <.> method_named(PV "unimport") ->g
# BEGIN 3:
-# u <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq KP ->u
-# l <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,x*,x&,x$,$ ->m
-# n <1> require sK/1 ->o
-# m <$> const(PV "warnings.pm") s/BARE ->n
-# - <;> ex-nextstate(B::Concise -798 Concise.pm:406) v:*,&,{,x*,x&,x$,$ ->o
+# r <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq K ->r
+# i <;> nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$ ->j
+# k <1> require sK/1 ->l
+# j <$> const(PV "strict.pm") s/BARE ->k
+# - <;> ex-nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$ ->l
# - <@> lineseq K ->-
-# o <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,x*,x&,x$,$ ->p
-# t <1> entersub[t1] KS*/TARG,STRICT ->u
-# p <0> pushmark s ->q
-# q <$> const(PV "warnings") sM ->r
-# r <$> const(PV "qw") sM ->s
-# s <.> method_named(PV "unimport") ->t
+# l <;> nextstate(B::Concise -1010 Concise.pm:303) :*,&,x*,x&,x$,$ ->m
+# q <1> entersub[t1] KRS*/TARG,STRICT ->r
+# m <0> pushmark s ->n
+# n <$> const(PV "strict") sM ->o
+# o <$> const(PV "refs") sM ->p
+# p <.> method_named(PV "unimport") ->q
# BEGIN 4:
-# y <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq KP ->y
-# v <;> nextstate(main 2 -e:1) v:>,<,%,{ ->w
-# x <1> postinc[t2] sK/1 ->y
-# - <1> ex-rv2sv sKRM/1 ->x
-# w <$> gvsv(*beg) s ->x
+# 11 <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->11
+# s <;> nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$ ->t
+# u <1> require sK/1 ->v
+# t <$> const(PV "strict.pm") s/BARE ->u
+# - <;> ex-nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$ ->v
+# - <@> lineseq K ->-
+# v <;> nextstate(B::Concise -963 Concise.pm:368) :*,&,{,x*,x&,x$,$ ->w
+# 10 <1> entersub[t1] KRS*/TARG,STRICT ->11
+# w <0> pushmark s ->x
+# x <$> const(PV "strict") sM ->y
+# y <$> const(PV "refs") sM ->z
+# z <.> method_named(PV "unimport") ->10
+# BEGIN 5:
+# 1b <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq K ->1b
+# 12 <;> nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$ ->13
+# 14 <1> require sK/1 ->15
+# 13 <$> const(PV "strict.pm") s/BARE ->14
+# - <;> ex-nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$ ->15
+# - <@> lineseq K ->-
+# 15 <;> nextstate(B::Concise -938 Concise.pm:388) :*,&,x*,x&,x$,$ ->16
+# 1a <1> entersub[t1] KRS*/TARG,STRICT ->1b
+# 16 <0> pushmark s ->17
+# 17 <$> const(PV "strict") sM ->18
+# 18 <$> const(PV "refs") sM ->19
+# 19 <.> method_named(PV "unimport") ->1a
+# BEGIN 6:
+# 1l <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->1l
+# 1c <;> nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$ ->1d
+# 1e <1> require sK/1 ->1f
+# 1d <$> const(PV "warnings.pm") s/BARE ->1e
+# - <;> ex-nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$ ->1f
+# - <@> lineseq K ->-
+# 1f <;> nextstate(B::Concise -924 Concise.pm:408) :*,&,{,x*,x&,x$,$ ->1g
+# 1k <1> entersub[t1] KRS*/TARG,STRICT ->1l
+# 1g <0> pushmark s ->1h
+# 1h <$> const(PV "warnings") sM ->1i
+# 1i <$> const(PV "qw") sM ->1j
+# 1j <.> method_named(PV "unimport") ->1k
+# BEGIN 7:
+# 1p <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->1p
+# 1m <;> nextstate(main 3 -e:1) v:>,<,%,{ ->1n
+# 1o <1> postinc[t2] sK/1 ->1p
+# - <1> ex-rv2sv sKRM/1 ->1o
+# 1n <$> gvsv(*beg) s ->1o
EONT_EONT
-
checkOptree ( name => 'END',
bcopts => 'END',
prog => $src,
@@ -163,7 +244,6 @@ EOT_EOT
# 2 <$> gvsv(*end) s ->3
EONT_EONT
-
checkOptree ( name => 'CHECK',
bcopts => 'CHECK',
prog => $src,
@@ -231,205 +311,321 @@ EOT_EOT
# 2 <$> gvsv(*init) s ->3
EONT_EONT
-
checkOptree ( name => 'all of BEGIN END INIT CHECK UNITCHECK -exec',
bcopts => [qw/ BEGIN END INIT CHECK UNITCHECK -exec /],
prog => $src,
strip_open_hints => 1,
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# BEGIN 1:
-# 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,x*,x&,x$,$
-# 2 <$> const[PV "strict.pm"] s/BARE
-# 3 <1> require sK/1
-# 4 <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,x*,x&,x$,$
-# 5 <0> pushmark s
-# 6 <$> const[PV "strict"] sM
-# 7 <$> const[PV "refs"] sM
-# 8 <.> method_named[PV "unimport"]
-# 9 <1> entersub[t1] KS*/TARG,STRICT
-# a <1> leavesub[1 ref] K/REFC,1
+# 1 <;> nextstate(B::Concise -1151 Concise.pm:116) v:*,&,{,x*,x&,x$,$
+# 2 <#> gv[*STDOUT] s
+# 3 <1> rv2gv sKRM/STRICT,1
+# 4 <1> srefgen sK/1
+# 5 <#> gvsv[*B::Concise::walkHandle] s
+# 6 <2> sassign sKS/2
+# 7 <1> leavesub[1 ref] K/REFC,1
# BEGIN 2:
-# b <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,x*,x&,x$,$
-# c <$> const[PV "strict.pm"] s/BARE
-# d <1> require sK/1
-# e <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,x*,x&,x$,$
-# f <0> pushmark s
-# g <$> const[PV "strict"] sM
-# h <$> const[PV "refs"] sM
-# i <.> method_named[PV "unimport"]
-# j <1> entersub[t1] KS*/TARG,STRICT
-# k <1> leavesub[1 ref] K/REFC,1
+# 8 <;> nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$
+# 9 <$> const[PV "strict.pm"] s/BARE
+# a <1> require sK/1
+# b <;> nextstate(B::Concise -1113 Concise.pm:181) :*,&,x*,x&,x$,$
+# c <0> pushmark s
+# d <$> const[PV "strict"] sM
+# e <$> const[PV "refs"] sM
+# f <.> method_named[PV "unimport"]
+# g <1> entersub[t1] KRS*/TARG,STRICT
+# h <1> leavesub[1 ref] K/REFC,1
# BEGIN 3:
-# l <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,x*,x&,x$,$
-# m <$> const[PV "warnings.pm"] s/BARE
-# n <1> require sK/1
-# o <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,x*,x&,x$,$
-# p <0> pushmark s
-# q <$> const[PV "warnings"] sM
-# r <$> const[PV "qw"] sM
-# s <.> method_named[PV "unimport"]
-# t <1> entersub[t1] KS*/TARG,STRICT
-# u <1> leavesub[1 ref] K/REFC,1
+# i <;> nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$
+# j <$> const[PV "strict.pm"] s/BARE
+# k <1> require sK/1
+# l <;> nextstate(B::Concise -1010 Concise.pm:303) :*,&,x*,x&,x$,$
+# m <0> pushmark s
+# n <$> const[PV "strict"] sM
+# o <$> const[PV "refs"] sM
+# p <.> method_named[PV "unimport"]
+# q <1> entersub[t1] KRS*/TARG,STRICT
+# r <1> leavesub[1 ref] K/REFC,1
# BEGIN 4:
-# v <;> nextstate(main 2 -e:1) v:>,<,%,{
-# w <#> gvsv[*beg] s
-# x <1> postinc[t3] sK/1
-# y <1> leavesub[1 ref] K/REFC,1
+# s <;> nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$
+# t <$> const[PV "strict.pm"] s/BARE
+# u <1> require sK/1
+# v <;> nextstate(B::Concise -963 Concise.pm:368) :*,&,{,x*,x&,x$,$
+# w <0> pushmark s
+# x <$> const[PV "strict"] sM
+# y <$> const[PV "refs"] sM
+# z <.> method_named[PV "unimport"]
+# 10 <1> entersub[t1] KRS*/TARG,STRICT
+# 11 <1> leavesub[1 ref] K/REFC,1
+# BEGIN 5:
+# 12 <;> nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$
+# 13 <$> const[PV "strict.pm"] s/BARE
+# 14 <1> require sK/1
+# 15 <;> nextstate(B::Concise -938 Concise.pm:388) :*,&,x*,x&,x$,$
+# 16 <0> pushmark s
+# 17 <$> const[PV "strict"] sM
+# 18 <$> const[PV "refs"] sM
+# 19 <.> method_named[PV "unimport"]
+# 1a <1> entersub[t1] KRS*/TARG,STRICT
+# 1b <1> leavesub[1 ref] K/REFC,1
+# BEGIN 6:
+# 1c <;> nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$
+# 1d <$> const[PV "warnings.pm"] s/BARE
+# 1e <1> require sK/1
+# 1f <;> nextstate(B::Concise -924 Concise.pm:408) :*,&,{,x*,x&,x$,$
+# 1g <0> pushmark s
+# 1h <$> const[PV "warnings"] sM
+# 1i <$> const[PV "qw"] sM
+# 1j <.> method_named[PV "unimport"]
+# 1k <1> entersub[t1] KRS*/TARG,STRICT
+# 1l <1> leavesub[1 ref] K/REFC,1
+# BEGIN 7:
+# 1m <;> nextstate(main 3 -e:1) v:>,<,%,{
+# 1n <#> gvsv[*beg] s
+# 1o <1> postinc[t3] sK/1
+# 1p <1> leavesub[1 ref] K/REFC,1
# END 1:
-# z <;> nextstate(main 5 -e:1) v:>,<,%,{
-# 10 <#> gvsv[*end] s
-# 11 <1> postinc[t3] sK/1
-# 12 <1> leavesub[1 ref] K/REFC,1
+# 1q <;> nextstate(main 9 -e:1) v:>,<,%,{
+# 1r <#> gvsv[*end] s
+# 1s <1> postinc[t3] sK/1
+# 1t <1> leavesub[1 ref] K/REFC,1
# INIT 1:
-# 13 <;> nextstate(main 4 -e:1) v:>,<,%,{
-# 14 <#> gvsv[*init] s
-# 15 <1> postinc[t3] sK/1
-# 16 <1> leavesub[1 ref] K/REFC,1
+# 1u <;> nextstate(main 7 -e:1) v:>,<,%,{
+# 1v <#> gvsv[*init] s
+# 1w <1> postinc[t3] sK/1
+# 1x <1> leavesub[1 ref] K/REFC,1
# CHECK 1:
-# 17 <;> nextstate(main 3 -e:1) v:>,<,%,{
-# 18 <#> gvsv[*chk] s
-# 19 <1> postinc[t3] sK/1
-# 1a <1> leavesub[1 ref] K/REFC,1
+# 1y <;> nextstate(main 5 -e:1) v:>,<,%,{
+# 1z <#> gvsv[*chk] s
+# 20 <1> postinc[t3] sK/1
+# 21 <1> leavesub[1 ref] K/REFC,1
# UNITCHECK 1:
-# 1b <;> nextstate(main 6 -e:1) v:>,<,%,{
-# 1c <#> gvsv[*uc] s
-# 1d <1> postinc[t3] sK/1
-# 1e <1> leavesub[1 ref] K/REFC,1
+# 22 <;> nextstate(main 11 -e:1) v:>,<,%,{
+# 23 <#> gvsv[*uc] s
+# 24 <1> postinc[t3] sK/1
+# 25 <1> leavesub[1 ref] K/REFC,1
EOT_EOT
# BEGIN 1:
-# 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,x*,x&,x$,$
-# 2 <$> const(PV "strict.pm") s/BARE
-# 3 <1> require sK/1
-# 4 <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,x*,x&,x$,$
-# 5 <0> pushmark s
-# 6 <$> const(PV "strict") sM
-# 7 <$> const(PV "refs") sM
-# 8 <.> method_named(PV "unimport")
-# 9 <1> entersub[t1] KS*/TARG,STRICT
-# a <1> leavesub[1 ref] K/REFC,1
+# 1 <;> nextstate(B::Concise -1151 Concise.pm:116) v:*,&,{,x*,x&,x$,$
+# 2 <$> gv(*STDOUT) s
+# 3 <1> rv2gv sKRM/STRICT,1
+# 4 <1> srefgen sK/1
+# 5 <$> gvsv(*B::Concise::walkHandle) s
+# 6 <2> sassign sKS/2
+# 7 <1> leavesub[1 ref] K/REFC,1
# BEGIN 2:
-# b <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,x*,x&,x$,$
-# c <$> const(PV "strict.pm") s/BARE
-# d <1> require sK/1
-# e <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,x*,x&,x$,$
-# f <0> pushmark s
-# g <$> const(PV "strict") sM
-# h <$> const(PV "refs") sM
-# i <.> method_named(PV "unimport")
-# j <1> entersub[t1] KS*/TARG,STRICT
-# k <1> leavesub[1 ref] K/REFC,1
+# 8 <;> nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$
+# 9 <$> const(PV "strict.pm") s/BARE
+# a <1> require sK/1
+# b <;> nextstate(B::Concise -1113 Concise.pm:181) :*,&,x*,x&,x$,$
+# c <0> pushmark s
+# d <$> const(PV "strict") sM
+# e <$> const(PV "refs") sM
+# f <.> method_named(PV "unimport")
+# g <1> entersub[t1] KRS*/TARG,STRICT
+# h <1> leavesub[1 ref] K/REFC,1
# BEGIN 3:
-# l <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,x*,x&,x$,$
-# m <$> const(PV "warnings.pm") s/BARE
-# n <1> require sK/1
-# o <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,x*,x&,x$,$
-# p <0> pushmark s
-# q <$> const(PV "warnings") sM
-# r <$> const(PV "qw") sM
-# s <.> method_named(PV "unimport")
-# t <1> entersub[t1] KS*/TARG,STRICT
-# u <1> leavesub[1 ref] K/REFC,1
+# i <;> nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$
+# j <$> const(PV "strict.pm") s/BARE
+# k <1> require sK/1
+# l <;> nextstate(B::Concise -1010 Concise.pm:303) :*,&,x*,x&,x$,$
+# m <0> pushmark s
+# n <$> const(PV "strict") sM
+# o <$> const(PV "refs") sM
+# p <.> method_named(PV "unimport")
+# q <1> entersub[t1] KRS*/TARG,STRICT
+# r <1> leavesub[1 ref] K/REFC,1
# BEGIN 4:
-# v <;> nextstate(main 2 -e:1) v:>,<,%,{
-# w <$> gvsv(*beg) s
-# x <1> postinc[t2] sK/1
-# y <1> leavesub[1 ref] K/REFC,1
+# s <;> nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$
+# t <$> const(PV "strict.pm") s/BARE
+# u <1> require sK/1
+# v <;> nextstate(B::Concise -963 Concise.pm:368) :*,&,{,x*,x&,x$,$
+# w <0> pushmark s
+# x <$> const(PV "strict") sM
+# y <$> const(PV "refs") sM
+# z <.> method_named(PV "unimport")
+# 10 <1> entersub[t1] KRS*/TARG,STRICT
+# 11 <1> leavesub[1 ref] K/REFC,1
+# BEGIN 5:
+# 12 <;> nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$
+# 13 <$> const(PV "strict.pm") s/BARE
+# 14 <1> require sK/1
+# 15 <;> nextstate(B::Concise -938 Concise.pm:388) :*,&,x*,x&,x$,$
+# 16 <0> pushmark s
+# 17 <$> const(PV "strict") sM
+# 18 <$> const(PV "refs") sM
+# 19 <.> method_named(PV "unimport")
+# 1a <1> entersub[t1] KRS*/TARG,STRICT
+# 1b <1> leavesub[1 ref] K/REFC,1
+# BEGIN 6:
+# 1c <;> nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$
+# 1d <$> const(PV "warnings.pm") s/BARE
+# 1e <1> require sK/1
+# 1f <;> nextstate(B::Concise -924 Concise.pm:408) :*,&,{,x*,x&,x$,$
+# 1g <0> pushmark s
+# 1h <$> const(PV "warnings") sM
+# 1i <$> const(PV "qw") sM
+# 1j <.> method_named(PV "unimport")
+# 1k <1> entersub[t1] KRS*/TARG,STRICT
+# 1l <1> leavesub[1 ref] K/REFC,1
+# BEGIN 7:
+# 1m <;> nextstate(main 3 -e:1) v:>,<,%,{
+# 1n <$> gvsv(*beg) s
+# 1o <1> postinc[t2] sK/1
+# 1p <1> leavesub[1 ref] K/REFC,1
# END 1:
-# z <;> nextstate(main 5 -e:1) v:>,<,%,{
-# 10 <$> gvsv(*end) s
-# 11 <1> postinc[t2] sK/1
-# 12 <1> leavesub[1 ref] K/REFC,1
+# 1q <;> nextstate(main 9 -e:1) v:>,<,%,{
+# 1r <$> gvsv(*end) s
+# 1s <1> postinc[t2] sK/1
+# 1t <1> leavesub[1 ref] K/REFC,1
# INIT 1:
-# 13 <;> nextstate(main 4 -e:1) v:>,<,%,{
-# 14 <$> gvsv(*init) s
-# 15 <1> postinc[t2] sK/1
-# 16 <1> leavesub[1 ref] K/REFC,1
+# 1u <;> nextstate(main 7 -e:1) v:>,<,%,{
+# 1v <$> gvsv(*init) s
+# 1w <1> postinc[t2] sK/1
+# 1x <1> leavesub[1 ref] K/REFC,1
# CHECK 1:
-# 17 <;> nextstate(main 3 -e:1) v:>,<,%,{
-# 18 <$> gvsv(*chk) s
-# 19 <1> postinc[t2] sK/1
-# 1a <1> leavesub[1 ref] K/REFC,1
+# 1y <;> nextstate(main 5 -e:1) v:>,<,%,{
+# 1z <$> gvsv(*chk) s
+# 20 <1> postinc[t2] sK/1
+# 21 <1> leavesub[1 ref] K/REFC,1
# UNITCHECK 1:
-# 1b <;> nextstate(main 6 -e:1) v:>,<,%,{
-# 1c <$> gvsv(*uc) s
-# 1d <1> postinc[t2] sK/1
-# 1e <1> leavesub[1 ref] K/REFC,1
+# 22 <;> nextstate(main 11 -e:1) v:>,<,%,{
+# 23 <$> gvsv(*uc) s
+# 24 <1> postinc[t2] sK/1
+# 25 <1> leavesub[1 ref] K/REFC,1
EONT_EONT
-
# perl "-I../lib" -MO=Concise,BEGIN,CHECK,INIT,END,-exec -e '$a=$b && print q/foo/'
-
-
checkOptree ( name => 'regression test for patch 25352',
bcopts => [qw/ BEGIN END INIT CHECK -exec /],
prog => 'print q/foo/',
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# BEGIN 1:
# 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,x*,x&,x$,$
-# 2 <$> const[PV "strict.pm"] s/BARE
-# 3 <1> require sK/1
-# 4 <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,x*,x&,x$,$
-# 5 <0> pushmark s
-# 6 <$> const[PV "strict"] sM
-# 7 <$> const[PV "refs"] sM
-# 8 <.> method_named[PV "unimport"]
-# 9 <1> entersub[t1] KS*/TARG,STRICT
-# a <1> leavesub[1 ref] K/REFC,1
+# 2 <#> gv[*STDOUT] s
+# 3 <1> rv2gv sKRM/STRICT,1
+# 4 <1> srefgen sK/1
+# 5 <#> gvsv[*B::Concise::walkHandle] s
+# 6 <2> sassign sKS/2
+# 7 <1> leavesub[1 ref] K/REFC,1
# BEGIN 2:
-# b <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,x*,x&,x$,$
-# c <$> const[PV "strict.pm"] s/BARE
-# d <1> require sK/1
-# e <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,x*,x&,x$,$
-# f <0> pushmark s
-# g <$> const[PV "strict"] sM
-# h <$> const[PV "refs"] sM
-# i <.> method_named[PV "unimport"]
-# j <1> entersub[t1] KS*/TARG,STRICT
-# k <1> leavesub[1 ref] K/REFC,1
+# 8 <;> nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$
+# 9 <$> const[PV "strict.pm"] s/BARE
+# a <1> require sK/1
+# b <;> nextstate(B::Concise -1113 Concise.pm:181) :*,&,x*,x&,x$,$
+# c <0> pushmark s
+# d <$> const[PV "strict"] sM
+# e <$> const[PV "refs"] sM
+# f <.> method_named[PV "unimport"]
+# g <1> entersub[t1] KRS*/TARG,STRICT
+# h <1> leavesub[1 ref] K/REFC,1
# BEGIN 3:
-# l <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,x*,x&,x$,$
-# m <$> const[PV "warnings.pm"] s/BARE
-# n <1> require sK/1
-# o <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,x*,x&,x$,$
-# p <0> pushmark s
-# q <$> const[PV "warnings"] sM
-# r <$> const[PV "qw"] sM
-# s <.> method_named[PV "unimport"]
-# t <1> entersub[t1] KS*/TARG,STRICT
-# u <1> leavesub[1 ref] K/REFC,1
+# i <;> nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$
+# j <$> const[PV "strict.pm"] s/BARE
+# k <1> require sK/1
+# l <;> nextstate(B::Concise -1010 Concise.pm:303) :*,&,x*,x&,x$,$
+# m <0> pushmark s
+# n <$> const[PV "strict"] sM
+# o <$> const[PV "refs"] sM
+# p <.> method_named[PV "unimport"]
+# q <1> entersub[t1] KRS*/TARG,STRICT
+# r <1> leavesub[1 ref] K/REFC,1
+# BEGIN 4:
+# s <;> nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$
+# t <$> const[PV "strict.pm"] s/BARE
+# u <1> require sK/1
+# v <;> nextstate(B::Concise -963 Concise.pm:368) :*,&,{,x*,x&,x$,$
+# w <0> pushmark s
+# x <$> const[PV "strict"] sM
+# y <$> const[PV "refs"] sM
+# z <.> method_named[PV "unimport"]
+# 10 <1> entersub[t1] KRS*/TARG,STRICT
+# 11 <1> leavesub[1 ref] K/REFC,1
+# BEGIN 5:
+# 12 <;> nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$
+# 13 <$> const[PV "strict.pm"] s/BARE
+# 14 <1> require sK/1
+# 15 <;> nextstate(B::Concise -938 Concise.pm:388) :*,&,x*,x&,x$,$
+# 16 <0> pushmark s
+# 17 <$> const[PV "strict"] sM
+# 18 <$> const[PV "refs"] sM
+# 19 <.> method_named[PV "unimport"]
+# 1a <1> entersub[t1] KRS*/TARG,STRICT
+# 1b <1> leavesub[1 ref] K/REFC,1
+# BEGIN 6:
+# 1c <;> nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$
+# 1d <$> const[PV "warnings.pm"] s/BARE
+# 1e <1> require sK/1
+# 1f <;> nextstate(B::Concise -924 Concise.pm:408) :*,&,{,x*,x&,x$,$
+# 1g <0> pushmark s
+# 1h <$> const[PV "warnings"] sM
+# 1i <$> const[PV "qw"] sM
+# 1j <.> method_named[PV "unimport"]
+# 1k <1> entersub[t1] KRS*/TARG,STRICT
+# 1l <1> leavesub[1 ref] K/REFC,1
EOT_EOT
# BEGIN 1:
-# 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,x*,x&,x$,$
-# 2 <$> const(PV "strict.pm") s/BARE
-# 3 <1> require sK/1
-# 4 <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,x*,x&,x$,$
-# 5 <0> pushmark s
-# 6 <$> const(PV "strict") sM
-# 7 <$> const(PV "refs") sM
-# 8 <.> method_named(PV "unimport")
-# 9 <1> entersub[t1] KS*/TARG,STRICT
-# a <1> leavesub[1 ref] K/REFC,1
+# 1 <;> nextstate(B::Concise -1151 Concise.pm:116) v:*,&,{,x*,x&,x$,$
+# 2 <$> gv(*STDOUT) s
+# 3 <1> rv2gv sKRM/STRICT,1
+# 4 <1> srefgen sK/1
+# 5 <$> gvsv(*B::Concise::walkHandle) s
+# 6 <2> sassign sKS/2
+# 7 <1> leavesub[1 ref] K/REFC,1
# BEGIN 2:
-# b <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,x*,x&,x$,$
-# c <$> const(PV "strict.pm") s/BARE
-# d <1> require sK/1
-# e <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,x*,x&,x$,$
-# f <0> pushmark s
-# g <$> const(PV "strict") sM
-# h <$> const(PV "refs") sM
-# i <.> method_named(PV "unimport")
-# j <1> entersub[t1] KS*/TARG,STRICT
-# k <1> leavesub[1 ref] K/REFC,1
+# 8 <;> nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$
+# 9 <$> const(PV "strict.pm") s/BARE
+# a <1> require sK/1
+# b <;> nextstate(B::Concise -1113 Concise.pm:181) :*,&,x*,x&,x$,$
+# c <0> pushmark s
+# d <$> const(PV "strict") sM
+# e <$> const(PV "refs") sM
+# f <.> method_named(PV "unimport")
+# g <1> entersub[t1] KRS*/TARG,STRICT
+# h <1> leavesub[1 ref] K/REFC,1
# BEGIN 3:
-# l <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,x*,x&,x$,$
-# m <$> const(PV "warnings.pm") s/BARE
-# n <1> require sK/1
-# o <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,x*,x&,x$,$
-# p <0> pushmark s
-# q <$> const(PV "warnings") sM
-# r <$> const(PV "qw") sM
-# s <.> method_named(PV "unimport")
-# t <1> entersub[t1] KS*/TARG,STRICT
-# u <1> leavesub[1 ref] K/REFC,1
+# i <;> nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$
+# j <$> const(PV "strict.pm") s/BARE
+# k <1> require sK/1
+# l <;> nextstate(B::Concise -1010 Concise.pm:303) :*,&,x*,x&,x$,$
+# m <0> pushmark s
+# n <$> const(PV "strict") sM
+# o <$> const(PV "refs") sM
+# p <.> method_named(PV "unimport")
+# q <1> entersub[t1] KRS*/TARG,STRICT
+# r <1> leavesub[1 ref] K/REFC,1
+# BEGIN 4:
+# s <;> nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$
+# t <$> const(PV "strict.pm") s/BARE
+# u <1> require sK/1
+# v <;> nextstate(B::Concise -963 Concise.pm:368) :*,&,{,x*,x&,x$,$
+# w <0> pushmark s
+# x <$> const(PV "strict") sM
+# y <$> const(PV "refs") sM
+# z <.> method_named(PV "unimport")
+# 10 <1> entersub[t1] KRS*/TARG,STRICT
+# 11 <1> leavesub[1 ref] K/REFC,1
+# BEGIN 5:
+# 12 <;> nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$
+# 13 <$> const(PV "strict.pm") s/BARE
+# 14 <1> require sK/1
+# 15 <;> nextstate(B::Concise -938 Concise.pm:388) :*,&,x*,x&,x$,$
+# 16 <0> pushmark s
+# 17 <$> const(PV "strict") sM
+# 18 <$> const(PV "refs") sM
+# 19 <.> method_named(PV "unimport")
+# 1a <1> entersub[t1] KRS*/TARG,STRICT
+# 1b <1> leavesub[1 ref] K/REFC,1
+# BEGIN 6:
+# 1c <;> nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$
+# 1d <$> const(PV "warnings.pm") s/BARE
+# 1e <1> require sK/1
+# 1f <;> nextstate(B::Concise -924 Concise.pm:408) :*,&,{,x*,x&,x$,$
+# 1g <0> pushmark s
+# 1h <$> const(PV "warnings") sM
+# 1i <$> const(PV "qw") sM
+# 1j <.> method_named(PV "unimport")
+# 1k <1> entersub[t1] KRS*/TARG,STRICT
+# 1l <1> leavesub[1 ref] K/REFC,1
EONT_EONT
diff --git a/gnu/usr.bin/perl/ext/B/t/optree_varinit.t b/gnu/usr.bin/perl/ext/B/t/optree_varinit.t
index 6d2038deb82..5938048f3ab 100755
--- a/gnu/usr.bin/perl/ext/B/t/optree_varinit.t
+++ b/gnu/usr.bin/perl/ext/B/t/optree_varinit.t
@@ -390,14 +390,14 @@ checkOptree ( name => 'my ($a,$b)=()',
# 1 <0> enter
# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{
# 3 <0> pushmark s
-# 4 <0> padrange[$a:1,2; $b:1,2] RM/LVINTRO,2
+# 4 <0> padrange[$a:1,2; $b:1,2] RM/LVINTRO,range=2
# 5 <2> aassign[t3] vKS
# 6 <@> leave[1 ref] vKP/REFC
EOT_EOT
# 1 <0> enter
# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{
# 3 <0> pushmark s
-# 4 <0> padrange[$a:1,2; $b:1,2] RM/LVINTRO,2
+# 4 <0> padrange[$a:1,2; $b:1,2] RM/LVINTRO,range=2
# 5 <2> aassign[t3] vKS
# 6 <@> leave[1 ref] vKP/REFC
EONT_EONT
diff --git a/gnu/usr.bin/perl/ext/B/t/showlex.t b/gnu/usr.bin/perl/ext/B/t/showlex.t
index dd5cdb7f38a..f92ac9ea7ea 100644
--- a/gnu/usr.bin/perl/ext/B/t/showlex.t
+++ b/gnu/usr.bin/perl/ext/B/t/showlex.t
@@ -21,10 +21,8 @@ plan tests => 15;
my $verbose = @ARGV; # set if ANY ARGS
my $a;
-my $Is_VMS = $^O eq 'VMS';
my $path = join " ", map { qq["-I$_"] } @INC;
-$path = '"-I../lib" "-Iperl_root:[lib]"' if $Is_VMS; # gets too long otherwise
my $is_thread = $Config{use5005threads} && $Config{use5005threads} eq 'define';
if ($is_thread) {