diff options
Diffstat (limited to 'ext/B/t')
-rw-r--r-- | ext/B/t/optree_samples.t | 186 |
1 files changed, 89 insertions, 97 deletions
diff --git a/ext/B/t/optree_samples.t b/ext/B/t/optree_samples.t index 7374626663..7b63f6f141 100644 --- a/ext/B/t/optree_samples.t +++ b/ext/B/t/optree_samples.t @@ -240,38 +240,36 @@ checkOptree ( name => '-exec sub { foreach (1..10) {print "foo $_"} }', # 3 <$> const[IV 1] s # 4 <$> const[IV 10] s # 5 <#> gv[*_] s -# 6 <{> enteriter(next->d last->g redo->7) KS/DEF -# e <0> iter s -# f <|> and(other->7) K/1 -# 7 <;> nextstate(main 442 optree.t:158) v:>,<,% +# 6 <{> enteriter(next->c last->f redo->7) KS/DEF +# d <0> iter s +# e <|> and(other->7) K/1 +# 7 <;> nextstate(main 1659 optree_samples.t:234) v # 8 <0> pushmark s -# 9 <$> const[PV "foo "] s -# a <#> gvsv[*_] s -# b <2> concat[t4] sK/2 -# c <@> print vK -# d <0> unstack s -# goto e -# g <2> leaveloop K/2 -# h <1> leavesub[1 ref] K/REFC,1 +# 9 <#> gvsv[*_] s +# a <+> multiconcat("foo ",4,-1)[t5] sK/STRINGIFY +# b <@> print vK +# c <0> unstack s +# goto d +# f <2> leaveloop K/2 +# g <1> leavesub[1 ref] K/REFC,1 EOT_EOT # 1 <;> nextstate(main 444 optree_samples.t:182) v:>,<,% # 2 <0> pushmark s # 3 <$> const(IV 1) s # 4 <$> const(IV 10) s # 5 <$> gv(*_) s -# 6 <{> enteriter(next->d last->g redo->7) KS/DEF -# e <0> iter s -# f <|> and(other->7) K/1 +# 6 <{> enteriter(next->c last->f redo->7) KS/DEF +# d <0> iter s +# e <|> and(other->7) K/1 # 7 <;> nextstate(main 443 optree_samples.t:182) v:>,<,% # 8 <0> pushmark s -# 9 <$> const(PV "foo ") s -# a <$> gvsv(*_) s -# b <2> concat[t3] sK/2 -# c <@> print vK -# d <0> unstack s -# goto e -# g <2> leaveloop K/2 -# h <1> leavesub[1 ref] K/REFC,1 +# 9 <$> gvsv(*_) s +# a <+> multiconcat("foo ",4,-1)[t4] sK/STRINGIFY +# b <@> print vK +# c <0> unstack s +# goto d +# f <2> leaveloop K/2 +# g <1> leavesub[1 ref] K/REFC,1 EONT_EONT checkOptree ( name => '-basic sub { print "foo $_" foreach (1..10) }', @@ -279,55 +277,53 @@ checkOptree ( name => '-basic sub { print "foo $_" foreach (1..10) }', bcopts => '-basic', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# g <1> leavesub[1 ref] K/REFC,1 ->(end) -# - <@> lineseq KP ->g +# f <1> leavesub[1 ref] K/REFC,1 ->(end) +# - <@> lineseq KP ->f # 1 <;> nextstate(main 445 optree.t:167) v:>,<,% ->2 -# f <2> leaveloop K/2 ->g -# 6 <{> enteriter(next->c last->f redo->7) KS/DEF ->d +# e <2> leaveloop K/2 ->f +# 6 <{> enteriter(next->b last->e redo->7) KS/DEF ->c # - <0> ex-pushmark s ->2 # - <1> ex-list lK ->5 # 2 <0> pushmark s ->3 # 3 <$> const[IV 1] s ->4 # 4 <$> const[IV 10] s ->5 # 5 <#> gv[*_] s ->6 -# - <1> null K/1 ->f -# e <|> and(other->7) K/1 ->f -# d <0> iter s ->e +# - <1> null K/1 ->e +# d <|> and(other->7) K/1 ->e +# c <0> iter s ->d # - <@> lineseq sK ->- -# b <@> print vK ->c +# a <@> print vK ->b # 7 <0> pushmark s ->8 -# - <1> ex-stringify sK/1 ->b -# - <0> ex-pushmark s ->8 -# a <2> concat[t2] sK/2 ->b -# 8 <$> const[PV "foo "] s ->9 -# - <1> ex-rv2sv sK/1 ->a -# 9 <#> gvsv[*_] s ->a -# c <0> unstack s ->d +# 9 <+> multiconcat("foo ",4,-1)[t3] sK/STRINGIFY ->a +# - <0> ex-pushmark s ->- +# - <0> ex-const s ->8 +# - <1> ex-rv2sv sK/1 ->9 +# 8 <#> gvsv[*_] s ->9 +# b <0> unstack s ->c EOT_EOT -# g <1> leavesub[1 ref] K/REFC,1 ->(end) -# - <@> lineseq KP ->g +# f <1> leavesub[1 ref] K/REFC,1 ->(end) +# - <@> lineseq KP ->f # 1 <;> nextstate(main 446 optree_samples.t:192) v:>,<,% ->2 -# f <2> leaveloop K/2 ->g -# 6 <{> enteriter(next->c last->f redo->7) KS/DEF ->d +# e <2> leaveloop K/2 ->f +# 6 <{> enteriter(next->b last->e redo->7) KS/DEF ->c # - <0> ex-pushmark s ->2 # - <1> ex-list lK ->5 # 2 <0> pushmark s ->3 # 3 <$> const(IV 1) s ->4 # 4 <$> const(IV 10) s ->5 # 5 <$> gv(*_) s ->6 -# - <1> null K/1 ->f -# e <|> and(other->7) K/1 ->f -# d <0> iter s ->e +# - <1> null K/1 ->e +# d <|> and(other->7) K/1 ->e +# c <0> iter s ->d # - <@> lineseq sK ->- -# b <@> print vK ->c +# a <@> print vK ->b # 7 <0> pushmark s ->8 -# - <1> ex-stringify sK/1 ->b -# - <0> ex-pushmark s ->8 -# a <2> concat[t1] sK/2 ->b -# 8 <$> const(PV "foo ") s ->9 -# - <1> ex-rv2sv sK/1 ->a -# 9 <$> gvsv(*_) s ->a -# c <0> unstack s ->d +# 9 <+> multiconcat("foo ",4,-1)[t2] sK/STRINGIFY ->a +# - <0> ex-pushmark s ->- +# - <0> ex-const s ->8 +# - <1> ex-rv2sv sK/1 ->9 +# 8 <$> gvsv(*_) s ->9 +# b <0> unstack s ->c EONT_EONT checkOptree ( name => '-exec -e foreach (1..10) {print qq{foo $_}}', @@ -341,19 +337,18 @@ checkOptree ( name => '-exec -e foreach (1..10) {print qq{foo $_}}', # 4 <$> const[IV 1] s # 5 <$> const[IV 10] s # 6 <#> gv[*_] s -# 7 <{> enteriter(next->e last->h redo->8) vKS/DEF -# f <0> iter s -# g <|> and(other->8) vK/1 +# 7 <{> enteriter(next->d last->g redo->8) vKS/DEF +# e <0> iter s +# f <|> and(other->8) vK/1 # 8 <;> nextstate(main 1 -e:1) v:>,<,% # 9 <0> pushmark s -# a <$> const[PV "foo "] s -# b <#> gvsv[*_] s -# c <2> concat[t4] sK/2 -# d <@> print vK -# e <0> unstack v -# goto f -# h <2> leaveloop vK/2 -# i <@> leave[1 ref] vKP/REFC +# a <#> gvsv[*_] s +# b <+> multiconcat("foo ",4,-1)[t5] sK/STRINGIFY +# c <@> print vK +# d <0> unstack v +# goto e +# g <2> leaveloop vK/2 +# h <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter # 2 <;> nextstate(main 2 -e:1) v:>,<,%,{ @@ -361,19 +356,18 @@ EOT_EOT # 4 <$> const(IV 1) s # 5 <$> const(IV 10) s # 6 <$> gv(*_) s -# 7 <{> enteriter(next->e last->h redo->8) vKS/DEF -# f <0> iter s -# g <|> and(other->8) vK/1 +# 7 <{> enteriter(next->d last->g redo->8) vKS/DEF +# e <0> iter s +# f <|> and(other->8) vK/1 # 8 <;> nextstate(main 1 -e:1) v:>,<,% # 9 <0> pushmark s -# a <$> const(PV "foo ") s -# b <$> gvsv(*_) s -# c <2> concat[t3] sK/2 -# d <@> print vK -# e <0> unstack v -# goto f -# h <2> leaveloop vK/2 -# i <@> leave[1 ref] vKP/REFC +# a <$> gvsv(*_) s +# b <+> multiconcat("foo ",4,-1)[t4] sK/STRINGIFY +# c <@> print vK +# d <0> unstack v +# goto e +# g <2> leaveloop vK/2 +# h <@> leave[1 ref] vKP/REFC EONT_EONT checkOptree ( name => '-exec sub { print "foo $_" foreach (1..10) }', @@ -386,36 +380,34 @@ checkOptree ( name => '-exec sub { print "foo $_" foreach (1..10) }', # 3 <$> const[IV 1] s # 4 <$> const[IV 10] s # 5 <#> gv[*_] s -# 6 <{> enteriter(next->c last->f redo->7) KS/DEF -# d <0> iter s -# e <|> and(other->7) K/1 +# 6 <{> enteriter(next->b last->e redo->7) KS/DEF +# c <0> iter s +# d <|> and(other->7) K/1 # 7 <0> pushmark s -# 8 <$> const[PV "foo "] s -# 9 <#> gvsv[*_] s -# a <2> concat[t2] sK/2 -# b <@> print vK -# c <0> unstack s -# goto d -# f <2> leaveloop K/2 -# g <1> leavesub[1 ref] K/REFC,1 +# 8 <#> gvsv[*_] s +# 9 <+> multiconcat("foo ",4,-1)[t3] sK/STRINGIFY +# a <@> print vK +# b <0> unstack s +# goto c +# e <2> leaveloop K/2 +# f <1> leavesub[1 ref] K/REFC,1 EOT_EOT # 1 <;> nextstate(main 447 optree_samples.t:252) v:>,<,% # 2 <0> pushmark s # 3 <$> const(IV 1) s # 4 <$> const(IV 10) s # 5 <$> gv(*_) s -# 6 <{> enteriter(next->c last->f redo->7) KS/DEF -# d <0> iter s -# e <|> and(other->7) K/1 +# 6 <{> enteriter(next->b last->e redo->7) KS/DEF +# c <0> iter s +# d <|> and(other->7) K/1 # 7 <0> pushmark s -# 8 <$> const(PV "foo ") s -# 9 <$> gvsv(*_) s -# a <2> concat[t1] sK/2 -# b <@> print vK -# c <0> unstack s -# goto d -# f <2> leaveloop K/2 -# g <1> leavesub[1 ref] K/REFC,1 +# 8 <$> gvsv(*_) s +# 9 <+> multiconcat("foo ",4,-1)[t2] sK/STRINGIFY +# a <@> print vK +# b <0> unstack s +# goto c +# e <2> leaveloop K/2 +# f <1> leavesub[1 ref] K/REFC,1 EONT_EONT pass("GREP: SAMPLES FROM PERLDOC -F GREP"); |