summaryrefslogtreecommitdiff
path: root/ext/B/t/optree_specials.t
diff options
context:
space:
mode:
authorJim Cromie <jcromie@cpan.org>2007-09-25 11:34:09 -0600
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-09-26 08:34:48 +0000
commit9e0f97507d3f3dc49e5c397e7bec3dea72f4e397 (patch)
tree0adab2c73cf0c1425d7edbb02dbaf33c7cdfc119 /ext/B/t/optree_specials.t
parent4de3a27464ebbd2f448ca8d55cd1081d4029f5c1 (diff)
downloadperl-9e0f97507d3f3dc49e5c397e7bec3dea72f4e397.tar.gz
Re: [patch] improve B::Concise -src support
Message-ID: <46F99AF1.1080108@gmail.com> p4raw-id: //depot/perl@31973
Diffstat (limited to 'ext/B/t/optree_specials.t')
-rw-r--r--ext/B/t/optree_specials.t332
1 files changed, 242 insertions, 90 deletions
diff --git a/ext/B/t/optree_specials.t b/ext/B/t/optree_specials.t
index 7e84076f8c..83a0ded10e 100644
--- a/ext/B/t/optree_specials.t
+++ b/ext/B/t/optree_specials.t
@@ -56,46 +56,102 @@ checkOptree ( name => 'BEGIN',
# BEGIN 1:
# b <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->b
-# 1 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ ->2
+# 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,$ ->2
# 3 <1> require sK/1 ->4
-# 2 <$> const[PV "warnings.pm"] s/BARE ->3
-# 4 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ ->5
+# 2 <$> const[PV "strict.pm"] s/BARE ->3
+# 4 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,$ ->5
# - <@> lineseq K ->-
-# 5 <;> nextstate(B::Concise -234 Concise.pm:328) :*,&,{,$ ->6
+# 5 <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,$ ->6
# a <1> entersub[t1] KS*/TARG,2 ->b
# 6 <0> pushmark s ->7
-# 7 <$> const[PV "warnings"] sM ->8
-# 8 <$> const[PV "qw"] sM ->9
-# 9 <$> method_named[PV "import"] ->a
+# 7 <$> const[PV "strict"] sM ->8
+# 8 <$> const[PV "refs"] sM ->9
+# 9 <$> method_named[PV "unimport"] ->a
# BEGIN 2:
-# f <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq KP ->f
-# 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
+# m <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq K ->m
+# c <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,$ ->d
+# e <1> require sK/1 ->f
+# d <$> const[PV "strict.pm"] s/BARE ->e
+# f <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,$ ->g
+# - <@> lineseq K ->-
+# g <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,$ ->h
+# l <1> entersub[t1] KS*/TARG,2 ->m
+# h <0> pushmark s ->i
+# i <$> const[PV "strict"] sM ->j
+# j <$> const[PV "refs"] sM ->k
+# k <$> method_named[PV "unimport"] ->l
+# BEGIN 3:
+# x <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->x
+# n <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,$ ->o
+# p <1> require sK/1 ->q
+# o <$> const[PV "warnings.pm"] s/BARE ->p
+# q <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,$ ->r
+# - <@> lineseq K ->-
+# r <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,$ ->s
+# w <1> entersub[t1] KS*/TARG,2 ->x
+# s <0> pushmark s ->t
+# t <$> const[PV "warnings"] sM ->u
+# u <$> const[PV "qw"] sM ->v
+# v <$> method_named[PV "unimport"] ->w
+# BEGIN 4:
+# 11 <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->11
+# y <;> nextstate(main 2 -e:1) v:{ ->z
+# 10 <1> postinc[t3] sK/1 ->11
+# - <1> ex-rv2sv sKRM/1 ->10
+# z <#> gvsv[*beg] s ->10
EOT_EOT
# BEGIN 1:
# b <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->b
-# 1 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ ->2
+# 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,$ ->2
# 3 <1> require sK/1 ->4
-# 2 <$> const(PV "warnings.pm") s/BARE ->3
-# 4 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ ->5
+# 2 <$> const(PV "strict.pm") s/BARE ->3
+# 4 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,$ ->5
# - <@> lineseq K ->-
-# 5 <;> nextstate(B::Concise -234 Concise.pm:328) :*,&,{,$ ->6
+# 5 <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,$ ->6
# a <1> entersub[t1] KS*/TARG,2 ->b
# 6 <0> pushmark s ->7
-# 7 <$> const(PV "warnings") sM ->8
-# 8 <$> const(PV "qw") sM ->9
-# 9 <$> method_named(PV "import") ->a
+# 7 <$> const(PV "strict") sM ->8
+# 8 <$> const(PV "refs") sM ->9
+# 9 <$> method_named(PV "unimport") ->a
# BEGIN 2:
-# f <1> leavesub[1 ref] K/REFC,1 ->(end)
-# - <@> lineseq KP ->f
-# 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
+# m <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq K ->m
+# c <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,$ ->d
+# e <1> require sK/1 ->f
+# d <$> const(PV "strict.pm") s/BARE ->e
+# f <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,$ ->g
+# - <@> lineseq K ->-
+# g <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,$ ->h
+# l <1> entersub[t1] KS*/TARG,2 ->m
+# h <0> pushmark s ->i
+# i <$> const(PV "strict") sM ->j
+# j <$> const(PV "refs") sM ->k
+# k <$> method_named(PV "unimport") ->l
+# BEGIN 3:
+# x <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->x
+# n <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,$ ->o
+# p <1> require sK/1 ->q
+# o <$> const(PV "warnings.pm") s/BARE ->p
+# q <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,$ ->r
+# - <@> lineseq K ->-
+# r <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,$ ->s
+# w <1> entersub[t1] KS*/TARG,2 ->x
+# s <0> pushmark s ->t
+# t <$> const(PV "warnings") sM ->u
+# u <$> const(PV "qw") sM ->v
+# v <$> method_named(PV "unimport") ->w
+# BEGIN 4:
+# 11 <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->11
+# y <;> nextstate(main 2 -e:1) v:{ ->z
+# 10 <1> postinc[t2] sK/1 ->11
+# - <1> ex-rv2sv sKRM/1 ->10
+# z <$> gvsv(*beg) s ->10
EONT_EONT
@@ -199,80 +255,128 @@ checkOptree ( name => 'all of BEGIN END INIT CHECK UNITCHECK -exec',
strip_open_hints => 1,
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# BEGIN 1:
-# 1 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$
-# 2 <$> const[PV "warnings.pm"] s/BARE
+# 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,$
+# 2 <$> const[PV "strict.pm"] s/BARE
# 3 <1> require sK/1
-# 4 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$
-# 5 <;> nextstate(B::Concise -234 Concise.pm:328) :*,&,{,$
+# 4 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,$
+# 5 <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,$
# 6 <0> pushmark s
-# 7 <$> const[PV "warnings"] sM
-# 8 <$> const[PV "qw"] sM
+# 7 <$> const[PV "strict"] sM
+# 8 <$> const[PV "refs"] sM
# 9 <$> method_named[PV "unimport"]
# a <1> entersub[t1] KS*/TARG,2
# b <1> leavesub[1 ref] K/REFC,1
# BEGIN 2:
-# 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
+# c <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,$
+# d <$> const[PV "strict.pm"] s/BARE
+# e <1> require sK/1
+# f <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,$
+# g <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,$
+# h <0> pushmark s
+# i <$> const[PV "strict"] sM
+# j <$> const[PV "refs"] sM
+# k <$> method_named[PV "unimport"]
+# l <1> entersub[t1] KS*/TARG,2
+# m <1> leavesub[1 ref] K/REFC,1
+# BEGIN 3:
+# n <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,$
+# o <$> const[PV "warnings.pm"] s/BARE
+# p <1> require sK/1
+# q <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,$
+# r <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,$
+# s <0> pushmark s
+# t <$> const[PV "warnings"] sM
+# u <$> const[PV "qw"] sM
+# v <$> method_named[PV "unimport"]
+# w <1> entersub[t1] KS*/TARG,2
+# x <1> leavesub[1 ref] K/REFC,1
+# BEGIN 4:
+# y <;> nextstate(main 2 -e:1) v:{
+# z <#> gvsv[*beg] s
+# 10 <1> postinc[t3] sK/1
+# 11 <1> leavesub[1 ref] K/REFC,1
# END 1:
-# 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
+# 12 <;> nextstate(main 5 -e:1) v:{
+# 13 <#> gvsv[*end] s
+# 14 <1> postinc[t3] sK/1
+# 15 <1> leavesub[1 ref] K/REFC,1
# INIT 1:
-# 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
+# 16 <;> nextstate(main 4 -e:1) v:{
+# 17 <#> gvsv[*init] s
+# 18 <1> postinc[t3] sK/1
+# 19 <1> leavesub[1 ref] K/REFC,1
# CHECK 1:
-# 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
+# 1a <;> nextstate(main 3 -e:1) v:{
+# 1b <#> gvsv[*chk] s
+# 1c <1> postinc[t3] sK/1
+# 1d <1> leavesub[1 ref] K/REFC,1
# UNITCHECK 1:
-# 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
+# 1e <;> nextstate(main 6 -e:1) v:{
+# 1f <#> gvsv[*uc] s
+# 1g <1> postinc[t3] sK/1
+# 1h <1> leavesub[1 ref] K/REFC,1
EOT_EOT
# BEGIN 1:
-# 1 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$
-# 2 <$> const(PV "warnings.pm") s/BARE
+# 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,$
+# 2 <$> const(PV "strict.pm") s/BARE
# 3 <1> require sK/1
-# 4 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$
-# 5 <;> nextstate(B::Concise -234 Concise.pm:328) :*,&,{,$
+# 4 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,$
+# 5 <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,$
# 6 <0> pushmark s
-# 7 <$> const(PV "warnings") sM
-# 8 <$> const(PV "qw") sM
+# 7 <$> const(PV "strict") sM
+# 8 <$> const(PV "refs") sM
# 9 <$> method_named(PV "unimport")
# a <1> entersub[t1] KS*/TARG,2
# b <1> leavesub[1 ref] K/REFC,1
# BEGIN 2:
-# 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
+# c <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,$
+# d <$> const(PV "strict.pm") s/BARE
+# e <1> require sK/1
+# f <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,$
+# g <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,$
+# h <0> pushmark s
+# i <$> const(PV "strict") sM
+# j <$> const(PV "refs") sM
+# k <$> method_named(PV "unimport")
+# l <1> entersub[t1] KS*/TARG,2
+# m <1> leavesub[1 ref] K/REFC,1
+# BEGIN 3:
+# n <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,$
+# o <$> const(PV "warnings.pm") s/BARE
+# p <1> require sK/1
+# q <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,$
+# r <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,$
+# s <0> pushmark s
+# t <$> const(PV "warnings") sM
+# u <$> const(PV "qw") sM
+# v <$> method_named(PV "unimport")
+# w <1> entersub[t1] KS*/TARG,2
+# x <1> leavesub[1 ref] K/REFC,1
+# BEGIN 4:
+# y <;> nextstate(main 2 -e:1) v:{
+# z <$> gvsv(*beg) s
+# 10 <1> postinc[t2] sK/1
+# 11 <1> leavesub[1 ref] K/REFC,1
# END 1:
-# 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
+# 12 <;> nextstate(main 5 -e:1) v:{
+# 13 <$> gvsv(*end) s
+# 14 <1> postinc[t2] sK/1
+# 15 <1> leavesub[1 ref] K/REFC,1
# INIT 1:
-# 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
+# 16 <;> nextstate(main 4 -e:1) v:{
+# 17 <$> gvsv(*init) s
+# 18 <1> postinc[t2] sK/1
+# 19 <1> leavesub[1 ref] K/REFC,1
# CHECK 1:
-# 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
+# 1a <;> nextstate(main 3 -e:1) v:{
+# 1b <$> gvsv(*chk) s
+# 1c <1> postinc[t2] sK/1
+# 1d <1> leavesub[1 ref] K/REFC,1
# UNITCHECK 1:
-# 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
+# 1e <;> nextstate(main 6 -e:1) v:{
+# 1f <$> gvsv(*uc) s
+# 1g <1> postinc[t2] sK/1
+# 1h <1> leavesub[1 ref] K/REFC,1
EONT_EONT
@@ -286,28 +390,76 @@ checkOptree ( name => 'regression test for patch 25352',
@warnings_todo,
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# BEGIN 1:
-# 1 <;> nextstate(B::Concise -234 Concise.pm:359) v:*,&,{,$
-# 2 <$> const[PV "warnings.pm"] s/BARE
+# 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,$
+# 2 <$> const[PV "strict.pm"] s/BARE
# 3 <1> require sK/1
-# 4 <;> nextstate(B::Concise -234 Concise.pm:359) v:*,&,{,$
-# 5 <;> nextstate(B::Concise -234 Concise.pm:359) :*,&,{,$
+# 4 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,$
+# 5 <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,$
# 6 <0> pushmark s
-# 7 <$> const[PV "warnings"] sM
-# 8 <$> const[PV "qw"] sM
+# 7 <$> const[PV "strict"] sM
+# 8 <$> const[PV "refs"] sM
# 9 <$> method_named[PV "unimport"]
# a <1> entersub[t1] KS*/TARG,2
# b <1> leavesub[1 ref] K/REFC,1
+# BEGIN 2:
+# c <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,$
+# d <$> const[PV "strict.pm"] s/BARE
+# e <1> require sK/1
+# f <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,$
+# g <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,$
+# h <0> pushmark s
+# i <$> const[PV "strict"] sM
+# j <$> const[PV "refs"] sM
+# k <$> method_named[PV "unimport"]
+# l <1> entersub[t1] KS*/TARG,2
+# m <1> leavesub[1 ref] K/REFC,1
+# BEGIN 3:
+# n <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,$
+# o <$> const[PV "warnings.pm"] s/BARE
+# p <1> require sK/1
+# q <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,$
+# r <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,$
+# s <0> pushmark s
+# t <$> const[PV "warnings"] sM
+# u <$> const[PV "qw"] sM
+# v <$> method_named[PV "unimport"]
+# w <1> entersub[t1] KS*/TARG,2
+# x <1> leavesub[1 ref] K/REFC,1
EOT_EOT
# BEGIN 1:
-# 1 <;> nextstate(B::Concise -234 Concise.pm:359) v:*,&,{,$
-# 2 <$> const(PV "warnings.pm") s/BARE
+# 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,$
+# 2 <$> const(PV "strict.pm") s/BARE
# 3 <1> require sK/1
-# 4 <;> nextstate(B::Concise -234 Concise.pm:359) v:*,&,{,$
-# 5 <;> nextstate(B::Concise -234 Concise.pm:359) :*,&,{,$
+# 4 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,$
+# 5 <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,$
# 6 <0> pushmark s
-# 7 <$> const(PV "warnings") sM
-# 8 <$> const(PV "qw") sM
+# 7 <$> const(PV "strict") sM
+# 8 <$> const(PV "refs") sM
# 9 <$> method_named(PV "unimport")
# a <1> entersub[t1] KS*/TARG,2
# b <1> leavesub[1 ref] K/REFC,1
+# BEGIN 2:
+# c <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,$
+# d <$> const(PV "strict.pm") s/BARE
+# e <1> require sK/1
+# f <;> nextstate(B::Concise -265 Concise.pm:367) v:*,&,$
+# g <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,$
+# h <0> pushmark s
+# i <$> const(PV "strict") sM
+# j <$> const(PV "refs") sM
+# k <$> method_named(PV "unimport")
+# l <1> entersub[t1] KS*/TARG,2
+# m <1> leavesub[1 ref] K/REFC,1
+# BEGIN 3:
+# n <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,$
+# o <$> const(PV "warnings.pm") s/BARE
+# p <1> require sK/1
+# q <;> nextstate(B::Concise -254 Concise.pm:386) v:*,&,{,$
+# r <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,$
+# s <0> pushmark s
+# t <$> const(PV "warnings") sM
+# u <$> const(PV "qw") sM
+# v <$> method_named(PV "unimport")
+# w <1> entersub[t1] KS*/TARG,2
+# x <1> leavesub[1 ref] K/REFC,1
EONT_EONT