diff options
-rw-r--r-- | ext/B/t/OptreeCheck.pm | 42 | ||||
-rw-r--r-- | ext/B/t/optree_check.t | 22 | ||||
-rw-r--r-- | ext/B/t/optree_concise.t | 64 | ||||
-rw-r--r-- | ext/B/t/optree_constants.t | 10 | ||||
-rw-r--r-- | ext/B/t/optree_misc.t | 14 | ||||
-rw-r--r-- | ext/B/t/optree_samples.t | 100 | ||||
-rw-r--r-- | ext/B/t/optree_sort.t | 92 | ||||
-rw-r--r-- | ext/B/t/optree_specials.t | 52 | ||||
-rw-r--r-- | ext/B/t/optree_varinit.t | 120 |
9 files changed, 273 insertions, 243 deletions
diff --git a/ext/B/t/OptreeCheck.pm b/ext/B/t/OptreeCheck.pm index 47d4a13002..b6be0172e7 100644 --- a/ext/B/t/OptreeCheck.pm +++ b/ext/B/t/OptreeCheck.pm @@ -2,21 +2,22 @@ package OptreeCheck; use base 'Exporter'; use strict; use warnings; -use vars qw(@open_todo $TODO); +use vars qw($TODO $Level $using_open); require "test.pl"; our $VERSION = '0.02'; # now export checkOptree, and those test.pl functions used by tests our @EXPORT = qw( checkOptree plan skip skip_all pass is like unlike - require_ok runperl @open_todo); + require_ok runperl); -# This is a bit of a kludge. Really we need to find a way to encode in the -# golden results that the hints wll differ because ${^OPEN} is set. +# The hints flags will differ if ${^OPEN} is set. +# The approach taken is to put the hints-with-open in the golden results, and +# flag that they need to be taken out if ${^OPEN} is set. if (((caller 0)[10]||{})->{'open<'}) { - @open_todo = (skip => "\${^OPEN} is set"); + $using_open = 1; } =head1 NAME @@ -438,6 +439,7 @@ sub checkOptree { $tc->getRendering(); # get the actual output $tc->checkErrs(); + local $Level = $Level + 2; TODO: foreach my $want (@{$modes{$gOpts{testmode}}}) { local $TODO = $tc->{todo} if $tc->{todo}; @@ -682,9 +684,37 @@ sub mkCheckRex { # $str =~ s/(?<!\\)([\[\]\(\)*.\$\@\#\|{}])/\\$1/msg; # treat dbstate like nextstate (no in-debugger false reports) - $str =~ s/(?:next|db)state(\\\(.*?\\\))/(?:next|db)state(.*?)/msg; + # Note also that there may be 1 level of () nexting, if there's an eval + # Seems easiest to explicitly match the eval, rather than trying to parse + # for full balancing and then substitute .*? + # In which case, we can continue to match for the eval in the rexexp built + # from the golden result. + + $str =~ s!(?:next|db)state + \\\( # opening literal ( (backslash escaped) + [^()]*? # not () + (\\\(eval\ \d+\\\) # maybe /eval \d+/ in () + [^()]*? # which might be followed by something + )? + \\\) # closing literal ) + !'(?:next|db)state\\([^()]*?' . + ($1 && '\\(eval \\d+\\)[^()]*') # Match the eval if present + . '\\)'!msgxe; # widened for -terse mode $str =~ s/(?:next|db)state/(?:next|db)state/msg; + if (!$using_open && $tc->{strip_open_hints}) { + $str =~ s[( # capture + \(\?:next\|db\)state # the regexp matching next/db state + .* # all sorts of things follow it + v # The opening v + ) + (?:(:>,<,%,\\{) # hints when open.pm is in force + |(:>,<,%)) # (two variations) + (\ ->[0-9a-z]+)? + $ + ] + [$1 . ($2 && ':{') . $4]xegm; # change to the hints without open.pm + } # don't care about: $str =~ s/:-?\d+,-?\d+/:-?\\d+,-?\\d+/msg; # FAKE line numbers diff --git a/ext/B/t/optree_check.t b/ext/B/t/optree_check.t index 5128b452d6..a099295ec0 100644 --- a/ext/B/t/optree_check.t +++ b/ext/B/t/optree_check.t @@ -150,13 +150,13 @@ pass ("REFTEXT FIXUP TESTS"); checkOptree ( name => 'fixup nextstate (in reftext)', bcopts => '-exec', code => sub {my $a}, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate( NOTE THAT THIS CAN BE ANYTHING ) v +# 1 <;> nextstate( NOTE THAT THIS CAN BE ANYTHING ) v:>,<,% # 2 <0> padsv[$a:54,55] M/LVINTRO # 3 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 54 optree_concise.t:84) v +# 1 <;> nextstate(main 54 optree_concise.t:84) v:>,<,% # 2 <0> padsv[$a:54,55] M/LVINTRO # 3 <1> leavesub[1 ref] K/REFC,1 EONT_EONT @@ -165,13 +165,13 @@ checkOptree ( name => 'fixup opcode args', bcopts => '-exec', #fail => 1, # uncomment to see real padsv args: [$a:491,492] code => sub {my $a}, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 56 optree_concise.t:96) v +# 1 <;> nextstate(main 56 optree_concise.t:96) v:>,<,% # 2 <0> padsv[$a:56,57] M/LVINTRO # 3 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 56 optree_concise.t:96) v +# 1 <;> nextstate(main 56 optree_concise.t:96) v:>,<,% # 2 <0> padsv[$a:56,57] M/LVINTRO # 3 <1> leavesub[1 ref] K/REFC,1 EONT_EONT @@ -184,11 +184,11 @@ checkOptree ( name => 'canonical example w -basic', code => sub{$a=$b+42}, crossfail => 1, debug => 1, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 7 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->7 -# 1 <;> nextstate(main 380 optree_selftest.t:139) v:{ ->2 +# 1 <;> nextstate(main 380 optree_selftest.t:139) v:>,<,%,{ ->2 # 6 <2> sassign sKS/2 ->7 # 4 <2> add[t3] sK/2 ->5 # - <1> ex-rv2sv sK/1 ->3 @@ -199,7 +199,7 @@ checkOptree ( name => 'canonical example w -basic', EOT_EOT # 7 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->7 -# 1 <;> nextstate(main 60 optree_concise.t:122) v:{ ->2 +# 1 <;> nextstate(main 60 optree_concise.t:122) v:>,<,%,{ ->2 # 6 <2> sassign sKS/2 ->7 # 4 <2> add[t1] sK/2 ->5 # - <1> ex-rv2sv sK/1 ->3 @@ -212,7 +212,7 @@ EONT_EONT checkOptree ( code => '$a=$b+42', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 61 optree_concise.t:139) v:{ +# 1 <;> nextstate(main 837 (eval 24):1) v:{ # 2 <#> gvsv[*b] s # 3 <$> const[IV 42] s # 4 <2> add[t3] sK/2 @@ -220,7 +220,7 @@ checkOptree ( code => '$a=$b+42', # 6 <2> sassign sKS/2 # 7 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 61 optree_concise.t:139) v:{ +# 1 <;> nextstate(main 837 (eval 24):1) v:{ # 2 <$> gvsv(*b) s # 3 <$> const(IV 42) s # 4 <2> add[t1] sK/2 diff --git a/ext/B/t/optree_concise.t b/ext/B/t/optree_concise.t index c7166c9b32..319144758f 100644 --- a/ext/B/t/optree_concise.t +++ b/ext/B/t/optree_concise.t @@ -35,11 +35,11 @@ pass("CANONICAL B::Concise EXAMPLE"); checkOptree ( name => 'canonical example w -basic', bcopts => '-basic', code => sub{$a=$b+42}, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 7 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->7 -# 1 <;> nextstate(foo bar) v:{ ->2 +# 1 <;> nextstate(foo bar) v:>,<,%,{ ->2 # 6 <2> sassign sKS/2 ->7 # 4 <2> add[t3] sK/2 ->5 # - <1> ex-rv2sv sK/1 ->3 @@ -50,7 +50,7 @@ checkOptree ( name => 'canonical example w -basic', EOT_EOT # 7 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->7 -# 1 <;> nextstate(main 60 optree_concise.t:122) v:{ ->2 +# 1 <;> nextstate(main 60 optree_concise.t:122) v:>,<,%,{ ->2 # 6 <2> sassign sKS/2 ->7 # 4 <2> add[t1] sK/2 ->5 # - <1> ex-rv2sv sK/1 ->3 @@ -63,9 +63,9 @@ EONT_EONT checkOptree ( name => 'canonical example w -exec', bcopts => '-exec', code => sub{$a=$b+42}, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 61 optree_concise.t:139) v:{ +# 1 <;> nextstate(main 61 optree_concise.t:139) v:>,<,%,{ # 2 <#> gvsv[*b] s # 3 <$> const[IV 42] s # 4 <2> add[t3] sK/2 @@ -73,7 +73,7 @@ checkOptree ( name => 'canonical example w -exec', # 6 <2> sassign sKS/2 # 7 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 61 optree_concise.t:139) v:{ +# 1 <;> nextstate(main 61 optree_concise.t:139) v:>,<,%,{ # 2 <$> gvsv(*b) s # 3 <$> const(IV 42) s # 4 <2> add[t1] sK/2 @@ -88,9 +88,9 @@ pass("B::Concise OPTION TESTS"); checkOptree ( name => '-base3 sticky-exec', bcopts => '-base3', code => sub{$a=$b+42}, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> dbstate(main 24 optree_concise.t:132) v:{ +1 <;> dbstate(main 24 optree_concise.t:132) v:>,<,%,{ 2 <#> gvsv[*b] s 10 <$> const[IV 42] s 11 <2> add[t3] sK/2 @@ -98,7 +98,7 @@ checkOptree ( name => '-base3 sticky-exec', 20 <2> sassign sKS/2 21 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 62 optree_concise.t:161) v:{ +# 1 <;> nextstate(main 62 optree_concise.t:161) v:>,<,%,{ # 2 <$> gvsv(*b) s # 10 <$> const(IV 42) s # 11 <2> add[t1] sK/2 @@ -110,11 +110,11 @@ EONT_EONT checkOptree ( name => 'sticky-base3, -basic over sticky-exec', bcopts => '-basic', code => sub{$a=$b+42}, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 21 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->21 -1 <;> nextstate(main 32 optree_concise.t:164) v:{ ->2 +1 <;> nextstate(main 32 optree_concise.t:164) v:>,<,%,{ ->2 20 <2> sassign sKS/2 ->21 11 <2> add[t3] sK/2 ->12 - <1> ex-rv2sv sK/1 ->10 @@ -125,7 +125,7 @@ checkOptree ( name => 'sticky-base3, -basic over sticky-exec', EOT_EOT # 21 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->21 -# 1 <;> nextstate(main 63 optree_concise.t:186) v:{ ->2 +# 1 <;> nextstate(main 63 optree_concise.t:186) v:>,<,%,{ ->2 # 20 <2> sassign sKS/2 ->21 # 11 <2> add[t1] sK/2 ->12 # - <1> ex-rv2sv sK/1 ->10 @@ -138,11 +138,11 @@ EONT_EONT checkOptree ( name => '-base4', bcopts => [qw/ -basic -base4 /], code => sub{$a=$b+42}, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 13 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->13 -1 <;> nextstate(main 26 optree_concise.t:145) v:{ ->2 +1 <;> nextstate(main 26 optree_concise.t:145) v:>,<,%,{ ->2 12 <2> sassign sKS/2 ->13 10 <2> add[t3] sK/2 ->11 - <1> ex-rv2sv sK/1 ->3 @@ -153,7 +153,7 @@ checkOptree ( name => '-base4', EOT_EOT # 13 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->13 -# 1 <;> nextstate(main 64 optree_concise.t:193) v:{ ->2 +# 1 <;> nextstate(main 64 optree_concise.t:193) v:>,<,%,{ ->2 # 12 <2> sassign sKS/2 ->13 # 10 <2> add[t1] sK/2 ->11 # - <1> ex-rv2sv sK/1 ->3 @@ -167,17 +167,17 @@ checkOptree ( name => "restore -base36 default", bcopts => [qw/ -basic -base36 /], code => sub{$a}, crossfail => 1, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 3 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->3 -1 <;> nextstate(main 27 optree_concise.t:161) v ->2 +1 <;> nextstate(main 27 optree_concise.t:161) v:>,<,% ->2 - <1> ex-rv2sv sK/1 ->- 2 <#> gvsv[*a] s ->3 EOT_EOT # 3 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->3 -# 1 <;> nextstate(main 65 optree_concise.t:210) v ->2 +# 1 <;> nextstate(main 65 optree_concise.t:210) v:>,<,% ->2 # - <1> ex-rv2sv sK/1 ->- # 2 <$> gvsv(*a) s ->3 EONT_EONT @@ -220,11 +220,11 @@ checkOptree ( name => 'cmdline invoke -basic works', 'Name "main::a" used only once: possible typo at -e line 1.', ], #bcopts => '-basic', # default - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 7 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v:{ ->3 +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 6 <@> sort vK ->7 # 3 <0> pushmark s ->4 # 5 <1> rv2av[t2] lK/1 ->6 @@ -232,7 +232,7 @@ checkOptree ( name => 'cmdline invoke -basic works', EOT_EOT # 7 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v:{ ->3 +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 6 <@> sort vK ->7 # 3 <0> pushmark s ->4 # 5 <1> rv2av[t1] lK/1 ->6 @@ -245,10 +245,10 @@ checkOptree ( name => 'cmdline invoke -exec works', 'Name "main::a" used only once: possible typo at -e line 1.', ], bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v:{ +2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> pushmark s 4 <#> gv[*a] s 5 <1> rv2av[t2] lK/1 @@ -256,7 +256,7 @@ checkOptree ( name => 'cmdline invoke -exec works', 7 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v:{ +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <$> gv(*a) s # 5 <1> rv2av[t1] lK/1 @@ -292,13 +292,13 @@ checkOptree prog => 'our @a; sort @a', bcopts => [qw/ -basic -concise -exec /], errs => ['Useless use of sort in void context at -e line 1.'], - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v:{ +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <#> gv[*a] s # 4 <1> rv2av[t3] vK/OURINTR,1 -# 5 <;> nextstate(main 2 -e:1) v:{ +# 5 <;> nextstate(main 2 -e:1) v:>,<,%,{ # 6 <0> pushmark s # 7 <#> gv[*a] s # 8 <1> rv2av[t5] lK/1 @@ -306,10 +306,10 @@ checkOptree # a <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v:{ +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <$> gv(*a) s # 4 <1> rv2av[t2] vK/OURINTR,1 -# 5 <;> nextstate(main 2 -e:1) v:{ +# 5 <;> nextstate(main 2 -e:1) v:>,<,%,{ # 6 <0> pushmark s # 7 <$> gv(*a) s # 8 <1> rv2av[t3] lK/1 @@ -372,9 +372,9 @@ pass("set_up_relative_test, new callback installed"); checkOptree ( name => 'callback used, independent of style', bcopts => [qw/ -concise -exec /], code => sub{$a=$b+42}, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main 76 optree_concise.t:337) v:{ +1 <;> nextstate(main 76 optree_concise.t:337) v:>,<,%,{ 2 <#> gvsv[*b] s 3 <$> const[IV 42] CALLBACK s 4 <2> add[t3] sK/2 @@ -382,7 +382,7 @@ checkOptree ( name => 'callback used, independent of style', 6 <2> sassign sKS/2 7 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 455 optree_concise.t:328) v:{ +# 1 <;> nextstate(main 455 optree_concise.t:328) v:>,<,%,{ # 2 <$> gvsv(*b) s # 3 <$> const(IV 42) CALLBACK s # 4 <2> add[t1] sK/2 diff --git a/ext/B/t/optree_constants.t b/ext/B/t/optree_constants.t index 5ae18b627a..ee65540d09 100644 --- a/ext/B/t/optree_constants.t +++ b/ext/B/t/optree_constants.t @@ -101,12 +101,12 @@ for $func (sort keys %$want) { expect => <<EOT_EOT, expect_nt => <<EONT_EONT); 3 <1> leavesub[2 refs] K/REFC,1 ->(end) - <\@> lineseq KP ->3 -1 <;> dbstate(main 1163 OptreeCheck.pm:511]:1) v ->2 +1 <;> dbstate(main 833 (eval 44):1) v ->2 2 <\$> const[$want->{$func}[0] $want->{$func}[1]] s ->3 EOT_EOT 3 <1> leavesub[2 refs] K/REFC,1 ->(end) - <\@> lineseq KP ->3 -1 <;> dbstate(main 1163 OptreeCheck.pm:511]:1) v ->2 +1 <;> dbstate(main 833 (eval 44):1) v ->2 2 <\$> const($want->{$func}[0] $want->{$func}[1]) s ->3 EONT_EONT @@ -189,11 +189,11 @@ sub printem { checkOptree ( name => 'call many in a print statement', code => \&printem, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 9 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->9 -# 1 <;> nextstate(main 635 optree_constants.t:163) v ->2 +# 1 <;> nextstate(main 635 optree_constants.t:163) v:>,<,% ->2 # 8 <@> prtf sK ->9 # 2 <0> pushmark s ->3 # 3 <$> const[PV "myint %d mystr %s myfl %f pi %f\n"] s ->4 @@ -204,7 +204,7 @@ checkOptree ( name => 'call many in a print statement', EOT_EOT # 9 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->9 -# 1 <;> nextstate(main 635 optree_constants.t:163) v ->2 +# 1 <;> nextstate(main 635 optree_constants.t:163) v:>,<,% ->2 # 8 <@> prtf sK ->9 # 2 <0> pushmark s ->3 # 3 <$> const(PV "myint %d mystr %s myfl %f pi %f\n") s ->4 diff --git a/ext/B/t/optree_misc.t b/ext/B/t/optree_misc.t index 1c7a53d9fb..31213cd41e 100644 --- a/ext/B/t/optree_misc.t +++ b/ext/B/t/optree_misc.t @@ -29,16 +29,16 @@ skip "no perlio in this build", 1 unless $Config::Config{useperlio}; checkOptree ( name => 'OP_AELEMFAST opclass', code => sub { my @x; our @y; $x[0] + $y[0]}, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # a <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->a -# 1 <;> nextstate(main 634 optree_misc.t:25) v ->2 +# 1 <;> nextstate(main 634 optree_misc.t:25) v:>,<,% ->2 # 2 <0> padav[@x:634,636] vM/LVINTRO ->3 -# 3 <;> nextstate(main 635 optree_misc.t:25) v ->4 +# 3 <;> nextstate(main 635 optree_misc.t:25) v:>,<,% ->4 # 5 <1> rv2av[t4] vK/OURINTR,1 ->6 # 4 <#> gv[*y] s ->5 -# 6 <;> nextstate(main 636 optree_misc.t:25) v:{ ->7 +# 6 <;> nextstate(main 636 optree_misc.t:25) v:>,<,%,{ ->7 # 9 <2> add[t6] sK/2 ->a # - <1> ex-aelem sK/2 ->8 # 7 <0> aelemfast[@x:634,636] sR* ->8 @@ -50,12 +50,12 @@ checkOptree ( name => 'OP_AELEMFAST opclass', EOT_EOT # a <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->a -# 1 <;> nextstate(main 634 optree_misc.t:27) v ->2 +# 1 <;> nextstate(main 634 optree_misc.t:27) v:>,<,% ->2 # 2 <0> padav[@x:634,636] vM/LVINTRO ->3 -# 3 <;> nextstate(main 635 optree_misc.t:27) v ->4 +# 3 <;> nextstate(main 635 optree_misc.t:27) v:>,<,% ->4 # 5 <1> rv2av[t3] vK/OURINTR,1 ->6 # 4 <$> gv(*y) s ->5 -# 6 <;> nextstate(main 636 optree_misc.t:27) v:{ ->7 +# 6 <;> nextstate(main 636 optree_misc.t:27) v:>,<,%,{ ->7 # 9 <2> add[t4] sK/2 ->a # - <1> ex-aelem sK/2 ->8 # 7 <0> aelemfast[@x:634,636] sR* ->8 diff --git a/ext/B/t/optree_samples.t b/ext/B/t/optree_samples.t index d198c59e65..5e9d1db371 100644 --- a/ext/B/t/optree_samples.t +++ b/ext/B/t/optree_samples.t @@ -30,11 +30,11 @@ checkOptree ( name => '-basic sub {if shift print then,else}', code => sub { if (shift) { print "then" } else { print "else" } }, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 9 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->9 -# 1 <;> nextstate(main 426 optree.t:16) v ->2 +# 1 <;> nextstate(main 426 optree.t:16) v:>,<,% ->2 # - <1> null K/1 ->- # 5 <|> cond_expr(other->6) K/1 ->a # 4 <1> shift sK/1 ->5 @@ -47,14 +47,14 @@ checkOptree ( name => '-basic sub {if shift print then,else}', # 7 <$> const[PV "then"] s ->8 # f <@> leave KP ->9 # a <0> enter ->b -# b <;> nextstate(main 424 optree.t:17) v ->c +# b <;> nextstate(main 424 optree.t:17) v:>,<,% ->c # e <@> print sK ->f # c <0> pushmark s ->d # d <$> const[PV "else"] s ->e EOT_EOT # 9 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->9 -# 1 <;> nextstate(main 427 optree_samples.t:18) v ->2 +# 1 <;> nextstate(main 427 optree_samples.t:18) v:>,<,% ->2 # - <1> null K/1 ->- # 5 <|> cond_expr(other->6) K/1 ->a # 4 <1> shift sK/1 ->5 @@ -67,7 +67,7 @@ EOT_EOT # 7 <$> const(PV "then") s ->8 # f <@> leave KP ->9 # a <0> enter ->b -# b <;> nextstate(main 425 optree_samples.t:19) v ->c +# b <;> nextstate(main 425 optree_samples.t:19) v:>,<,% ->c # e <@> print sK ->f # c <0> pushmark s ->d # d <$> const(PV "else") s ->e @@ -79,17 +79,17 @@ checkOptree ( name => '-basic (see above, with my $a = shift)', if ($a) { print "foo" } else { print "bar" } }, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # d <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->d -# 1 <;> nextstate(main 431 optree.t:68) v ->2 +# 1 <;> nextstate(main 431 optree.t:68) v:>,<,% ->2 # 6 <2> sassign vKS/2 ->7 # 4 <1> shift sK/1 ->5 # 3 <1> rv2av[t3] sKRM/1 ->4 # 2 <#> gv[*_] s ->3 # 5 <0> padsv[$a:431,435] sRM*/LVINTRO ->6 -# 7 <;> nextstate(main 435 optree.t:69) v ->8 +# 7 <;> nextstate(main 435 optree.t:69) v:>,<,% ->8 # - <1> null K/1 ->- # 9 <|> cond_expr(other->a) K/1 ->e # 8 <0> padsv[$a:431,435] s ->9 @@ -100,20 +100,20 @@ checkOptree ( name => '-basic (see above, with my $a = shift)', # b <$> const[PV "foo"] s ->c # j <@> leave KP ->d # e <0> enter ->f -# f <;> nextstate(main 433 optree.t:70) v ->g +# f <;> nextstate(main 433 optree.t:70) v:>,<,% ->g # i <@> print sK ->j # g <0> pushmark s ->h # h <$> const[PV "bar"] s ->i EOT_EOT # d <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->d -# 1 <;> nextstate(main 428 optree_samples.t:48) v ->2 +# 1 <;> nextstate(main 428 optree_samples.t:48) v:>,<,% ->2 # 6 <2> sassign vKS/2 ->7 # 4 <1> shift sK/1 ->5 # 3 <1> rv2av[t2] sKRM/1 ->4 # 2 <$> gv(*_) s ->3 # 5 <0> padsv[$a:428,432] sRM*/LVINTRO ->6 -# 7 <;> nextstate(main 432 optree_samples.t:49) v ->8 +# 7 <;> nextstate(main 432 optree_samples.t:49) v:>,<,% ->8 # - <1> null K/1 ->- # 9 <|> cond_expr(other->a) K/1 ->e # 8 <0> padsv[$a:428,432] s ->9 @@ -124,7 +124,7 @@ EOT_EOT # b <$> const(PV "foo") s ->c # j <@> leave KP ->d # e <0> enter ->f -# f <;> nextstate(main 430 optree_samples.t:50) v ->g +# f <;> nextstate(main 430 optree_samples.t:50) v:>,<,% ->g # i <@> print sK ->j # g <0> pushmark s ->h # h <$> const(PV "bar") s ->i @@ -135,9 +135,9 @@ checkOptree ( name => '-exec sub {if shift print then,else}', code => sub { if (shift) { print "then" } else { print "else" } }, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 426 optree.t:16) v +# 1 <;> nextstate(main 426 optree.t:16) v:>,<,% # 2 <#> gv[*_] s # 3 <1> rv2av[t2] sKRM/1 # 4 <1> shift sK/1 @@ -147,14 +147,14 @@ checkOptree ( name => '-exec sub {if shift print then,else}', # 8 <@> print sK # goto 9 # a <0> enter -# b <;> nextstate(main 424 optree.t:17) v +# b <;> nextstate(main 424 optree.t:17) v:>,<,% # c <0> pushmark s # d <$> const[PV "else"] s # e <@> print sK # f <@> leave KP # 9 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 436 optree_samples.t:123) v +# 1 <;> nextstate(main 436 optree_samples.t:123) v:>,<,% # 2 <$> gv(*_) s # 3 <1> rv2av[t1] sKRM/1 # 4 <1> shift sK/1 @@ -164,7 +164,7 @@ EOT_EOT # 8 <@> print sK # goto 9 # a <0> enter -# b <;> nextstate(main 434 optree_samples.t:124) v +# b <;> nextstate(main 434 optree_samples.t:124) v:>,<,% # c <0> pushmark s # d <$> const(PV "else") s # e <@> print sK @@ -178,15 +178,15 @@ checkOptree ( name => '-exec (see above, with my $a = shift)', if ($a) { print "foo" } else { print "bar" } }, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 423 optree.t:16) v +# 1 <;> nextstate(main 423 optree.t:16) v:>,<,% # 2 <#> gv[*_] s # 3 <1> rv2av[t3] sKRM/1 # 4 <1> shift sK/1 # 5 <0> padsv[$a:423,427] sRM*/LVINTRO # 6 <2> sassign vKS/2 -# 7 <;> nextstate(main 427 optree.t:17) v +# 7 <;> nextstate(main 427 optree.t:17) v:>,<,% # 8 <0> padsv[$a:423,427] s # 9 <|> cond_expr(other->a) K/1 # a <0> pushmark s @@ -194,20 +194,20 @@ checkOptree ( name => '-exec (see above, with my $a = shift)', # c <@> print sK # goto d # e <0> enter -# f <;> nextstate(main 425 optree.t:18) v +# f <;> nextstate(main 425 optree.t:18) v:>,<,% # g <0> pushmark s # h <$> const[PV "bar"] s # i <@> print sK # j <@> leave KP # d <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 437 optree_samples.t:112) v +# 1 <;> nextstate(main 437 optree_samples.t:112) v:>,<,% # 2 <$> gv(*_) s # 3 <1> rv2av[t2] sKRM/1 # 4 <1> shift sK/1 # 5 <0> padsv[$a:437,441] sRM*/LVINTRO # 6 <2> sassign vKS/2 -# 7 <;> nextstate(main 441 optree_samples.t:113) v +# 7 <;> nextstate(main 441 optree_samples.t:113) v:>,<,% # 8 <0> padsv[$a:437,441] s # 9 <|> cond_expr(other->a) K/1 # a <0> pushmark s @@ -215,7 +215,7 @@ EOT_EOT # c <@> print sK # goto d # e <0> enter -# f <;> nextstate(main 439 optree_samples.t:114) v +# f <;> nextstate(main 439 optree_samples.t:114) v:>,<,% # g <0> pushmark s # h <$> const(PV "bar") s # i <@> print sK @@ -226,9 +226,9 @@ EONT_EONT checkOptree ( name => '-exec sub { print (shift) ? "foo" : "bar" }', code => sub { print (shift) ? "foo" : "bar" }, bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 428 optree.t:31) v +# 1 <;> nextstate(main 428 optree.t:31) v:>,<,% # 2 <0> pushmark s # 3 <#> gv[*_] s # 4 <1> rv2av[t2] sKRM/1 @@ -240,7 +240,7 @@ checkOptree ( name => '-exec sub { print (shift) ? "foo" : "bar" }', # a <$> const[PV "bar"] s # 9 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 442 optree_samples.t:144) v +# 1 <;> nextstate(main 442 optree_samples.t:144) v:>,<,% # 2 <0> pushmark s # 3 <$> gv(*_) s # 4 <1> rv2av[t1] sKRM/1 @@ -258,9 +258,9 @@ pass ("FOREACH"); checkOptree ( name => '-exec sub { foreach (1..10) {print "foo $_"} }', code => sub { foreach (1..10) {print "foo $_"} }, bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 443 optree.t:158) v +# 1 <;> nextstate(main 443 optree.t:158) v:>,<,% # 2 <0> pushmark s # 3 <$> const[IV 1] s # 4 <$> const[IV 10] s @@ -268,7 +268,7 @@ checkOptree ( name => '-exec sub { foreach (1..10) {print "foo $_"} }', # 6 <{> enteriter(next->d last->g redo->7) lKS/8 # e <0> iter s # f <|> and(other->7) K/1 -# 7 <;> nextstate(main 442 optree.t:158) v +# 7 <;> nextstate(main 442 optree.t:158) v:>,<,% # 8 <0> pushmark s # 9 <$> const[PV "foo "] s # a <#> gvsv[*_] s @@ -279,7 +279,7 @@ checkOptree ( name => '-exec sub { foreach (1..10) {print "foo $_"} }', # g <2> leaveloop K/2 # h <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 444 optree_samples.t:182) v +# 1 <;> nextstate(main 444 optree_samples.t:182) v:>,<,% # 2 <0> pushmark s # 3 <$> const(IV 1) s # 4 <$> const(IV 10) s @@ -287,7 +287,7 @@ EOT_EOT # 6 <{> enteriter(next->d last->g redo->7) lKS/8 # e <0> iter s # f <|> and(other->7) K/1 -# 7 <;> nextstate(main 443 optree_samples.t:182) v +# 7 <;> nextstate(main 443 optree_samples.t:182) v:>,<,% # 8 <0> pushmark s # 9 <$> const(PV "foo ") s # a <$> gvsv(*_) s @@ -302,12 +302,12 @@ EONT_EONT checkOptree ( name => '-basic sub { print "foo $_" foreach (1..10) }', code => sub { print "foo $_" foreach (1..10) }, bcopts => '-basic', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # h <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->h -# 1 <;> nextstate(main 445 optree.t:167) v ->2 -# 2 <;> nextstate(main 445 optree.t:167) v ->3 +# 1 <;> nextstate(main 445 optree.t:167) v:>,<,% ->2 +# 2 <;> nextstate(main 445 optree.t:167) v:>,<,% ->3 # g <2> leaveloop K/2 ->h # 7 <{> enteriter(next->d last->g redo->8) lKS/8 ->e # - <0> ex-pushmark s ->3 @@ -332,8 +332,8 @@ checkOptree ( name => '-basic sub { print "foo $_" foreach (1..10) }', EOT_EOT # h <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->h -# 1 <;> nextstate(main 446 optree_samples.t:192) v ->2 -# 2 <;> nextstate(main 446 optree_samples.t:192) v ->3 +# 1 <;> nextstate(main 446 optree_samples.t:192) v:>,<,% ->2 +# 2 <;> nextstate(main 446 optree_samples.t:192) v:>,<,% ->3 # g <2> leaveloop K/2 ->h # 7 <{> enteriter(next->d last->g redo->8) lKS/8 ->e # - <0> ex-pushmark s ->3 @@ -360,10 +360,10 @@ EONT_EONT checkOptree ( name => '-exec -e foreach (1..10) {print qq{foo $_}}', prog => 'foreach (1..10) {print qq{foo $_}}', bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <0> enter -# 2 <;> nextstate(main 2 -e:1) v +# 2 <;> nextstate(main 2 -e:1) v:>,<,% # 3 <0> pushmark s # 4 <$> const[IV 1] s # 5 <$> const[IV 10] s @@ -371,7 +371,7 @@ checkOptree ( name => '-exec -e foreach (1..10) {print qq{foo $_}}', # 7 <{> enteriter(next->e last->h redo->8) lKS/8 # f <0> iter s # g <|> and(other->8) vK/1 -# 8 <;> nextstate(main 1 -e:1) v +# 8 <;> nextstate(main 1 -e:1) v:>,<,% # 9 <0> pushmark s # a <$> const[PV "foo "] s # b <#> gvsv[*_] s @@ -383,7 +383,7 @@ checkOptree ( name => '-exec -e foreach (1..10) {print qq{foo $_}}', # i <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 2 -e:1) v +# 2 <;> nextstate(main 2 -e:1) v:>,<,% # 3 <0> pushmark s # 4 <$> const(IV 1) s # 5 <$> const(IV 10) s @@ -391,7 +391,7 @@ EOT_EOT # 7 <{> enteriter(next->e last->h redo->8) lKS/8 # f <0> iter s # g <|> and(other->8) vK/1 -# 8 <;> nextstate(main 1 -e:1) v +# 8 <;> nextstate(main 1 -e:1) v:>,<,% # 9 <0> pushmark s # a <$> const(PV "foo ") s # b <$> gvsv(*_) s @@ -406,10 +406,10 @@ EONT_EONT checkOptree ( name => '-exec sub { print "foo $_" foreach (1..10) }', code => sub { print "foo $_" foreach (1..10) }, bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 445 optree.t:167) v -# 2 <;> nextstate(main 445 optree.t:167) v +# 1 <;> nextstate(main 445 optree.t:167) v:>,<,% +# 2 <;> nextstate(main 445 optree.t:167) v:>,<,% # 3 <0> pushmark s # 4 <$> const[IV 1] s # 5 <$> const[IV 10] s @@ -427,8 +427,8 @@ checkOptree ( name => '-exec sub { print "foo $_" foreach (1..10) }', # g <2> leaveloop K/2 # h <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 447 optree_samples.t:252) v -# 2 <;> nextstate(main 447 optree_samples.t:252) v +# 1 <;> nextstate(main 447 optree_samples.t:252) v:>,<,% +# 2 <;> nextstate(main 447 optree_samples.t:252) v:>,<,% # 3 <0> pushmark s # 4 <$> const(IV 1) s # 5 <$> const(IV 10) s @@ -641,17 +641,17 @@ pass("CONSTANTS"); checkOptree ( name => '-e use constant j => qq{junk}; print j', prog => 'use constant j => qq{junk}; print j', bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <0> enter -# 2 <;> nextstate(main 71 -e:1) v:{ +# 2 <;> nextstate(main 71 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <$> const[PV "junk"] s # 5 <@> print vK # 6 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 71 -e:1) v:{ +# 2 <;> nextstate(main 71 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <$> const(PV "junk") s # 5 <@> print vK diff --git a/ext/B/t/optree_sort.t b/ext/B/t/optree_sort.t index 62068e174f..0a5047e2fb 100644 --- a/ext/B/t/optree_sort.t +++ b/ext/B/t/optree_sort.t @@ -27,16 +27,16 @@ pass("SORT OPTIMIZATION"); checkOptree ( name => 'sub {sort @a}', code => sub {sort @a}, bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 424 optree_sort.t:14) v +# 1 <;> nextstate(main 424 optree_sort.t:14) v:>,<,% # 2 <0> pushmark s # 3 <#> gv[*a] s # 4 <1> rv2av[t2] lK/1 # 5 <@> sort K # 6 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 424 optree_sort.t:14) v +# 1 <;> nextstate(main 424 optree_sort.t:14) v:>,<,% # 2 <0> pushmark s # 3 <$> gv(*a) s # 4 <1> rv2av[t1] lK/1 @@ -50,10 +50,10 @@ checkOptree ( name => 'sort @a', 'Name "main::a" used only once: possible typo at -e line 1.', ], bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v:{ +2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> pushmark s 4 <#> gv[*a] s 5 <1> rv2av[t2] lK/1 @@ -61,7 +61,7 @@ checkOptree ( name => 'sort @a', 7 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v:{ +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <$> gv(*a) s # 5 <1> rv2av[t1] lK/1 @@ -72,9 +72,9 @@ EONT_EONT checkOptree ( name => 'sub {@a = sort @a}', code => sub {@a = sort @a}, bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main -438 optree.t:244) v +1 <;> nextstate(main -438 optree.t:244) v:>,<,% 2 <0> pushmark s 3 <0> pushmark s 4 <#> gv[*a] s @@ -86,7 +86,7 @@ checkOptree ( name => 'sub {@a = sort @a}', a <2> aassign[t5] KS/COMMON b <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 65 optree.t:311) v +# 1 <;> nextstate(main 65 optree.t:311) v:>,<,% # 2 <0> pushmark s # 3 <0> pushmark s # 4 <$> gv(*a) s @@ -102,10 +102,10 @@ EONT_EONT checkOptree ( name => '@a = sort @a', prog => '@a = sort @a', bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v:{ +2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> pushmark s 4 <0> pushmark s 5 <#> gv[*a] s @@ -114,7 +114,7 @@ checkOptree ( name => '@a = sort @a', 8 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v:{ +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <0> pushmark s # 5 <$> gv(*a) s @@ -126,28 +126,28 @@ EONT_EONT checkOptree ( name => 'sub {@a = sort @a; reverse @a}', code => sub {@a = sort @a; reverse @a}, bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main -438 optree.t:286) v +1 <;> nextstate(main -438 optree.t:286) v:>,<,% 2 <0> pushmark s 3 <0> pushmark s 4 <#> gv[*a] s 5 <1> rv2av[t4] lKRM*/1 6 <@> sort lK/INPLACE -7 <;> nextstate(main -438 optree.t:288) v +7 <;> nextstate(main -438 optree.t:288) v:>,<,% 8 <0> pushmark s 9 <#> gv[*a] s a <1> rv2av[t7] lK/1 b <@> reverse[t8] K/1 c <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 66 optree.t:345) v +# 1 <;> nextstate(main 66 optree.t:345) v:>,<,% # 2 <0> pushmark s # 3 <0> pushmark s # 4 <$> gv(*a) s # 5 <1> rv2av[t2] lKRM*/1 # 6 <@> sort lK/INPLACE -# 7 <;> nextstate(main 66 optree.t:346) v +# 7 <;> nextstate(main 66 optree.t:346) v:>,<,% # 8 <0> pushmark s # 9 <$> gv(*a) s # a <1> rv2av[t4] lK/1 @@ -159,16 +159,16 @@ checkOptree ( name => '@a = sort @a; reverse @a', prog => '@a = sort @a; reverse @a', errs => ['Useless use of reverse in void context at -e line 1.'], bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v:{ +2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> pushmark s 4 <0> pushmark s 5 <#> gv[*a] s 6 <1> rv2av[t4] lKRM*/1 7 <@> sort lK/INPLACE -8 <;> nextstate(main 1 -e:1) v:{ +8 <;> nextstate(main 1 -e:1) v:>,<,%,{ 9 <0> pushmark s a <#> gv[*a] s b <1> rv2av[t7] lK/1 @@ -176,13 +176,13 @@ c <@> reverse[t8] vK/1 d <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v:{ +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <0> pushmark s # 5 <$> gv(*a) s # 6 <1> rv2av[t2] lKRM*/1 # 7 <@> sort lK/INPLACE -# 8 <;> nextstate(main 1 -e:1) v:{ +# 8 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 9 <0> pushmark s # a <$> gv(*a) s # b <1> rv2av[t4] lK/1 @@ -193,11 +193,11 @@ EONT_EONT checkOptree ( name => 'sub {my @a; @a = sort @a}', code => sub {my @a; @a = sort @a}, bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main -437 optree.t:254) v +1 <;> nextstate(main -437 optree.t:254) v:>,<,% 2 <0> padav[@a:-437,-436] vM/LVINTRO -3 <;> nextstate(main -436 optree.t:256) v +3 <;> nextstate(main -436 optree.t:256) v:>,<,% 4 <0> pushmark s 5 <0> pushmark s 6 <0> padav[@a:-437,-436] l @@ -207,9 +207,9 @@ checkOptree ( name => 'sub {my @a; @a = sort @a}', a <2> aassign[t2] KS/COMMON b <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 427 optree_sort.t:172) v +# 1 <;> nextstate(main 427 optree_sort.t:172) v:>,<,% # 2 <0> padav[@a:427,428] vM/LVINTRO -# 3 <;> nextstate(main 428 optree_sort.t:173) v +# 3 <;> nextstate(main 428 optree_sort.t:173) v:>,<,% # 4 <0> pushmark s # 5 <0> pushmark s # 6 <0> padav[@a:427,428] l @@ -223,12 +223,12 @@ EONT_EONT checkOptree ( name => 'my @a; @a = sort @a', prog => 'my @a; @a = sort @a', bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v:{ +2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> padav[@a:1,2] vM/LVINTRO -4 <;> nextstate(main 2 -e:1) v:{ +4 <;> nextstate(main 2 -e:1) v:>,<,%,{ 5 <0> pushmark s 6 <0> pushmark s 7 <0> padav[@a:1,2] lRM* @@ -236,9 +236,9 @@ checkOptree ( name => 'my @a; @a = sort @a', 9 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v:{ +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> padav[@a:1,2] vM/LVINTRO -# 4 <;> nextstate(main 2 -e:1) v:{ +# 4 <;> nextstate(main 2 -e:1) v:>,<,%,{ # 5 <0> pushmark s # 6 <0> pushmark s # 7 <0> padav[@a:1,2] lRM* @@ -250,30 +250,30 @@ checkOptree ( name => 'sub {my @a; @a = sort @a; push @a, 1}', code => sub {my @a; @a = sort @a; push @a, 1}, bcopts => '-exec', debug => 0, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main -437 optree.t:325) v +1 <;> nextstate(main -437 optree.t:325) v:>,<,% 2 <0> padav[@a:-437,-436] vM/LVINTRO -3 <;> nextstate(main -436 optree.t:325) v +3 <;> nextstate(main -436 optree.t:325) v:>,<,% 4 <0> pushmark s 5 <0> pushmark s 6 <0> padav[@a:-437,-436] lRM* 7 <@> sort lK/INPLACE -8 <;> nextstate(main -436 optree.t:325) v:{ +8 <;> nextstate(main -436 optree.t:325) v:>,<,%,{ 9 <0> pushmark s a <0> padav[@a:-437,-436] lRM b <$> const[IV 1] s c <@> push[t3] sK/2 d <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 429 optree_sort.t:219) v +# 1 <;> nextstate(main 429 optree_sort.t:219) v:>,<,% # 2 <0> padav[@a:429,430] vM/LVINTRO -# 3 <;> nextstate(main 430 optree_sort.t:220) v +# 3 <;> nextstate(main 430 optree_sort.t:220) v:>,<,% # 4 <0> pushmark s # 5 <0> pushmark s # 6 <0> padav[@a:429,430] lRM* # 7 <@> sort lK/INPLACE -# 8 <;> nextstate(main 430 optree_sort.t:220) v:{ +# 8 <;> nextstate(main 430 optree_sort.t:220) v:>,<,%,{ # 9 <0> pushmark s # a <0> padav[@a:429,430] lRM # b <$> const(IV 1) s @@ -285,27 +285,27 @@ checkOptree ( name => 'sub {my @a; @a = sort @a; 1}', code => sub {my @a; @a = sort @a; 1}, bcopts => '-exec', debug => 0, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main -437 optree.t:325) v +1 <;> nextstate(main -437 optree.t:325) v:>,<,% 2 <0> padav[@a:-437,-436] vM/LVINTRO -3 <;> nextstate(main -436 optree.t:325) v +3 <;> nextstate(main -436 optree.t:325) v:>,<,% 4 <0> pushmark s 5 <0> pushmark s 6 <0> padav[@a:-437,-436] lRM* 7 <@> sort lK/INPLACE -8 <;> nextstate(main -436 optree.t:346) v:{ +8 <;> nextstate(main -436 optree.t:346) v:>,<,%,{ 9 <$> const[IV 1] s a <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 431 optree_sort.t:250) v +# 1 <;> nextstate(main 431 optree_sort.t:250) v:>,<,% # 2 <0> padav[@a:431,432] vM/LVINTRO -# 3 <;> nextstate(main 432 optree_sort.t:251) v +# 3 <;> nextstate(main 432 optree_sort.t:251) v:>,<,% # 4 <0> pushmark s # 5 <0> pushmark s # 6 <0> padav[@a:431,432] lRM* # 7 <@> sort lK/INPLACE -# 8 <;> nextstate(main 432 optree_sort.t:251) v:{ +# 8 <;> nextstate(main 432 optree_sort.t:251) v:>,<,%,{ # 9 <$> const(IV 1) s # a <1> leavesub[1 ref] K/REFC,1 EONT_EONT diff --git a/ext/B/t/optree_specials.t b/ext/B/t/optree_specials.t index 5db9d02078..ce1cea5e9c 100644 --- a/ext/B/t/optree_specials.t +++ b/ext/B/t/optree_specials.t @@ -51,7 +51,7 @@ checkOptree ( name => 'BEGIN', bcopts => 'BEGIN', prog => $src, @warnings_todo, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # BEGIN 1: # b <1> leavesub[1 ref] K/REFC,1 ->(end) @@ -70,7 +70,7 @@ checkOptree ( name => 'BEGIN', # BEGIN 2: # f <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->f -# c <;> nextstate(main 2 -e:1) v:{ ->d +# c <;> nextstate(main 2 -e:1) v:>,<,%,{ ->d # e <1> postinc[t3] sK/1 ->f # - <1> ex-rv2sv sKRM/1 ->e # d <#> gvsv[*beg] s ->e @@ -92,7 +92,7 @@ EOT_EOT # BEGIN 2: # f <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->f -# c <;> nextstate(main 2 -e:1) v:{ ->d +# c <;> nextstate(main 2 -e:1) v:>,<,%,{ ->d # e <1> postinc[t2] sK/1 ->f # - <1> ex-rv2sv sKRM/1 ->e # d <$> gvsv(*beg) s ->e @@ -102,12 +102,12 @@ EONT_EONT checkOptree ( name => 'END', bcopts => 'END', prog => $src, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # END 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 5 -e:6) v:{ ->2 +# 1 <;> nextstate(main 5 -e:6) v:>,<,%,{ ->2 # 3 <1> postinc[t3] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <#> gvsv[*end] s ->3 @@ -115,7 +115,7 @@ EOT_EOT # END 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 5 -e:6) v:{ ->2 +# 1 <;> nextstate(main 5 -e:6) v:>,<,%,{ ->2 # 3 <1> postinc[t2] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <$> gvsv(*end) s ->3 @@ -125,12 +125,12 @@ EONT_EONT checkOptree ( name => 'CHECK', bcopts => 'CHECK', prog => $src, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # CHECK 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 3 -e:4) v:{ ->2 +# 1 <;> nextstate(main 3 -e:4) v:>,<,%,{ ->2 # 3 <1> postinc[t3] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <#> gvsv[*chk] s ->3 @@ -138,7 +138,7 @@ EOT_EOT # CHECK 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 3 -e:4) v:{ ->2 +# 1 <;> nextstate(main 3 -e:4) v:>,<,%,{ ->2 # 3 <1> postinc[t2] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <$> gvsv(*chk) s ->3 @@ -147,12 +147,12 @@ EONT_EONT checkOptree ( name => 'UNITCHECK', bcopts => 'UNITCHECK', prog => $src, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # UNITCHECK 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 3 -e:4) v:{ ->2 +# 1 <;> nextstate(main 3 -e:4) v:>,<,%,{ ->2 # 3 <1> postinc[t3] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <#> gvsv[*uc] s ->3 @@ -160,7 +160,7 @@ EOT_EOT # UNITCHECK 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 3 -e:4) v:{ ->2 +# 1 <;> nextstate(main 3 -e:4) v:>,<,%,{ ->2 # 3 <1> postinc[t2] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <$> gvsv(*uc) s ->3 @@ -171,12 +171,12 @@ checkOptree ( name => 'INIT', bcopts => 'INIT', #todo => 'get working', prog => $src, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # INIT 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 4 -e:5) v:{ ->2 +# 1 <;> nextstate(main 4 -e:5) v:>,<,%,{ ->2 # 3 <1> postinc[t3] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <#> gvsv[*init] s ->3 @@ -184,7 +184,7 @@ EOT_EOT # INIT 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 4 -e:5) v:{ ->2 +# 1 <;> nextstate(main 4 -e:5) v:>,<,%,{ ->2 # 3 <1> postinc[t2] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <$> gvsv(*init) s ->3 @@ -195,7 +195,7 @@ checkOptree ( name => 'all of BEGIN END INIT CHECK UNITCHECK -exec', bcopts => [qw/ BEGIN END INIT CHECK UNITCHECK -exec /], prog => $src, @warnings_todo, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # BEGIN 1: # 1 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ @@ -210,27 +210,27 @@ checkOptree ( name => 'all of BEGIN END INIT CHECK UNITCHECK -exec', # a <1> entersub[t1] KS*/TARG,2 # b <1> leavesub[1 ref] K/REFC,1 # BEGIN 2: -# c <;> nextstate(main 2 -e:1) v:{ +# c <;> nextstate(main 2 -e:1) v:>,<,%,{ # d <#> gvsv[*beg] s # e <1> postinc[t3] sK/1 # f <1> leavesub[1 ref] K/REFC,1 # END 1: -# g <;> nextstate(main 5 -e:1) v:{ +# g <;> nextstate(main 5 -e:1) v:>,<,%,{ # h <#> gvsv[*end] s # i <1> postinc[t3] sK/1 # j <1> leavesub[1 ref] K/REFC,1 # INIT 1: -# k <;> nextstate(main 4 -e:1) v:{ +# k <;> nextstate(main 4 -e:1) v:>,<,%,{ # l <#> gvsv[*init] s # m <1> postinc[t3] sK/1 # n <1> leavesub[1 ref] K/REFC,1 # CHECK 1: -# o <;> nextstate(main 3 -e:1) v:{ +# o <;> nextstate(main 3 -e:1) v:>,<,%,{ # p <#> gvsv[*chk] s # q <1> postinc[t3] sK/1 # r <1> leavesub[1 ref] K/REFC,1 # UNITCHECK 1: -# s <;> nextstate(main 6 -e:1) v:{ +# s <;> nextstate(main 6 -e:1) v:>,<,%,{ # t <#> gvsv[*uc] s # u <1> postinc[t3] sK/1 # v <1> leavesub[1 ref] K/REFC,1 @@ -248,27 +248,27 @@ EOT_EOT # a <1> entersub[t1] KS*/TARG,2 # b <1> leavesub[1 ref] K/REFC,1 # BEGIN 2: -# c <;> nextstate(main 2 -e:1) v:{ +# c <;> nextstate(main 2 -e:1) v:>,<,%,{ # d <$> gvsv(*beg) s # e <1> postinc[t2] sK/1 # f <1> leavesub[1 ref] K/REFC,1 # END 1: -# g <;> nextstate(main 5 -e:1) v:{ +# g <;> nextstate(main 5 -e:1) v:>,<,%,{ # h <$> gvsv(*end) s # i <1> postinc[t2] sK/1 # j <1> leavesub[1 ref] K/REFC,1 # INIT 1: -# k <;> nextstate(main 4 -e:1) v:{ +# k <;> nextstate(main 4 -e:1) v:>,<,%,{ # l <$> gvsv(*init) s # m <1> postinc[t2] sK/1 # n <1> leavesub[1 ref] K/REFC,1 # CHECK 1: -# o <;> nextstate(main 3 -e:1) v:{ +# o <;> nextstate(main 3 -e:1) v:>,<,%,{ # p <$> gvsv(*chk) s # q <1> postinc[t2] sK/1 # r <1> leavesub[1 ref] K/REFC,1 # UNITCHECK 1: -# s <;> nextstate(main 6 -e:1) v:{ +# s <;> nextstate(main 6 -e:1) v:>,<,%,{ # t <$> gvsv(*uc) s # u <1> postinc[t2] sK/1 # v <1> leavesub[1 ref] K/REFC,1 diff --git a/ext/B/t/optree_varinit.t b/ext/B/t/optree_varinit.t index 040757bf13..5c8f619629 100644 --- a/ext/B/t/optree_varinit.t +++ b/ext/B/t/optree_varinit.t @@ -26,13 +26,13 @@ pass("OPTIMIZER TESTS - VAR INITIALIZATION"); checkOptree ( name => 'sub {my $a}', bcopts => '-exec', code => sub {my $a}, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 45 optree.t:23) v +# 1 <;> nextstate(main 45 optree.t:23) v:>,<,% # 2 <0> padsv[$a:45,46] M/LVINTRO # 3 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 45 optree.t:23) v +# 1 <;> nextstate(main 45 optree.t:23) v:>,<,% # 2 <0> padsv[$a:45,46] M/LVINTRO # 3 <1> leavesub[1 ref] K/REFC,1 EONT_EONT @@ -40,13 +40,13 @@ EONT_EONT checkOptree ( name => '-exec sub {my $a}', bcopts => '-exec', code => sub {my $a}, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 49 optree.t:52) v +# 1 <;> nextstate(main 49 optree.t:52) v:>,<,% # 2 <0> padsv[$a:49,50] M/LVINTRO # 3 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 49 optree.t:45) v +# 1 <;> nextstate(main 49 optree.t:45) v:>,<,% # 2 <0> padsv[$a:49,50] M/LVINTRO # 3 <1> leavesub[1 ref] K/REFC,1 EONT_EONT @@ -54,13 +54,13 @@ EONT_EONT checkOptree ( name => 'sub {our $a}', bcopts => '-exec', code => sub {our $a}, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main 21 optree.t:47) v +1 <;> nextstate(main 21 optree.t:47) v:>,<,% 2 <#> gvsv[*a] s/OURINTR 3 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 51 optree.t:56) v +# 1 <;> nextstate(main 51 optree.t:56) v:>,<,% # 2 <$> gvsv(*a) s/OURINTR # 3 <1> leavesub[1 ref] K/REFC,1 EONT_EONT @@ -68,13 +68,13 @@ EONT_EONT checkOptree ( name => 'sub {local $a}', bcopts => '-exec', code => sub {local $a}, - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main 23 optree.t:57) v:{ +1 <;> nextstate(main 23 optree.t:57) v:>,<,%,{ 2 <#> gvsv[*a] s/LVINTRO 3 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 53 optree.t:67) v:{ +# 1 <;> nextstate(main 53 optree.t:67) v:>,<,%,{ # 2 <$> gvsv(*a) s/LVINTRO # 3 <1> leavesub[1 ref] K/REFC,1 EONT_EONT @@ -82,33 +82,33 @@ EONT_EONT checkOptree ( name => 'my $a', prog => 'my $a', bcopts => '-basic', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 4 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v:{ ->3 +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 3 <0> padsv[$a:1,2] vM/LVINTRO ->4 EOT_EOT # 4 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v:{ ->3 +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 3 <0> padsv[$a:1,2] vM/LVINTRO ->4 EONT_EONT checkOptree ( name => 'our $a', prog => 'our $a', bcopts => '-basic', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 4 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 -2 <;> nextstate(main 1 -e:1) v:{ ->3 +2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 - <1> ex-rv2sv vK/17 ->4 3 <#> gvsv[*a] s/OURINTR ->4 EOT_EOT # 4 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v:{ ->3 +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # - <1> ex-rv2sv vK/17 ->4 # 3 <$> gvsv(*a) s/OURINTR ->4 EONT_EONT @@ -117,17 +117,17 @@ checkOptree ( name => 'local $a', prog => 'local $a', errs => ['Name "main::a" used only once: possible typo at -e line 1.'], bcopts => '-basic', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 4 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 -2 <;> nextstate(main 1 -e:1) v:{ ->3 +2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 - <1> ex-rv2sv vKM/129 ->4 3 <#> gvsv[*a] s/LVINTRO ->4 EOT_EOT # 4 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v:{ ->3 +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # - <1> ex-rv2sv vKM/129 ->4 # 3 <$> gvsv(*a) s/LVINTRO ->4 EONT_EONT @@ -137,18 +137,18 @@ pass("MY, OUR, LOCAL, BOTH SUB AND MAIN, = undef"); checkOptree ( name => 'sub {my $a=undef}', code => sub {my $a=undef}, bcopts => '-basic', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 5 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->5 -1 <;> nextstate(main 641 optree_varinit.t:130) v ->2 +1 <;> nextstate(main 641 optree_varinit.t:130) v:>,<,% ->2 4 <2> sassign sKS/2 ->5 2 <0> undef s ->3 3 <0> padsv[$a:641,642] sRM*/LVINTRO ->4 EOT_EOT # 5 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->5 -# 1 <;> nextstate(main 641 optree_varinit.t:130) v ->2 +# 1 <;> nextstate(main 641 optree_varinit.t:130) v:>,<,% ->2 # 4 <2> sassign sKS/2 ->5 # 2 <0> undef s ->3 # 3 <0> padsv[$a:641,642] sRM*/LVINTRO ->4 @@ -158,11 +158,11 @@ checkOptree ( name => 'sub {our $a=undef}', code => sub {our $a=undef}, note => 'the global must be reset', bcopts => '-basic', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 5 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->5 -1 <;> nextstate(main 26 optree.t:109) v:{ ->2 +1 <;> nextstate(main 26 optree.t:109) v:>,<,%,{ ->2 4 <2> sassign sKS/2 ->5 2 <0> undef s ->3 - <1> ex-rv2sv sKRM*/17 ->4 @@ -170,7 +170,7 @@ checkOptree ( name => 'sub {our $a=undef}', EOT_EOT # 5 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->5 -# 1 <;> nextstate(main 446 optree_varinit.t:137) v:{ ->2 +# 1 <;> nextstate(main 446 optree_varinit.t:137) v:>,<,%,{ ->2 # 4 <2> sassign sKS/2 ->5 # 2 <0> undef s ->3 # - <1> ex-rv2sv sKRM*/17 ->4 @@ -181,11 +181,11 @@ checkOptree ( name => 'sub {local $a=undef}', code => sub {local $a=undef}, note => 'local not used enough to bother', bcopts => '-basic', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 5 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->5 -1 <;> nextstate(main 28 optree.t:122) v:{ ->2 +1 <;> nextstate(main 28 optree.t:122) v:>,<,%,{ ->2 4 <2> sassign sKS/2 ->5 2 <0> undef s ->3 - <1> ex-rv2sv sKRM*/129 ->4 @@ -193,7 +193,7 @@ checkOptree ( name => 'sub {local $a=undef}', EOT_EOT # 5 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->5 -# 1 <;> nextstate(main 58 optree.t:141) v:{ ->2 +# 1 <;> nextstate(main 58 optree.t:141) v:>,<,%,{ ->2 # 4 <2> sassign sKS/2 ->5 # 2 <0> undef s ->3 # - <1> ex-rv2sv sKRM*/129 ->4 @@ -203,18 +203,18 @@ EONT_EONT checkOptree ( name => 'my $a=undef', prog => 'my $a=undef', bcopts => '-basic', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 6 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 -2 <;> nextstate(main 1 -e:1) v:{ ->3 +2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 5 <2> sassign vKS/2 ->6 3 <0> undef s ->4 4 <0> padsv[$a:1,2] sRM*/LVINTRO ->5 EOT_EOT # 6 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v:{ ->3 +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 5 <2> sassign vKS/2 ->6 # 3 <0> undef s ->4 # 4 <0> padsv[$a:1,2] sRM*/LVINTRO ->5 @@ -224,11 +224,11 @@ checkOptree ( name => 'our $a=undef', prog => 'our $a=undef', note => 'global must be reassigned', bcopts => '-basic', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 6 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 -2 <;> nextstate(main 1 -e:1) v:{ ->3 +2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 5 <2> sassign vKS/2 ->6 3 <0> undef s ->4 - <1> ex-rv2sv sKRM*/17 ->5 @@ -236,7 +236,7 @@ checkOptree ( name => 'our $a=undef', EOT_EOT # 6 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v:{ ->3 +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 5 <2> sassign vKS/2 ->6 # 3 <0> undef s ->4 # - <1> ex-rv2sv sKRM*/17 ->5 @@ -248,11 +248,11 @@ checkOptree ( name => 'local $a=undef', errs => ['Name "main::a" used only once: possible typo at -e line 1.'], note => 'locals are rare, probly not worth doing', bcopts => '-basic', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 6 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 -2 <;> nextstate(main 1 -e:1) v:{ ->3 +2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 5 <2> sassign vKS/2 ->6 3 <0> undef s ->4 - <1> ex-rv2sv sKRM*/129 ->5 @@ -260,7 +260,7 @@ checkOptree ( name => 'local $a=undef', EOT_EOT # 6 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v:{ ->3 +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 5 <2> sassign vKS/2 ->6 # 3 <0> undef s ->4 # - <1> ex-rv2sv sKRM*/129 ->5 @@ -270,15 +270,15 @@ EONT_EONT checkOptree ( name => 'sub {my $a=()}', code => sub {my $a=()}, bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main -439 optree.t:105) v +1 <;> nextstate(main -439 optree.t:105) v:>,<,% 2 <0> stub sP 3 <0> padsv[$a:-439,-438] sRM*/LVINTRO 4 <2> sassign sKS/2 5 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 438 optree_varinit.t:247) v +# 1 <;> nextstate(main 438 optree_varinit.t:247) v:>,<,% # 2 <0> stub sP # 3 <0> padsv[$a:438,439] sRM*/LVINTRO # 4 <2> sassign sKS/2 @@ -289,15 +289,15 @@ checkOptree ( name => 'sub {our $a=()}', code => sub {our $a=()}, #todo => 'probly not worth doing', bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main 31 optree.t:177) v:{ +1 <;> nextstate(main 31 optree.t:177) v:>,<,%,{ 2 <0> stub sP 3 <#> gvsv[*a] s/OURINTR 4 <2> sassign sKS/2 5 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 440 optree_varinit.t:262) v:{ +# 1 <;> nextstate(main 440 optree_varinit.t:262) v:>,<,%,{ # 2 <0> stub sP # 3 <$> gvsv(*a) s/OURINTR # 4 <2> sassign sKS/2 @@ -308,15 +308,15 @@ checkOptree ( name => 'sub {local $a=()}', code => sub {local $a=()}, #todo => 'probly not worth doing', bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main 33 optree.t:190) v:{ +1 <;> nextstate(main 33 optree.t:190) v:>,<,%,{ 2 <0> stub sP 3 <#> gvsv[*a] s/LVINTRO 4 <2> sassign sKS/2 5 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 63 optree.t:225) v:{ +# 1 <;> nextstate(main 63 optree.t:225) v:>,<,%,{ # 2 <0> stub sP # 3 <$> gvsv(*a) s/LVINTRO # 4 <2> sassign sKS/2 @@ -326,17 +326,17 @@ EONT_EONT checkOptree ( name => 'my $a=()', prog => 'my $a=()', bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v:{ +2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> stub sP 4 <0> padsv[$a:1,2] sRM*/LVINTRO 5 <2> sassign vKS/2 6 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v:{ +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> stub sP # 4 <0> padsv[$a:1,2] sRM*/LVINTRO # 5 <2> sassign vKS/2 @@ -347,17 +347,17 @@ checkOptree ( name => 'our $a=()', prog => 'our $a=()', #todo => 'probly not worth doing', bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v:{ +2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> stub sP 4 <#> gvsv[*a] s/OURINTR 5 <2> sassign vKS/2 6 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v:{ +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> stub sP # 4 <$> gvsv(*a) s/OURINTR # 5 <2> sassign vKS/2 @@ -369,17 +369,17 @@ checkOptree ( name => 'local $a=()', errs => ['Name "main::a" used only once: possible typo at -e line 1.'], #todo => 'probly not worth doing', bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v:{ +2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> stub sP 4 <#> gvsv[*a] s/LVINTRO 5 <2> sassign vKS/2 6 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v:{ +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> stub sP # 4 <$> gvsv(*a) s/LVINTRO # 5 <2> sassign vKS/2 @@ -390,10 +390,10 @@ checkOptree ( name => 'my ($a,$b)=()', prog => 'my ($a,$b)=()', #todo => 'probly not worth doing', bcopts => '-exec', - @open_todo, + strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v:{ +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <0> pushmark sRM*/128 # 5 <0> padsv[$a:1,2] lRM*/LVINTRO @@ -402,7 +402,7 @@ checkOptree ( name => 'my ($a,$b)=()', # 8 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v:{ +# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <0> pushmark sRM*/128 # 5 <0> padsv[$a:1,2] lRM*/LVINTRO |