summaryrefslogtreecommitdiff
path: root/ext/B
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-11-14 07:48:03 +0000
committerZefram <zefram@fysh.org>2017-11-14 07:48:03 +0000
commiteb32218efcbe5450c9671923c624955355282e18 (patch)
tree159572974d291c41193348c8e0f5ee8beecd6714 /ext/B
parenta1c09dad0dcf10a829797ed9862b81e1b7497f18 (diff)
downloadperl-eb32218efcbe5450c9671923c624955355282e18.tar.gz
rip out Perl version portability from B
B is distributed only with the core, not dual-life, so has no need to be portable between Perl versions.
Diffstat (limited to 'ext/B')
-rw-r--r--ext/B/B.pm87
-rw-r--r--ext/B/B.xs58
-rw-r--r--ext/B/B/Concise.pm33
-rw-r--r--ext/B/t/OptreeCheck.pm34
-rw-r--r--ext/B/t/b.t39
-rw-r--r--ext/B/t/f_sort.t78
-rw-r--r--ext/B/t/optree_constants.t169
-rw-r--r--ext/B/t/optree_misc.t30
-rw-r--r--ext/B/t/optree_samples.t12
-rw-r--r--ext/B/t/terse.t6
10 files changed, 109 insertions, 437 deletions
diff --git a/ext/B/B.pm b/ext/B/B.pm
index 8ceb9fff15..6adbb02930 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -48,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';
@@ -549,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
|
@@ -958,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
@@ -989,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
@@ -1028,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
@@ -1175,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
@@ -1300,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/ext/B/B.xs b/ext/B/B.xs
index a22b02ffed..6211225e22 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -468,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;
@@ -628,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);
@@ -648,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:
@@ -669,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()
@@ -1667,19 +1653,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.)
@@ -1697,38 +1676,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;
@@ -2008,8 +1971,6 @@ I32
CvDEPTH(cv)
B::CV cv
-#ifdef PadlistARRAY
-
B::PADLIST
CvPADLIST(cv)
B::CV cv
@@ -2018,17 +1979,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
@@ -2129,8 +2079,6 @@ HASH(h)
RETVAL
-#ifdef PadlistARRAY
-
MODULE = B PACKAGE = B::PADLIST PREFIX = Padlist
SSize_t
@@ -2190,8 +2138,6 @@ PadlistREFCNT(padlist)
OUTPUT:
RETVAL
-#endif
-
MODULE = B PACKAGE = B::PADNAMELIST PREFIX = Padnamelist
void
diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm
index a9cfb5e62f..9032e9b082 100644
--- a/ext/B/B/Concise.pm
+++ b/ext/B/B/Concise.pm
@@ -717,16 +717,9 @@ 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",
@@ -938,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") {
@@ -1111,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)
@@ -1717,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/ext/B/t/OptreeCheck.pm b/ext/B/t/OptreeCheck.pm
index fb215c227b..53236c91d4 100644
--- a/ext/B/t/OptreeCheck.pm
+++ b/ext/B/t/OptreeCheck.pm
@@ -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
diff --git a/ext/B/t/b.t b/ext/B/t/b.t
index c976793e29..09dba39b1d 100644
--- a/ext/B/t/b.t
+++ b/ext/B/t/b.t
@@ -121,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");
@@ -193,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);
@@ -326,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;
@@ -359,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';
@@ -442,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';
@@ -465,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/ext/B/t/f_sort.t b/ext/B/t/f_sort.t
index 45dcd93ed5..ccee813fc8 100644
--- a/ext/B/t/f_sort.t
+++ b/ext/B/t/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
@@ -281,8 +279,7 @@ checkOptree(note => q{},
# 3 <0> pushmark s
# 4 <#> gv[*age] s
# 5 <1> rv2hv[t9] lKRM
-# 6 <1> keys[t10] lK/1 < 5.019002
-# 6 <1> keys[t10] lKM/1 >=5.019002
+# 6 <1> keys[t10] lKM/1
# 7 <@> sort lKS*
# 8 <0> pushmark s
# 9 <#> gv[*eldest] s
@@ -295,8 +292,7 @@ EOT_EOT
# 3 <0> pushmark s
# 4 <$> gv(*age) s
# 5 <1> rv2hv[t3] lKRM
-# 6 <1> keys[t4] lK/1 < 5.019002
-# 6 <1> keys[t4] lKM/1 >=5.019002
+# 6 <1> keys[t4] lKM/1
# 7 <@> sort lKS*
# 8 <0> pushmark s
# 9 <$> gv(*eldest) s
@@ -325,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
@@ -339,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
@@ -406,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:{
@@ -456,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:{
@@ -584,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
@@ -598,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
@@ -626,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
@@ -640,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
@@ -664,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
@@ -677,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
@@ -709,8 +695,7 @@ checkOptree(note => q{},
# 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*
# 7 <0> pushmark s
# 8 <#> gv[*new] s
@@ -722,8 +707,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*
# 7 <0> pushmark s
# 8 <$> gv(*new) s
@@ -748,8 +732,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
@@ -761,8 +744,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
@@ -789,13 +771,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
@@ -810,13 +790,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
@@ -870,13 +848,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
@@ -886,13 +862,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
@@ -945,13 +919,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
@@ -963,13 +935,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/ext/B/t/optree_constants.t b/ext/B/t/optree_constants.t
index c139bc2eab..a8073164db 100644
--- a/ext/B/t/optree_constants.t
+++ b/ext/B/t/optree_constants.t
@@ -56,34 +56,28 @@ sub myyes() { 1==1 }
sub myno () { return 1!=1 }
sub pi () { 3.14159 };
-my $RV_class = $] >= 5.011 ? 'IV' : 'RV';
-
my $want = { # expected types, how value renders in-line, todos (maybe)
mystr => [ 'PV', '"'.mystr.'"' ],
- myhref => [ $RV_class, '\\\\HASH'],
+ myhref => [ 'IV', '\\\\HASH'],
pi => [ 'NV', pi ],
- myglob => [ $RV_class, '\\\\' ],
- mysub => [ $RV_class, '\\\\&main::ok' ],
- myunsub => [ $RV_class, '\\\\&main::nosuch' ],
- myanonsub => [ $RV_class, '\\\\CODE' ],
- mylexsub => [ $RV_class, '\\\\&lleexx' ],
- tsub0 => [ $RV_class, '\\\\&main::tsub0' ],
- tsub1 => [ $RV_class, '\\\\&main::tsub1' ],
- tsub2 => [ $RV_class, '\\\\&t::tsub2' ],
- tsub3 => [ $RV_class, '\\\\&t::tsub3' ],
- tsub4 => [ $RV_class, '\\\\&t::tsub4' ],
- tsub5 => [ $RV_class, '\\\\&t::tsub5' ],
+ myglob => [ 'IV', '\\\\' ],
+ mysub => [ 'IV', '\\\\&main::ok' ],
+ myunsub => [ 'IV', '\\\\&main::nosuch' ],
+ myanonsub => [ 'IV', '\\\\CODE' ],
+ mylexsub => [ 'IV', '\\\\&lleexx' ],
+ tsub0 => [ 'IV', '\\\\&main::tsub0' ],
+ tsub1 => [ 'IV', '\\\\&main::tsub1' ],
+ tsub2 => [ 'IV', '\\\\&t::tsub2' ],
+ tsub3 => [ 'IV', '\\\\&t::tsub3' ],
+ tsub4 => [ 'IV', '\\\\&t::tsub4' ],
+ tsub5 => [ 'IV', '\\\\&t::tsub5' ],
# these are not inlined, at least not per BC::Concise
- #myyes => [ $RV_class, ],
- #myno => [ $RV_class, ],
- myaref => [ $RV_class, '\\\\ARRAY' ],
+ #myyes => [ 'IV', ],
+ #myno => [ 'IV', ],
+ myaref => [ 'IV', '\\\\ARRAY' ],
myfl => [ 'NV', myfl ],
myint => [ 'IV', myint ],
- $] >= 5.011 ? (
- myrex => [ $RV_class, '\\\\"\\(?^:Foo\\)"' ],
- ) : (
- myrex => [ $RV_class, '\\\\' ],
- ),
+ myrex => [ 'IV', '\\\\"\\(?^:Foo\\)"' ],
myundef => [ 'NULL', ],
};
@@ -129,14 +123,12 @@ for $func (sort keys %$want) {
3 <1> leavesub[2 refs] K/REFC,1 ->(end)
- <\@> lineseq KP ->3
1 <;> dbstate(main 833 (eval 44):1) v ->2
-2 <\$> const[$want->{$func}[0] $want->{$func}[1]] s* ->3 < 5.017002
-2 <\$> const[$want->{$func}[0] $want->{$func}[1]] s*/FOLD ->3 >=5.017002
+2 <\$> const[$want->{$func}[0] $want->{$func}[1]] s*/FOLD ->3
EOT_EOT
3 <1> leavesub[2 refs] K/REFC,1 ->(end)
- <\@> lineseq KP ->3
1 <;> dbstate(main 833 (eval 44):1) v ->2
-2 <\$> const($want->{$func}[0] $want->{$func}[1]) s* ->3 < 5.017002
-2 <\$> const($want->{$func}[0] $want->{$func}[1]) s*/FOLD ->3 >=5.017002
+2 <\$> const($want->{$func}[0] $want->{$func}[1]) s*/FOLD ->3
EONT_EONT
}
@@ -164,16 +156,14 @@ checkOptree ( name => 'myyes() as coderef',
# 2 <;> nextstate(main 2 -e:1) v:>,<,%,{ ->3
# 5 <@> print vK ->6
# 3 <0> pushmark s ->4
-# 4 <$> const[SPECIAL sv_yes] s* ->5 < 5.017002
-# 4 <$> const[SPECIAL sv_yes] s*/FOLD ->5 >=5.017002
+# 4 <$> const[SPECIAL sv_yes] s*/FOLD ->5
EOT_EOT
# 6 <@> leave[1 ref] vKP/REFC ->(end)
# 1 <0> enter ->2
# 2 <;> nextstate(main 2 -e:1) v:>,<,%,{ ->3
# 5 <@> print vK ->6
# 3 <0> pushmark s ->4
-# 4 <$> const(SPECIAL sv_yes) s* ->5 < 5.017002
-# 4 <$> const(SPECIAL sv_yes) s*/FOLD ->5 >=5.017002
+# 4 <$> const(SPECIAL sv_yes) s*/FOLD ->5
EONT_EONT
@@ -190,33 +180,18 @@ checkOptree ( name => 'myno() as coderef',
# 2 <;> nextstate(main 2 -e:1) v:>,<,%,{ ->3
# 5 <@> print vK ->6
# 3 <0> pushmark s ->4
-# 4 <$> const[SPECIAL sv_no] s* ->5 < 5.017002
-# 4 <$> const[SPECIAL sv_no] s*/FOLD ->5 >=5.017002
+# 4 <$> const[SPECIAL sv_no] s*/FOLD ->5
EOT_EOT
# 6 <@> leave[1 ref] vKP/REFC ->(end)
# 1 <0> enter ->2
# 2 <;> nextstate(main 2 -e:1) v:>,<,%,{ ->3
# 5 <@> print vK ->6
# 3 <0> pushmark s ->4
-# 4 <$> const(SPECIAL sv_no) s* ->5 < 5.017002
-# 4 <$> const(SPECIAL sv_no) s*/FOLD ->5 >=5.017002
+# 4 <$> const(SPECIAL sv_no) s*/FOLD ->5
EONT_EONT
-my ($expect, $expect_nt) =
- $] >= 5.019003
- ? (" is a constant sub, optimized to a AV\n") x 2
- : (<<'EOT_EOT', <<'EONT_EONT');
-# 3 <1> leavesub[2 refs] K/REFC,1 ->(end)
-# - <@> lineseq K ->3
-# 1 <;> nextstate(constant 61 constant.pm:118) v:*,&,x*,x&,x$ ->2
-# 2 <0> padav[@list:FAKE:m:96] ->3
-EOT_EOT
-# 3 <1> leavesub[2 refs] K/REFC,1 ->(end)
-# - <@> lineseq K ->3
-# 1 <;> nextstate(constant 61 constant.pm:118) v:*,&,x*,x&,x$ ->2
-# 2 <0> padav[@list:FAKE:m:71] ->3
-EONT_EONT
+my ($expect, $expect_nt) = (" is a constant sub, optimized to a AV\n") x 2;
checkOptree ( name => 'constant sub returning list',
@@ -237,14 +212,10 @@ my ($expect, $expect_nt) = (<<'EOT_EOT', <<'EONT_EONT');
# 8 <@> prtf sK ->9
# 2 <0> pushmark sM ->3
# 3 <$> const[PV "myint %d mystr %s myfl %f pi %f\n"] sM/FOLD ->4
-# 4 <$> const[IV 42] sM* ->5 < 5.017002
-# 5 <$> const[PV "hithere"] sM* ->6 < 5.017002
-# 6 <$> const[NV 1.414213] sM* ->7 < 5.017002
-# 7 <$> const[NV 3.14159] sM* ->8 < 5.017002
-# 4 <$> const[IV 42] sM*/FOLD ->5 >=5.017002
-# 5 <$> const[PV "hithere"] sM*/FOLD ->6 >=5.017002
-# 6 <$> const[NV 1.414213] sM*/FOLD ->7 >=5.017002
-# 7 <$> const[NV 3.14159] sM*/FOLD ->8 >=5.017002
+# 4 <$> const[IV 42] sM*/FOLD ->5
+# 5 <$> const[PV "hithere"] sM*/FOLD ->6
+# 6 <$> const[NV 1.414213] sM*/FOLD ->7
+# 7 <$> const[NV 3.14159] sM*/FOLD ->8
EOT_EOT
# 9 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->9
@@ -252,22 +223,13 @@ EOT_EOT
# 8 <@> prtf sK ->9
# 2 <0> pushmark sM ->3
# 3 <$> const(PV "myint %d mystr %s myfl %f pi %f\n") sM/FOLD ->4
-# 4 <$> const(IV 42) sM* ->5 < 5.017002
-# 5 <$> const(PV "hithere") sM* ->6 < 5.017002
-# 6 <$> const(NV 1.414213) sM* ->7 < 5.017002
-# 7 <$> const(NV 3.14159) sM* ->8 < 5.017002
-# 4 <$> const(IV 42) sM*/FOLD ->5 >=5.017002
-# 5 <$> const(PV "hithere") sM*/FOLD ->6 >=5.017002
-# 6 <$> const(NV 1.414213) sM*/FOLD ->7 >=5.017002
-# 7 <$> const(NV 3.14159) sM*/FOLD ->8 >=5.017002
+# 4 <$> const(IV 42) sM*/FOLD ->5
+# 5 <$> const(PV "hithere") sM*/FOLD ->6
+# 6 <$> const(NV 1.414213) sM*/FOLD ->7
+# 7 <$> const(NV 3.14159) sM*/FOLD ->8
EONT_EONT
-if($] < 5.015) {
- s/M(?=\*? ->)//g for $expect, $expect_nt;
-}
-if($] < 5.017002 || $] >= 5.019004) {
- s|\\n"[])] sM\K/FOLD|| for $expect, $expect_nt;
-}
+s|\\n"[])] sM\K/FOLD|| for $expect, $expect_nt;
checkOptree ( name => 'call many in a print statement',
code => \&printem,
@@ -285,16 +247,14 @@ checkOptree ( name => 'arithmetic constant folding in print',
# 1 <;> nextstate(main 937 (eval 53):1) v ->2
# 4 <@> print sK ->5
# 2 <0> pushmark s ->3
-# 3 <$> const[IV 6] s ->4 < 5.017002
-# 3 <$> const[IV 6] s/FOLD ->4 >=5.017002
+# 3 <$> const[IV 6] s/FOLD ->4
EOT_EOT
# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->5
# 1 <;> nextstate(main 937 (eval 53):1) v ->2
# 4 <@> print sK ->5
# 2 <0> pushmark s ->3
-# 3 <$> const(IV 6) s ->4 < 5.017002
-# 3 <$> const(IV 6) s/FOLD ->4 >=5.017002
+# 3 <$> const(IV 6) s/FOLD ->4
EONT_EONT
checkOptree ( name => 'string constant folding in print',
@@ -306,16 +266,14 @@ checkOptree ( name => 'string constant folding in print',
# 1 <;> nextstate(main 942 (eval 55):1) v ->2
# 4 <@> print sK ->5
# 2 <0> pushmark s ->3
-# 3 <$> const[PV "foobar"] s ->4 < 5.017002
-# 3 <$> const[PV "foobar"] s/FOLD ->4 >=5.017002
+# 3 <$> const[PV "foobar"] s/FOLD ->4
EOT_EOT
# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->5
# 1 <;> nextstate(main 942 (eval 55):1) v ->2
# 4 <@> print sK ->5
# 2 <0> pushmark s ->3
-# 3 <$> const(PV "foobar") s ->4 < 5.017002
-# 3 <$> const(PV "foobar") s/FOLD ->4 >=5.017002
+# 3 <$> const(PV "foobar") s/FOLD ->4
EONT_EONT
checkOptree ( name => 'boolean or folding',
@@ -325,16 +283,14 @@ checkOptree ( name => 'boolean or folding',
# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->5
# 1 <;> nextstate(main 942 (eval 55):1) v ->2
-# 4 <@> print sK ->5 < 5.019004
-# 4 <@> print sK/FOLD ->5 >=5.019004
+# 4 <@> print sK/FOLD ->5
# 2 <0> pushmark s ->3
# 3 <$> const[PV "foobar"] s ->4
EOT_EOT
# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->5
# 1 <;> nextstate(main 942 (eval 55):1) v ->2
-# 4 <@> print sK ->5 < 5.019004
-# 4 <@> print sK/FOLD ->5 >=5.019004
+# 4 <@> print sK/FOLD ->5
# 2 <0> pushmark s ->3
# 3 <$> const(PV "foobar") s ->4
EONT_EONT
@@ -355,76 +311,61 @@ checkOptree ( name => 'lc*,uc*,gt,lt,ge,le,cmp',
# - <@> lineseq KP ->r
# 1 <;> nextstate(main 916 optree_constants.t:307) v:>,<,%,{ ->2
# 4 <2> sassign vKS/2 ->5
-# 2 <$> const[PV "FOO.Bar.low.lOW"] s ->3 < 5.017002
-# 2 <$> const[PV "FOO.Bar.low.lOW"] s/FOLD ->3 >=5.017002
+# 2 <$> const[PV "FOO.Bar.low.lOW"] s/FOLD ->3
# - <1> ex-rv2sv sKRM*/1 ->4
# 3 <#> gvsv[*s] s ->4
# 5 <;> nextstate(main 916 optree_constants.t:308) v:>,<,%,{ ->6
-# 8 <@> print vK ->9 < 5.019004
-# 8 <@> print vK/FOLD ->9 >=5.019004
+# 8 <@> print vK/FOLD ->9
# 6 <0> pushmark s ->7
# 7 <$> const[PV "a-lt-b"] s ->8
# 9 <;> nextstate(main 916 optree_constants.t:309) v:>,<,%,{ ->a
-# c <@> print vK ->d < 5.019004
-# c <@> print vK/FOLD ->d >=5.019004
+# c <@> print vK/FOLD ->d
# a <0> pushmark s ->b
# b <$> const[PV "b-gt-a"] s ->c
# d <;> nextstate(main 916 optree_constants.t:310) v:>,<,%,{ ->e
-# g <@> print vK ->h < 5.019004
-# g <@> print vK/FOLD ->h >=5.019004
+# g <@> print vK/FOLD ->h
# e <0> pushmark s ->f
# f <$> const[PV "a-le-b"] s ->g
# h <;> nextstate(main 916 optree_constants.t:311) v:>,<,%,{ ->i
-# k <@> print vK ->l < 5.019004
-# k <@> print vK/FOLD ->l >=5.019004
+# k <@> print vK/FOLD ->l
# i <0> pushmark s ->j
# j <$> const[PV "b-ge-a"] s ->k
# l <;> nextstate(main 916 optree_constants.t:312) v:>,<,%,{ ->m
-# o <@> print vK ->p < 5.019004
-# o <@> print vK/FOLD ->p >=5.019004
+# o <@> print vK/FOLD ->p
# m <0> pushmark s ->n
# n <$> const[PV "b-cmp-a"] s ->o
# p <;> nextstate(main 916 optree_constants.t:313) v:>,<,%,{ ->q
-# q <$> const[PVNV 0] s/SHORT ->r < 5.017002
-# q <$> const[PVNV 0] s/FOLD,SHORT ->r >=5.017002 < 5.019003
-# q <$> const[SPECIAL sv_no] s/SHORT,FOLD ->r >=5.019003
+# q <$> const[SPECIAL sv_no] s/SHORT,FOLD ->r
EOT_EOT
# r <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->r
# 1 <;> nextstate(main 916 optree_constants.t:307) v:>,<,%,{ ->2
# 4 <2> sassign vKS/2 ->5
-# 2 <$> const(PV "FOO.Bar.low.lOW") s ->3 < 5.017002
-# 2 <$> const(PV "FOO.Bar.low.lOW") s/FOLD ->3 >=5.017002
+# 2 <$> const(PV "FOO.Bar.low.lOW") s/FOLD ->3
# - <1> ex-rv2sv sKRM*/1 ->4
# 3 <$> gvsv(*s) s ->4
# 5 <;> nextstate(main 916 optree_constants.t:308) v:>,<,%,{ ->6
-# 8 <@> print vK ->9 < 5.019004
-# 8 <@> print vK/FOLD ->9 >=5.019004
+# 8 <@> print vK/FOLD ->9
# 6 <0> pushmark s ->7
# 7 <$> const(PV "a-lt-b") s ->8
# 9 <;> nextstate(main 916 optree_constants.t:309) v:>,<,%,{ ->a
-# c <@> print vK ->d < 5.019004
-# c <@> print vK/FOLD ->d >=5.019004
+# c <@> print vK/FOLD ->d
# a <0> pushmark s ->b
# b <$> const(PV "b-gt-a") s ->c
# d <;> nextstate(main 916 optree_constants.t:310) v:>,<,%,{ ->e
-# g <@> print vK ->h < 5.019004
-# g <@> print vK/FOLD ->h >=5.019004
+# g <@> print vK/FOLD ->h
# e <0> pushmark s ->f
# f <$> const(PV "a-le-b") s ->g
# h <;> nextstate(main 916 optree_constants.t:311) v:>,<,%,{ ->i
-# k <@> print vK ->l < 5.019004
-# k <@> print vK/FOLD ->l >=5.019004
+# k <@> print vK/FOLD ->l
# i <0> pushmark s ->j
# j <$> const(PV "b-ge-a") s ->k
# l <;> nextstate(main 916 optree_constants.t:312) v:>,<,%,{ ->m
-# o <@> print vK ->p < 5.019004
-# o <@> print vK/FOLD ->p >=5.019004
+# o <@> print vK/FOLD ->p
# m <0> pushmark s ->n
# n <$> const(PV "b-cmp-a") s ->o
# p <;> nextstate(main 916 optree_constants.t:313) v:>,<,%,{ ->q
-# q <$> const(SPECIAL sv_no) s/SHORT ->r < 5.017002
-# q <$> const(SPECIAL sv_no) s/SHORT,FOLD ->r >=5.017002
+# q <$> const(SPECIAL sv_no) s/SHORT,FOLD ->r
EONT_EONT
checkOptree ( name => 'mixed constant folding, with explicit braces',
@@ -436,16 +377,14 @@ checkOptree ( name => 'mixed constant folding, with explicit braces',
# 1 <;> nextstate(main 977 (eval 28):1) v ->2
# 4 <@> print sK ->5
# 2 <0> pushmark s ->3
-# 3 <$> const[PV "foobar5"] s ->4 < 5.017002
-# 3 <$> const[PV "foobar5"] s/FOLD ->4 >=5.017002
+# 3 <$> const[PV "foobar5"] s/FOLD ->4
EOT_EOT
# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->5
# 1 <;> nextstate(main 977 (eval 28):1) v ->2
# 4 <@> print sK ->5
# 2 <0> pushmark s ->3
-# 3 <$> const(PV "foobar5") s ->4 < 5.017002
-# 3 <$> const(PV "foobar5") s/FOLD ->4 >=5.017002
+# 3 <$> const(PV "foobar5") s/FOLD ->4
EONT_EONT
__END__
diff --git a/ext/B/t/optree_misc.t b/ext/B/t/optree_misc.t
index 22440ca5b8..f8ff3ce968 100644
--- a/ext/B/t/optree_misc.t
+++ b/ext/B/t/optree_misc.t
@@ -65,30 +65,7 @@ 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,7 +171,6 @@ 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
@@ -261,7 +236,6 @@ 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
@@ -333,7 +307,6 @@ 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
@@ -371,7 +344,6 @@ 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
diff --git a/ext/B/t/optree_samples.t b/ext/B/t/optree_samples.t
index 83c0128f35..15b5799ce0 100644
--- a/ext/B/t/optree_samples.t
+++ b/ext/B/t/optree_samples.t
@@ -461,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:{
@@ -484,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:{
@@ -607,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
diff --git a/ext/B/t/terse.t b/ext/B/t/terse.t
index d332f4b9c0..7d0253addc 100644
--- a/ext/B/t/terse.t
+++ b/ext/B/t/terse.t
@@ -92,11 +92,7 @@ sub bar {
# Schwern's example of finding an RV
my $path = join " ", map { qq["-I$_"] } @INC;
my $items = qx{$^X $path "-MO=Terse" -le "print \\42" 2>&1};
-if( $] >= 5.011 ) {
- like( $items, qr/IV $hex \\42/, 'RV (but now stored in an IV)' );
-} else {
- like( $items, qr/RV $hex \\42/, 'RV' );
-}
+like( $items, qr/IV $hex \\42/, 'RV (but now stored in an IV)' );
package TieOut;