This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regen/charset xlations.pl: Use revised UTF-8 macros
[perl5.git] / ext / B / t / optree_misc.t
CommitLineData
c60fdceb
SM
1#!perl
2
3BEGIN {
74517a3a 4 unshift @INC, 't';
c60fdceb
SM
5 require Config;
6 if (($Config::Config{'extensions'} !~ /\bB\b/) ){
7 print "1..0 # Skip -- Perl configured without B module\n";
8 exit 0;
9 }
10}
11use OptreeCheck;
12use Config;
2721a2ca 13plan tests => 18;
c60fdceb
SM
14
15SKIP: {
3857d07c 16skip "no perlio in this build", 4 unless $Config::Config{useperlio};
c60fdceb 17
93bad3fd 18# The regression this was testing is that the first aelemfast, derived
c60fdceb
SM
19# from a lexical array, is supposed to be a BASEOP "<0>", while the
20# second, from a global, is an SVOP "<$>" or a PADOP "<#>" depending
21# on threading. In buggy versions, both showed up as SVOPs/PADOPs. See
22# B.xs:cc_opclass() for the relevant code.
23
93bad3fd
NC
24# All this is much simpler, now that aelemfast_lex has been broken out from
25# aelemfast
c60fdceb 26checkOptree ( name => 'OP_AELEMFAST opclass',
b024352e 27 code => sub { my @x; our @y; $x[127] + $y[-128]},
be2b1c74 28 strip_open_hints => 1,
c60fdceb 29 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
5afbd733
FC
30# 7 <1> leavesub[1 ref] K/REFC,1 ->(end)
31# - <@> lineseq KP ->7
be2b1c74 32# 1 <;> nextstate(main 634 optree_misc.t:25) v:>,<,% ->2
c60fdceb 33# 2 <0> padav[@x:634,636] vM/LVINTRO ->3
e3da8f02 34# - <;> ex-nextstate(main 1594 optree_misc.t:27) v:>,<,% ->3
5afbd733
FC
35# - <1> rv2av[t4] vK/OURINTR,1 ->3
36# - <#> gv[*y] s ->-
37# 3 <;> nextstate(main 636 optree_misc.t:25) v:>,<,%,{ ->4
38# 6 <2> add[t6] sK/2 ->7
39# - <1> ex-aelem sK/2 ->5
e9fb18e4 40# 4 <0> aelemfast_lex[@x:634,636] sR/key=127 ->5
c60fdceb 41# - <0> ex-const s ->-
5afbd733 42# - <1> ex-aelem sK/2 ->6
c60fdceb 43# - <1> ex-rv2av sKR/1 ->-
e9fb18e4 44# 5 <#> aelemfast[*y] s/key=128 ->6
b024352e 45# - <0> ex-const s/FOLD ->-
c60fdceb 46EOT_EOT
5afbd733
FC
47# 7 <1> leavesub[1 ref] K/REFC,1 ->(end)
48# - <@> lineseq KP ->7
be2b1c74 49# 1 <;> nextstate(main 634 optree_misc.t:27) v:>,<,% ->2
c60fdceb 50# 2 <0> padav[@x:634,636] vM/LVINTRO ->3
e3da8f02 51# - <;> ex-nextstate(main 1594 optree_misc.t:27) v:>,<,% ->3
5afbd733
FC
52# - <1> rv2av[t3] vK/OURINTR,1 ->3
53# - <$> gv(*y) s ->-
54# 3 <;> nextstate(main 636 optree_misc.t:27) v:>,<,%,{ ->4
55# 6 <2> add[t4] sK/2 ->7
56# - <1> ex-aelem sK/2 ->5
e9fb18e4 57# 4 <0> aelemfast_lex[@x:634,636] sR/key=127 ->5
c60fdceb 58# - <0> ex-const s ->-
5afbd733 59# - <1> ex-aelem sK/2 ->6
c60fdceb 60# - <1> ex-rv2av sKR/1 ->-
e9fb18e4 61# 5 <$> aelemfast(*y) s/key=128 ->6
b024352e 62# - <0> ex-const s/FOLD ->-
c60fdceb
SM
63EONT_EONT
64
0090231f
NC
65checkOptree ( name => 'PMOP children',
66 code => sub { $foo =~ s/(a)/$1/ },
67 strip_open_hints => 1,
eb32218e 68 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
bb933b9b
FC
69# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
70# - <@> lineseq KP ->5
0090231f 71# 1 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->2
1455f3f5 72# 4 </> subst(/"(a)"/) sKS ->5
0090231f
NC
73# - <1> ex-rv2sv sKRM/1 ->3
74# 2 <#> gvsv[*foo] s ->3
bb933b9b
FC
75# - <1> ex-rv2sv sK/1 ->4
76# 3 <#> gvsv[*1] s ->4
0090231f 77EOT_EOT
bb933b9b
FC
78# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
79# - <@> lineseq KP ->5
0090231f 80# 1 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->2
1455f3f5 81# 4 </> subst(/"(a)"/) sKS ->5
0090231f
NC
82# - <1> ex-rv2sv sKRM/1 ->3
83# 2 <$> gvsv(*foo) s ->3
bb933b9b
FC
84# - <1> ex-rv2sv sK/1 ->4
85# 3 <$> gvsv(*1) s ->4
0090231f 86EONT_EONT
c60fdceb
SM
87
88} #skip
89
50786ba8
NC
90my $t = <<'EOT_EOT';
91# 8 <@> leave[1 ref] vKP/REFC ->(end)
5b6f7443 92# 1 <0> enter v ->2
2acfb4e0 93# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3
50786ba8
NC
94# 7 <2> sassign vKS/2 ->8
95# 5 <@> index[t2] sK/2 ->6
96# - <0> ex-pushmark s ->3
97# 3 <$> const[PV "foo"] s ->4
c13a5c80 98# 4 <$> const[PVMG "foo"] s ->5
50786ba8
NC
99# - <1> ex-rv2sv sKRM*/1 ->7
100# 6 <#> gvsv[*_] s ->7
101EOT_EOT
102my $nt = <<'EONT_EONT';
103# 8 <@> leave[1 ref] vKP/REFC ->(end)
5b6f7443 104# 1 <0> enter v ->2
2acfb4e0 105# 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3
50786ba8
NC
106# 7 <2> sassign vKS/2 ->8
107# 5 <@> index[t1] sK/2 ->6
108# - <0> ex-pushmark s ->3
109# 3 <$> const(PV "foo") s ->4
c13a5c80 110# 4 <$> const(PVMG "foo") s ->5
50786ba8
NC
111# - <1> ex-rv2sv sKRM*/1 ->7
112# 6 <$> gvsv(*_) s ->7
113EONT_EONT
114
50786ba8 115checkOptree ( name => 'index and PVBM',
22aebd37 116 prog => '$_ = index q(foo), q(foo)',
2acfb4e0 117 strip_open_hints => 1,
50786ba8 118 expect => $t, expect_nt => $nt);
35f75594 119
f85f6494
SH
120my $tmpfile = tempfile();
121open my $fh, '>', $tmpfile or die "Cannot open $tmpfile: $!";
122print $fh "no warnings;format =\n@<<<\n\$a\n@>>>\n\@b\n.";
123close $fh;
124
35f75594
FC
125checkOptree ( name => 'formats',
126 bcopts => 'STDOUT',
f85f6494 127 progfile => $tmpfile,
35f75594
FC
128 strip_open_hints => 1,
129 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
130# main::STDOUT (FORMAT):
131# c <1> leavewrite[1 ref] K/REFC,1 ->(end)
132# - <@> lineseq KP ->c
1473b834 133# 1 <;> nextstate(main 1 -:4) v:>,<,% ->2
35f75594
FC
134# 5 <@> formline vK/2 ->6
135# 2 <0> pushmark s ->3
136# 3 <$> const[PV "@<<<\n"] s ->4
137# - <@> lineseq lK ->5
e3da8f02 138# - <;> ex-nextstate(main 3 tmp35894B:3) v:>,<,% ->4
35f75594
FC
139# - <1> ex-rv2sv sK/1 ->-
140# 4 <#> gvsv[*a] s ->5
1473b834 141# 6 <;> nextstate(main 1 -:6) v:>,<,% ->7
35f75594
FC
142# b <@> formline sK/2 ->c
143# 7 <0> pushmark s ->8
144# 8 <$> const[PV "@>>>\n"] s ->9
145# - <@> lineseq lK ->b
e3da8f02 146# - <;> ex-nextstate(main 3 tmp35894B:5) v:>,<,% ->9
35f75594
FC
147# a <1> rv2av[t3] lK/1 ->b
148# 9 <#> gv[*b] s ->a
149EOT_EOT
150# main::STDOUT (FORMAT):
151# c <1> leavewrite[1 ref] K/REFC,1 ->(end)
152# - <@> lineseq KP ->c
57cbafbc 153# 1 <;> nextstate(main 1 -:4) v:>,<,% ->2
35f75594
FC
154# 5 <@> formline vK/2 ->6
155# 2 <0> pushmark s ->3
156# 3 <$> const(PV "@<<<\n") s ->4
157# - <@> lineseq lK ->5
e3da8f02 158# - <;> ex-nextstate(main 3 tmp35894B:3) v:>,<,% ->4
35f75594
FC
159# - <1> ex-rv2sv sK/1 ->-
160# 4 <$> gvsv(*a) s ->5
1473b834 161# 6 <;> nextstate(main 1 -:6) v:>,<,% ->7
35f75594
FC
162# b <@> formline sK/2 ->c
163# 7 <0> pushmark s ->8
164# 8 <$> const(PV "@>>>\n") s ->9
165# - <@> lineseq lK ->b
e3da8f02 166# - <;> ex-nextstate(main 3 tmp35894B:5) v:>,<,% ->9
35f75594
FC
167# a <1> rv2av[t3] lK/1 ->b
168# 9 <$> gv(*b) s ->a
169EONT_EONT
f85f6494 170
d5524600
DM
171checkOptree ( name => 'padrange',
172 code => sub { my ($x,$y); @a = ($x,$y); ($x,$y) = @a },
173 strip_open_hints => 1,
d5524600
DM
174 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
175# f <1> leavesub[1 ref] K/REFC,1 ->(end)
176# - <@> lineseq KP ->f
e7fd4fe6 177# 1 <;> nextstate(main 1 -e:1) v:>,<,% ->2
d5524600 178# - <@> list vKP ->3
e9fb18e4 179# 2 <0> padrange[$x:1,2; $y:1,2] vM/LVINTRO,range=2 ->3
d5524600
DM
180# - <0> padsv[$x:1,2] vM/LVINTRO ->-
181# - <0> padsv[$y:1,2] vM/LVINTRO ->-
e7fd4fe6 182# 3 <;> nextstate(main 2 -e:1) v:>,<,% ->4
a5f48505 183# 8 <2> aassign[t4] vKS/COM_AGG ->9
d5524600 184# - <1> ex-list lKP ->5
e9fb18e4 185# 4 <0> padrange[$x:1,2; $y:1,2] /range=2 ->5
1455f3f5
FC
186# - <0> padsv[$x:1,2] s ->-
187# - <0> padsv[$y:1,2] s ->-
d5524600
DM
188# - <1> ex-list lK ->8
189# 5 <0> pushmark s ->6
190# 7 <1> rv2av[t3] lKRM*/1 ->8
191# 6 <#> gv[*a] s ->7
e7fd4fe6 192# 9 <;> nextstate(main 2 -e:1) v:>,<,%,{ ->a
a5f48505 193# e <2> aassign[t6] KS/COM_RC1 ->f
d5524600
DM
194# - <1> ex-list lK ->d
195# a <0> pushmark s ->b
196# c <1> rv2av[t5] lK/1 ->d
197# b <#> gv[*a] s ->c
198# - <1> ex-list lKPRM* ->e
e9fb18e4 199# d <0> padrange[$x:1,2; $y:1,2] RM/range=2 ->e
1455f3f5
FC
200# - <0> padsv[$x:1,2] sRM* ->-
201# - <0> padsv[$y:1,2] sRM* ->-
d5524600
DM
202EOT_EOT
203# f <1> leavesub[1 ref] K/REFC,1 ->(end)
204# - <@> lineseq KP ->f
e7fd4fe6 205# 1 <;> nextstate(main 1 -e:1) v:>,<,% ->2
d5524600 206# - <@> list vKP ->3
e9fb18e4 207# 2 <0> padrange[$x:1,2; $y:1,2] vM/LVINTRO,range=2 ->3
d5524600
DM
208# - <0> padsv[$x:1,2] vM/LVINTRO ->-
209# - <0> padsv[$y:1,2] vM/LVINTRO ->-
e7fd4fe6 210# 3 <;> nextstate(main 2 -e:1) v:>,<,% ->4
a5f48505 211# 8 <2> aassign[t4] vKS/COM_AGG ->9
d5524600 212# - <1> ex-list lKP ->5
e9fb18e4 213# 4 <0> padrange[$x:1,2; $y:1,2] /range=2 ->5
1455f3f5
FC
214# - <0> padsv[$x:1,2] s ->-
215# - <0> padsv[$y:1,2] s ->-
d5524600
DM
216# - <1> ex-list lK ->8
217# 5 <0> pushmark s ->6
218# 7 <1> rv2av[t3] lKRM*/1 ->8
219# 6 <$> gv(*a) s ->7
e7fd4fe6 220# 9 <;> nextstate(main 2 -e:1) v:>,<,%,{ ->a
a5f48505 221# e <2> aassign[t6] KS/COM_RC1 ->f
d5524600
DM
222# - <1> ex-list lK ->d
223# a <0> pushmark s ->b
224# c <1> rv2av[t5] lK/1 ->d
225# b <$> gv(*a) s ->c
226# - <1> ex-list lKPRM* ->e
e9fb18e4 227# d <0> padrange[$x:1,2; $y:1,2] RM/range=2 ->e
1455f3f5
FC
228# - <0> padsv[$x:1,2] sRM* ->-
229# - <0> padsv[$y:1,2] sRM* ->-
d5524600
DM
230EONT_EONT
231
232checkOptree ( name => 'padrange and @_',
233 code => sub { my ($a,$b) = @_;
234 my ($c,$d) = @X::_;
235 package Y;
236 my ($e,$f) = @_;
237 },
238 strip_open_hints => 1,
d5524600
DM
239 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
240# d <1> leavesub[1 ref] K/REFC,1 ->(end)
241# - <@> lineseq KP ->d
e7fd4fe6 242# 1 <;> nextstate(main 1 p3:1) v:>,<,% ->2
90ce4d05 243# 3 <2> aassign[t5] vKS ->4
d5524600 244# - <1> ex-list lK ->-
e9fb18e4 245# 2 <0> padrange[$a:1,4; $b:1,4] */LVINTRO,range=2 ->3
d5524600
DM
246# - <1> rv2av[t4] lK/1 ->-
247# - <#> gv[*_] s ->-
248# - <1> ex-list lKPRM* ->3
249# - <0> pushmark sRM*/LVINTRO ->-
1455f3f5
FC
250# - <0> padsv[$a:1,4] sRM*/LVINTRO ->-
251# - <0> padsv[$b:1,4] sRM*/LVINTRO ->-
e7fd4fe6 252# 4 <;> nextstate(main 2 p3:2) v:>,<,% ->5
a5f48505 253# 9 <2> aassign[t10] vKS/COM_RC1 ->a
d5524600
DM
254# - <1> ex-list lK ->8
255# 5 <0> pushmark s ->6
256# 7 <1> rv2av[t9] lK/1 ->8
257# 6 <#> gv[*X::_] s ->7
258# - <1> ex-list lKPRM* ->9
e9fb18e4 259# 8 <0> padrange[$c:2,4; $d:2,4] RM/LVINTRO,range=2 ->9
1455f3f5
FC
260# - <0> padsv[$c:2,4] sRM*/LVINTRO ->-
261# - <0> padsv[$d:2,4] sRM*/LVINTRO ->-
e7fd4fe6 262# a <;> nextstate(Y 3 p3:4) v:>,<,%,{ ->b
90ce4d05 263# c <2> aassign[t15] KS ->d
d5524600 264# - <1> ex-list lK ->-
e9fb18e4 265# b <0> padrange[$e:3,4; $f:3,4] */LVINTRO,range=2 ->c
d5524600
DM
266# - <1> rv2av[t14] lK/1 ->-
267# - <#> gv[*_] s ->-
268# - <1> ex-list lKPRM* ->c
269# - <0> pushmark sRM*/LVINTRO ->-
1455f3f5
FC
270# - <0> padsv[$e:3,4] sRM*/LVINTRO ->-
271# - <0> padsv[$f:3,4] sRM*/LVINTRO ->-
d5524600
DM
272EOT_EOT
273# d <1> leavesub[1 ref] K/REFC,1 ->(end)
274# - <@> lineseq KP ->d
e7fd4fe6 275# 1 <;> nextstate(main 1 p3:1) v:>,<,% ->2
90ce4d05 276# 3 <2> aassign[t5] vKS ->4
d5524600 277# - <1> ex-list lK ->-
e9fb18e4 278# 2 <0> padrange[$a:1,4; $b:1,4] */LVINTRO,range=2 ->3
d5524600
DM
279# - <1> rv2av[t4] lK/1 ->-
280# - <$> gv(*_) s ->-
281# - <1> ex-list lKPRM* ->3
282# - <0> pushmark sRM*/LVINTRO ->-
1455f3f5
FC
283# - <0> padsv[$a:1,4] sRM*/LVINTRO ->-
284# - <0> padsv[$b:1,4] sRM*/LVINTRO ->-
e7fd4fe6 285# 4 <;> nextstate(main 2 p3:2) v:>,<,% ->5
a5f48505 286# 9 <2> aassign[t10] vKS/COM_RC1 ->a
d5524600
DM
287# - <1> ex-list lK ->8
288# 5 <0> pushmark s ->6
289# 7 <1> rv2av[t9] lK/1 ->8
290# 6 <$> gv(*X::_) s ->7
291# - <1> ex-list lKPRM* ->9
e9fb18e4 292# 8 <0> padrange[$c:2,4; $d:2,4] RM/LVINTRO,range=2 ->9
1455f3f5
FC
293# - <0> padsv[$c:2,4] sRM*/LVINTRO ->-
294# - <0> padsv[$d:2,4] sRM*/LVINTRO ->-
e7fd4fe6 295# a <;> nextstate(Y 3 p3:4) v:>,<,%,{ ->b
90ce4d05 296# c <2> aassign[t15] KS ->d
d5524600 297# - <1> ex-list lK ->-
e9fb18e4 298# b <0> padrange[$e:3,4; $f:3,4] */LVINTRO,range=2 ->c
d5524600
DM
299# - <1> rv2av[t14] lK/1 ->-
300# - <$> gv(*_) s ->-
301# - <1> ex-list lKPRM* ->c
302# - <0> pushmark sRM*/LVINTRO ->-
1455f3f5
FC
303# - <0> padsv[$e:3,4] sRM*/LVINTRO ->-
304# - <0> padsv[$f:3,4] sRM*/LVINTRO ->-
d5524600
DM
305EONT_EONT
306
4774ee0a
DM
307checkOptree ( name => 'consolidate padranges',
308 code => sub { my ($a,$b); my ($c,$d); 1 },
309 strip_open_hints => 1,
4774ee0a
DM
310 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
311# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
312# - <@> lineseq KP ->5
e7fd4fe6 313# 1 <;> nextstate(main 900 optree_misc.t:334) v:>,<,% ->2
4774ee0a 314# - <@> list vKP ->-
e9fb18e4 315# 2 <0> padrange[$a:900,902; $b:900,902; $c:901,902; $d:901,902] vM/LVINTRO,range=4 ->3
4774ee0a
DM
316# - <0> padsv[$a:900,902] vM/LVINTRO ->-
317# - <0> padsv[$b:900,902] vM/LVINTRO ->-
e7fd4fe6 318# - <;> nextstate(main 901 optree_misc.t:334) v:>,<,% ->-
4774ee0a
DM
319# - <@> list vKP ->3
320# - <0> pushmark vM/LVINTRO ->-
321# - <0> padsv[$c:901,902] vM/LVINTRO ->-
322# - <0> padsv[$d:901,902] vM/LVINTRO ->-
e7fd4fe6 323# 3 <;> nextstate(main 902 optree_misc.t:334) v:>,<,%,{ ->4
4774ee0a
DM
324# 4 <$> const[IV 1] s ->5
325EOT_EOT
326# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
327# - <@> lineseq KP ->5
e7fd4fe6 328# 1 <;> nextstate(main 900 optree_misc.t:334) v:>,<,% ->2
4774ee0a 329# - <@> list vKP ->-
e9fb18e4 330# 2 <0> padrange[$a:900,902; $b:900,902; $c:901,902; $d:901,902] vM/LVINTRO,range=4 ->3
4774ee0a
DM
331# - <0> padsv[$a:900,902] vM/LVINTRO ->-
332# - <0> padsv[$b:900,902] vM/LVINTRO ->-
e7fd4fe6 333# - <;> nextstate(main 901 optree_misc.t:334) v:>,<,% ->-
4774ee0a
DM
334# - <@> list vKP ->3
335# - <0> pushmark vM/LVINTRO ->-
336# - <0> padsv[$c:901,902] vM/LVINTRO ->-
337# - <0> padsv[$d:901,902] vM/LVINTRO ->-
e7fd4fe6 338# 3 <;> nextstate(main 902 optree_misc.t:334) v:>,<,%,{ ->4
4774ee0a
DM
339# 4 <$> const(IV 1) s ->5
340EONT_EONT
341
342
fd3cc9e5
DM
343checkOptree ( name => 'consolidate padranges and singletons',
344 code => sub { my ($a,$b); my $c; my ($d,$e);
345 my @f; my $g; my ($h,$i); my %j; 1 },
346 strip_open_hints => 1,
fd3cc9e5
DM
347 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
348# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
349# - <@> lineseq KP ->5
e7fd4fe6 350# 1 <;> nextstate(main 903 optree_misc.t:371) v:>,<,% ->2
fd3cc9e5 351# - <@> list vKP ->-
e9fb18e4 352# 2 <0> padrange[$a:903,910; $b:903,910; $c:904,910; $d:905,910; $e:905,910; @f:906,910; $g:907,910; $h:908,910; $i:908,910; %j:909,910] vM/LVINTRO,range=10 ->3
fd3cc9e5
DM
353# - <0> padsv[$a:903,910] vM/LVINTRO ->-
354# - <0> padsv[$b:903,910] vM/LVINTRO ->-
e7fd4fe6 355# - <;> nextstate(main 904 optree_misc.t:371) v:>,<,% ->-
fd3cc9e5 356# - <0> padsv[$c:904,910] vM/LVINTRO ->-
e7fd4fe6 357# - <;> nextstate(main 905 optree_misc.t:371) v:>,<,%,{ ->-
fd3cc9e5
DM
358# - <@> list vKP ->-
359# - <0> pushmark vM/LVINTRO ->-
360# - <0> padsv[$d:905,910] vM/LVINTRO ->-
361# - <0> padsv[$e:905,910] vM/LVINTRO ->-
e7fd4fe6 362# - <;> nextstate(main 906 optree_misc.t:372) v:>,<,%,{ ->-
fd3cc9e5 363# - <0> padav[@f:906,910] vM/LVINTRO ->-
e7fd4fe6 364# - <;> nextstate(main 907 optree_misc.t:372) v:>,<,%,{ ->-
fd3cc9e5 365# - <0> padsv[$g:907,910] vM/LVINTRO ->-
e7fd4fe6 366# - <;> nextstate(main 908 optree_misc.t:372) v:>,<,%,{ ->-
fd3cc9e5
DM
367# - <@> list vKP ->-
368# - <0> pushmark vM/LVINTRO ->-
369# - <0> padsv[$h:908,910] vM/LVINTRO ->-
370# - <0> padsv[$i:908,910] vM/LVINTRO ->-
e7fd4fe6 371# - <;> nextstate(main 909 optree_misc.t:372) v:>,<,%,{ ->-
fd3cc9e5 372# - <0> padhv[%j:909,910] vM/LVINTRO ->3
e7fd4fe6 373# 3 <;> nextstate(main 910 optree_misc.t:372) v:>,<,%,{ ->4
fd3cc9e5
DM
374# 4 <$> const[IV 1] s ->5
375EOT_EOT
376# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
377# - <@> lineseq KP ->5
e7fd4fe6 378# 1 <;> nextstate(main 903 optree_misc.t:371) v:>,<,% ->2
fd3cc9e5 379# - <@> list vKP ->-
e9fb18e4 380# 2 <0> padrange[$a:903,910; $b:903,910; $c:904,910; $d:905,910; $e:905,910; @f:906,910; $g:907,910; $h:908,910; $i:908,910; %j:909,910] vM/LVINTRO,range=10 ->3
fd3cc9e5
DM
381# - <0> padsv[$a:903,910] vM/LVINTRO ->-
382# - <0> padsv[$b:903,910] vM/LVINTRO ->-
e7fd4fe6 383# - <;> nextstate(main 904 optree_misc.t:371) v:>,<,% ->-
fd3cc9e5 384# - <0> padsv[$c:904,910] vM/LVINTRO ->-
e7fd4fe6 385# - <;> nextstate(main 905 optree_misc.t:371) v:>,<,%,{ ->-
fd3cc9e5
DM
386# - <@> list vKP ->-
387# - <0> pushmark vM/LVINTRO ->-
388# - <0> padsv[$d:905,910] vM/LVINTRO ->-
389# - <0> padsv[$e:905,910] vM/LVINTRO ->-
e7fd4fe6 390# - <;> nextstate(main 906 optree_misc.t:372) v:>,<,%,{ ->-
fd3cc9e5 391# - <0> padav[@f:906,910] vM/LVINTRO ->-
e7fd4fe6 392# - <;> nextstate(main 907 optree_misc.t:372) v:>,<,%,{ ->-
fd3cc9e5 393# - <0> padsv[$g:907,910] vM/LVINTRO ->-
e7fd4fe6 394# - <;> nextstate(main 908 optree_misc.t:372) v:>,<,%,{ ->-
fd3cc9e5
DM
395# - <@> list vKP ->-
396# - <0> pushmark vM/LVINTRO ->-
397# - <0> padsv[$h:908,910] vM/LVINTRO ->-
398# - <0> padsv[$i:908,910] vM/LVINTRO ->-
e7fd4fe6 399# - <;> nextstate(main 909 optree_misc.t:372) v:>,<,%,{ ->-
fd3cc9e5 400# - <0> padhv[%j:909,910] vM/LVINTRO ->3
e7fd4fe6 401# 3 <;> nextstate(main 910 optree_misc.t:372) v:>,<,%,{ ->4
fd3cc9e5
DM
402# 4 <$> const(IV 1) s ->5
403EONT_EONT
404
405
2721a2ca
DM
406checkOptree ( name => 'm?x?',
407 code => sub { m?x?; },
408 strip_open_hints => 1,
409 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
410# 3 <1> leavesub[1 ref] K/REFC,1 ->(end)
411# - <@> lineseq KP ->3
64bb98af 412# 1 <;> nextstate(main 914 optree_misc.t:434) v:>,<,%,{ ->2
2e2d70f2 413# 2 </> match(/"x"/) ->3
2721a2ca
DM
414EOT_EOT
415# 3 <1> leavesub[1 ref] K/REFC,1 ->(end)
416# - <@> lineseq KP ->3
64bb98af 417# 1 <;> nextstate(main 914 optree_misc.t:434) v:>,<,%,{ ->2
2e2d70f2 418# 2 </> match(/"x"/) ->3
2721a2ca
DM
419EONT_EONT
420
421
f85f6494 422unlink $tmpfile;