6 @INC = ('.', '../lib', '../ext/B/t');
12 if (($Config::Config{'extensions'} !~ /\bB\b/) ){
13 print "1..0 # Skip -- Perl configured without B module\n";
16 if (!$Config::Config{useperlio}) {
17 print "1..0 # Skip -- need perlio to walk the optree\n";
20 # require q(test.pl); # now done by OptreeCheck;
27 Code test snippets here are adapted from `perldoc -f map`
29 Due to a bleadperl optimization (Dave Mitchell, circa apr 04), the
30 (map|grep)(start|while) opcodes have different flags in 5.9, their
31 private flags /1, /2 are gone in blead (for the cases covered)
33 When the optree stuff was integrated into 5.8.6, these tests failed,
34 and were todo'd. Theyre now done, by version-specific tweaking in
35 mkCheckRex(), therefore the skip is removed too.
40 #examples poached from perldoc -f sort
42 NOTE: name is no longer a required arg for checkOptree, as label is
43 synthesized out of others. HOWEVER, if the test-code has newlines in
44 it, the label must be overridden by an explicit name.
46 This is because t/TEST is quite particular about the test output it
47 processes, and multi-line labels violate its 1-line-per-test
52 # chunk: # sort lexically
53 @articles = sort @files;
57 checkOptree(note => q{},
59 code => q{@articles = sort @files; },
60 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
61 # 1 <;> nextstate(main 545 (eval 15):1) v
65 # 5 <1> rv2av[t4] lK/1
68 # 8 <#> gv[*articles] s
69 # 9 <1> rv2av[t2] lKRM*/1
70 # a <2> aassign[t5] KS/COMMON
71 # b <1> leavesub[1 ref] K/REFC,1
73 # 1 <;> nextstate(main 545 (eval 15):1) v
77 # 5 <1> rv2av[t2] lK/1
80 # 8 <$> gv(*articles) s
81 # 9 <1> rv2av[t1] lKRM*/1
82 # a <2> aassign[t3] KS/COMMON
83 # b <1> leavesub[1 ref] K/REFC,1
89 # chunk: # same thing, but with explicit sort routine
90 @articles = sort {$a cmp $b} @files;
94 checkOptree(note => q{},
96 code => q{@articles = sort {$a cmp $b} @files; },
97 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
98 # 1 <;> nextstate(main 546 (eval 15):1) v
102 # 5 <1> rv2av[t7] lK/1
105 # 8 <#> gv[*articles] s
106 # 9 <1> rv2av[t2] lKRM*/1
107 # a <2> aassign[t3] KS/COMMON
108 # b <1> leavesub[1 ref] K/REFC,1
110 # 1 <;> nextstate(main 546 (eval 15):1) v
114 # 5 <1> rv2av[t3] lK/1
117 # 8 <$> gv(*articles) s
118 # 9 <1> rv2av[t1] lKRM*/1
119 # a <2> aassign[t2] KS/COMMON
120 # b <1> leavesub[1 ref] K/REFC,1
126 # chunk: # now case-insensitively
127 @articles = sort {uc($a) cmp uc($b)} @files;
131 checkOptree(note => q{},
133 code => q{@articles = sort {uc($a) cmp uc($b)} @files; },
134 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
135 # 1 <;> nextstate(main 546 (eval 15):1) v
139 # 5 <1> rv2av[t9] lK/1
142 # 8 <#> gv[*articles] s
143 # 9 <1> rv2av[t2] lKRM*/1
144 # a <2> aassign[t10] KS/COMMON
145 # b <1> leavesub[1 ref] K/REFC,1
147 # 1 <;> nextstate(main 546 (eval 15):1) v
151 # 5 <1> rv2av[t5] lK/1
154 # 8 <$> gv(*articles) s
155 # 9 <1> rv2av[t1] lKRM*/1
156 # a <2> aassign[t6] KS/COMMON
157 # b <1> leavesub[1 ref] K/REFC,1
163 # chunk: # same thing in reversed order
164 @articles = sort {$b cmp $a} @files;
168 checkOptree(note => q{},
170 code => q{@articles = sort {$b cmp $a} @files; },
171 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
172 # 1 <;> nextstate(main 546 (eval 15):1) v
176 # 5 <1> rv2av[t7] lK/1
179 # 8 <#> gv[*articles] s
180 # 9 <1> rv2av[t2] lKRM*/1
181 # a <2> aassign[t3] KS/COMMON
182 # b <1> leavesub[1 ref] K/REFC,1
184 # 1 <;> nextstate(main 546 (eval 15):1) v
188 # 5 <1> rv2av[t3] lK/1
191 # 8 <$> gv(*articles) s
192 # 9 <1> rv2av[t1] lKRM*/1
193 # a <2> aassign[t2] KS/COMMON
194 # b <1> leavesub[1 ref] K/REFC,1
200 # chunk: # sort numerically ascending
201 @articles = sort {$a <=> $b} @files;
205 checkOptree(note => q{},
207 code => q{@articles = sort {$a <=> $b} @files; },
208 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
209 # 1 <;> nextstate(main 546 (eval 15):1) v
213 # 5 <1> rv2av[t7] lK/1
216 # 8 <#> gv[*articles] s
217 # 9 <1> rv2av[t2] lKRM*/1
218 # a <2> aassign[t3] KS/COMMON
219 # b <1> leavesub[1 ref] K/REFC,1
221 # 1 <;> nextstate(main 546 (eval 15):1) v
225 # 5 <1> rv2av[t3] lK/1
228 # 8 <$> gv(*articles) s
229 # 9 <1> rv2av[t1] lKRM*/1
230 # a <2> aassign[t2] KS/COMMON
231 # b <1> leavesub[1 ref] K/REFC,1
237 # chunk: # sort numerically descending
238 @articles = sort {$b <=> $a} @files;
242 checkOptree(note => q{},
244 code => q{@articles = sort {$b <=> $a} @files; },
245 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
246 # 1 <;> nextstate(main 587 (eval 26):1) v
250 # 5 <1> rv2av[t7] lK/1
251 # 6 <@> sort lK/DESC,NUM
253 # 8 <#> gv[*articles] s
254 # 9 <1> rv2av[t2] lKRM*/1
255 # a <2> aassign[t3] KS/COMMON
256 # b <1> leavesub[1 ref] K/REFC,1
258 # 1 <;> nextstate(main 546 (eval 15):1) v
262 # 5 <1> rv2av[t3] lK/1
263 # 6 <@> sort lK/DESC,NUM
265 # 8 <$> gv(*articles) s
266 # 9 <1> rv2av[t1] lKRM*/1
267 # a <2> aassign[t2] KS/COMMON
268 # b <1> leavesub[1 ref] K/REFC,1
274 # chunk: # this sorts the %age hash by value instead of key
275 # using an in-line function
276 @eldest = sort { $age{$b} <=> $age{$a} } keys %age;
280 checkOptree(note => q{},
282 code => q{@eldest = sort { $age{$b} <=> $age{$a} } keys %age; },
283 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
284 # 1 <;> nextstate(main 592 (eval 28):1) v
288 # 5 <1> rv2hv[t9] lKRM/1
289 # 6 <1> keys[t10] lK/1
292 # 9 <#> gv[*eldest] s
293 # a <1> rv2av[t2] lKRM*/1
294 # b <2> aassign[t11] KS/COMMON
295 # c <1> leavesub[1 ref] K/REFC,1
297 # 1 <;> nextstate(main 546 (eval 15):1) v
301 # 5 <1> rv2hv[t3] lKRM/1
302 # 6 <1> keys[t4] lK/1
305 # 9 <$> gv(*eldest) s
306 # a <1> rv2av[t1] lKRM*/1
307 # b <2> aassign[t5] KS/COMMON
308 # c <1> leavesub[1 ref] K/REFC,1
314 # chunk: # sort using explicit subroutine name
316 $age{$a} <=> $age{$b}; # presuming numeric
318 @sortedclass = sort byage @class;
322 checkOptree(note => q{},
324 code => q{sub byage { $age{$a} <=> $age{$b}; } @sortedclass = sort byage @class; },
325 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
326 # 1 <;> nextstate(main 597 (eval 30):1) v
329 # 4 <$> const[PV "byage"] s/BARE
331 # 6 <1> rv2av[t4] lK/1
334 # 9 <#> gv[*sortedclass] s
335 # a <1> rv2av[t2] lKRM*/1
336 # b <2> aassign[t5] KS/COMMON
337 # c <1> leavesub[1 ref] K/REFC,1
339 # 1 <;> nextstate(main 546 (eval 15):1) v
342 # 4 <$> const(PV "byage") s/BARE
344 # 6 <1> rv2av[t2] lK/1
347 # 9 <$> gv(*sortedclass) s
348 # a <1> rv2av[t1] lKRM*/1
349 # b <2> aassign[t3] KS/COMMON
350 # c <1> leavesub[1 ref] K/REFC,1
356 # chunk: sub backwards { $b cmp $a }
357 @harry = qw(dog cat x Cain Abel);
358 @george = qw(gone chased yz Punished Axed);
360 # prints AbelCaincatdogx
361 print sort backwards @harry;
362 # prints xdogcatCainAbel
363 print sort @george, 'to', @harry;
364 # prints AbelAxedCainPunishedcatchaseddoggonetoxyz
368 checkOptree(name => q{sort USERSUB LIST },
370 code => q{sub backwards { $b cmp $a }
371 @harry = qw(dog cat x Cain Abel);
372 @george = qw(gone chased yz Punished Axed);
373 print sort @harry; print sort backwards @harry;
374 print sort @george, 'to', @harry; },
375 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
376 # 1 <;> nextstate(main 602 (eval 32):2) v
378 # 3 <$> const[PV "dog"] s
379 # 4 <$> const[PV "cat"] s
380 # 5 <$> const[PV "x"] s
381 # 6 <$> const[PV "Cain"] s
382 # 7 <$> const[PV "Abel"] s
385 # a <1> rv2av[t2] lKRM*/1
386 # b <2> aassign[t3] vKS
387 # c <;> nextstate(main 602 (eval 32):3) v
389 # e <$> const[PV "gone"] s
390 # f <$> const[PV "chased"] s
391 # g <$> const[PV "yz"] s
392 # h <$> const[PV "Punished"] s
393 # i <$> const[PV "Axed"] s
395 # k <#> gv[*george] s
396 # l <1> rv2av[t5] lKRM*/1
397 # m <2> aassign[t6] vKS
398 # n <;> nextstate(main 602 (eval 32):4) v:{
402 # r <1> rv2av[t8] lK/1
405 # u <;> nextstate(main 602 (eval 32):4) v:{
408 # x <$> const[PV "backwards"] s/BARE
410 # z <1> rv2av[t10] lK/1
413 # 12 <;> nextstate(main 602 (eval 32):5) v:{
416 # 15 <#> gv[*george] s
417 # 16 <1> rv2av[t12] lK/1
418 # 17 <$> const[PV "to"] s
419 # 18 <#> gv[*harry] s
420 # 19 <1> rv2av[t14] lK/1
423 # 1c <1> leavesub[1 ref] K/REFC,1
425 # 1 <;> nextstate(main 602 (eval 32):2) v
427 # 3 <$> const(PV "dog") s
428 # 4 <$> const(PV "cat") s
429 # 5 <$> const(PV "x") s
430 # 6 <$> const(PV "Cain") s
431 # 7 <$> const(PV "Abel") s
434 # a <1> rv2av[t1] lKRM*/1
435 # b <2> aassign[t2] vKS
436 # c <;> nextstate(main 602 (eval 32):3) v
438 # e <$> const(PV "gone") s
439 # f <$> const(PV "chased") s
440 # g <$> const(PV "yz") s
441 # h <$> const(PV "Punished") s
442 # i <$> const(PV "Axed") s
444 # k <$> gv(*george) s
445 # l <1> rv2av[t3] lKRM*/1
446 # m <2> aassign[t4] vKS
447 # n <;> nextstate(main 602 (eval 32):4) v:{
451 # r <1> rv2av[t5] lK/1
454 # u <;> nextstate(main 602 (eval 32):4) v:{
457 # x <$> const(PV "backwards") s/BARE
459 # z <1> rv2av[t6] lK/1
462 # 12 <;> nextstate(main 602 (eval 32):5) v:{
465 # 15 <$> gv(*george) s
466 # 16 <1> rv2av[t7] lK/1
467 # 17 <$> const(PV "to") s
468 # 18 <$> gv(*harry) s
469 # 19 <1> rv2av[t8] lK/1
472 # 1c <1> leavesub[1 ref] K/REFC,1
478 # chunk: # inefficiently sort by descending numeric compare using
479 # the first integer after the first = sign, or the
480 # whole record case-insensitively otherwise
482 $nums[$b] <=> $nums[$a]
483 || $caps[$a] cmp $caps[$b]
489 # chunk: # same thing, but without any temps
490 @new = map { $_->[0] }
491 sort { $b->[1] <=> $a->[1]
492 || $a->[2] cmp $b->[2]
493 } map { [$_, /=(\d+)/, uc($_)] } @old;
497 checkOptree(name => q{Compound sort/map Expression },
499 code => q{ @new = map { $_->[0] }
500 sort { $b->[1] <=> $a->[1] || $a->[2] cmp $b->[2] }
501 map { [$_, /=(\d+)/, uc($_)] } @old; },
502 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
503 # 1 <;> nextstate(main 609 (eval 34):3) v:{
509 # 7 <1> rv2av[t19] lKM/1
511 # 9 <|> mapwhile(other->a)[t20] lK
513 # b <;> nextstate(main 608 (eval 34):2) v:{
516 # e </> match(/"=(\\d+)"/) l/RTIME
519 # h <@> anonlist sK*/1
524 # l <|> mapwhile(other->m)[t26] lK
526 # n <1> rv2sv sKM/DREFAV,1
527 # o <1> rv2av[t4] sKR/1
528 # p <$> const[IV 0] s
534 # t <1> rv2av[t2] lKRM*/1
535 # u <2> aassign[t27] KS/COMMON
536 # v <1> leavesub[1 ref] K/REFC,1
538 # 1 <;> nextstate(main 609 (eval 34):3) v:{
544 # 7 <1> rv2av[t10] lKM/1
546 # 9 <|> mapwhile(other->a)[t11] lK
548 # b <;> nextstate(main 608 (eval 34):2) v:{
551 # e </> match(/"=(\\d+)"/) l/RTIME
554 # h <@> anonlist sK*/1
559 # l <|> mapwhile(other->m)[t12] lK
561 # n <1> rv2sv sKM/DREFAV,1
562 # o <1> rv2av[t2] sKR/1
563 # p <$> const(IV 0) s
569 # t <1> rv2av[t1] lKRM*/1
570 # u <2> aassign[t13] KS/COMMON
571 # v <1> leavesub[1 ref] K/REFC,1
577 # chunk: # using a prototype allows you to use any comparison subroutine
578 # as a sort subroutine (including other package's subroutines)
580 sub backwards ($$) { $_[1] cmp $_[0]; } # $a and $b are not set here
582 @new = sort other::backwards @old;
586 checkOptree(name => q{sort other::sub LIST },
588 code => q{package other; sub backwards ($$) { $_[1] cmp $_[0]; }
589 package main; @new = sort other::backwards @old; },
590 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
591 # 1 <;> nextstate(main 614 (eval 36):2) v:{
594 # 4 <$> const[PV "other::backwards"] s/BARE
596 # 6 <1> rv2av[t4] lK/1
600 # a <1> rv2av[t2] lKRM*/1
601 # b <2> aassign[t5] KS/COMMON
602 # c <1> leavesub[1 ref] K/REFC,1
604 # 1 <;> nextstate(main 614 (eval 36):2) v:{
607 # 4 <$> const(PV "other::backwards") s/BARE
609 # 6 <1> rv2av[t2] lK/1
613 # a <1> rv2av[t1] lKRM*/1
614 # b <2> aassign[t3] KS/COMMON
615 # c <1> leavesub[1 ref] K/REFC,1
621 # chunk: # repeat, condensed. $main::a and $b are unaffected
622 sub other::backwards ($$) { $_[1] cmp $_[0]; }
623 @new = sort other::backwards @old;
627 checkOptree(note => q{},
629 code => q{sub other::backwards ($$) { $_[1] cmp $_[0]; } @new = sort other::backwards @old; },
630 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
631 # 1 <;> nextstate(main 619 (eval 38):1) v
634 # 4 <$> const[PV "other::backwards"] s/BARE
636 # 6 <1> rv2av[t4] lK/1
640 # a <1> rv2av[t2] lKRM*/1
641 # b <2> aassign[t5] KS/COMMON
642 # c <1> leavesub[1 ref] K/REFC,1
644 # 1 <;> nextstate(main 546 (eval 15):1) v
647 # 4 <$> const(PV "other::backwards") s/BARE
649 # 6 <1> rv2av[t2] lK/1
653 # a <1> rv2av[t1] lKRM*/1
654 # b <2> aassign[t3] KS/COMMON
655 # c <1> leavesub[1 ref] K/REFC,1
661 # chunk: # guarantee stability, regardless of algorithm
663 @new = sort { substr($a, 3, 5) cmp substr($b, 3, 5) } @old;
667 my ($expect, $expect_nt) = (<<'EOT_EOT', <<'EONT_EONT');
668 # 1 <;> nextstate(main 656 (eval 40):1) v:%,{
672 # 5 <1> rv2av[t9] lK/1
673 # 6 <@> sort lKS*/STABLE
676 # 9 <1> rv2av[t2] lKRM*/1
677 # a <2> aassign[t14] KS/COMMON
678 # b <1> leavesub[1 ref] K/REFC,1
680 # 1 <;> nextstate(main 578 (eval 15):1) v:%,{
684 # 5 <1> rv2av[t5] lK/1
685 # 6 <@> sort lKS*/STABLE
688 # 9 <1> rv2av[t1] lKRM*/1
689 # a <2> aassign[t6] KS/COMMON
690 # b <1> leavesub[1 ref] K/REFC,1
694 # 5.8.x doesn't show the /STABLE flag, so massage the golden results.
695 s!/STABLE!!s foreach ($expect, $expect_nt);
698 checkOptree(note => q{},
700 code => q{use sort 'stable'; @new = sort { substr($a, 3, 5) cmp substr($b, 3, 5) } @old; },
701 expect => $expect, expect_nt => $expect_nt);
705 # chunk: # force use of mergesort (not portable outside Perl 5.8)
706 use sort '_mergesort';
707 @new = sort { substr($a, 3, 5) cmp substr($b, 3, 5) } @old;
711 checkOptree(note => q{},
713 code => q{use sort '_mergesort'; @new = sort { substr($a, 3, 5) cmp substr($b, 3, 5) } @old; },
714 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
715 # 1 <;> nextstate(main 662 (eval 42):1) v:%,{
719 # 5 <1> rv2av[t9] lK/1
723 # 9 <1> rv2av[t2] lKRM*/1
724 # a <2> aassign[t14] KS/COMMON
725 # b <1> leavesub[1 ref] K/REFC,1
727 # 1 <;> nextstate(main 578 (eval 15):1) v:%,{
731 # 5 <1> rv2av[t5] lK/1
735 # 9 <1> rv2av[t1] lKRM*/1
736 # a <2> aassign[t6] KS/COMMON
737 # b <1> leavesub[1 ref] K/REFC,1
743 # chunk: # you should have a good reason to do this!
744 @articles = sort {$FooPack::b <=> $FooPack::a} @files;
748 checkOptree(note => q{},
750 code => q{@articles = sort {$FooPack::b <=> $FooPack::a} @files; },
751 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
752 # 1 <;> nextstate(main 667 (eval 44):1) v
756 # 5 <1> rv2av[t7] lK/1
759 # 8 <#> gv[*articles] s
760 # 9 <1> rv2av[t2] lKRM*/1
761 # a <2> aassign[t8] KS/COMMON
762 # b <1> leavesub[1 ref] K/REFC,1
764 # 1 <;> nextstate(main 546 (eval 15):1) v
768 # 5 <1> rv2av[t3] lK/1
771 # 8 <$> gv(*articles) s
772 # 9 <1> rv2av[t1] lKRM*/1
773 # a <2> aassign[t4] KS/COMMON
774 # b <1> leavesub[1 ref] K/REFC,1
781 @result = sort { $a <=> $b } grep { $_ == $_ } @input;
785 checkOptree(note => q{},
787 code => q{@result = sort { $a <=> $b } grep { $_ == $_ } @input; },
788 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
789 # 1 <;> nextstate(main 673 (eval 46):1) v
794 # 6 <1> rv2av[t9] lKM/1
795 # 7 <@> grepstart lK*
796 # 8 <|> grepwhile(other->9)[t10] lK
804 # e <#> gv[*result] s
805 # f <1> rv2av[t2] lKRM*/1
806 # g <2> aassign[t3] KS/COMMON
807 # h <1> leavesub[1 ref] K/REFC,1
809 # 1 <;> nextstate(main 547 (eval 15):1) v
814 # 6 <1> rv2av[t3] lKM/1
815 # 7 <@> grepstart lK*
816 # 8 <|> grepwhile(other->9)[t4] lK
824 # e <$> gv(*result) s
825 # f <1> rv2av[t1] lKRM*/1
826 # g <2> aassign[t2] KS/COMMON
827 # h <1> leavesub[1 ref] K/REFC,1
833 # chunk: # void return context sort
834 sort { $a <=> $b } @input;
838 checkOptree(note => q{},
840 code => q{sort { $a <=> $b } @input; },
841 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
842 # 1 <;> nextstate(main 678 (eval 48):1) v
845 # 4 <1> rv2av[t5] lK/1
847 # 6 <1> leavesub[1 ref] K/REFC,1
849 # 1 <;> nextstate(main 546 (eval 15):1) v
852 # 4 <1> rv2av[t2] lK/1
854 # 6 <1> leavesub[1 ref] K/REFC,1
860 # chunk: # more void context, propagating ?
861 sort { $a <=> $b } grep { $_ == $_ } @input;
865 checkOptree(note => q{},
867 code => q{sort { $a <=> $b } grep { $_ == $_ } @input; },
868 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
869 # 1 <;> nextstate(main 684 (eval 50):1) v
873 # 5 <1> rv2av[t7] lKM/1
874 # 6 <@> grepstart lK*
875 # 7 <|> grepwhile(other->8)[t8] lK
882 # c <1> leavesub[1 ref] K/REFC,1
884 # 1 <;> nextstate(main 547 (eval 15):1) v
888 # 5 <1> rv2av[t2] lKM/1
889 # 6 <@> grepstart lK*
890 # 7 <|> grepwhile(other->8)[t3] lK
897 # c <1> leavesub[1 ref] K/REFC,1
903 # chunk: # scalar return context sort
904 $s = sort { $a <=> $b } @input;
908 checkOptree(note => q{},
910 code => q{$s = sort { $a <=> $b } @input; },
911 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
912 # 1 <;> nextstate(main 689 (eval 52):1) v:{
915 # 4 <1> rv2av[t6] lK/1
918 # 7 <2> sassign sKS/2
919 # 8 <1> leavesub[1 ref] K/REFC,1
921 # 1 <;> nextstate(main 546 (eval 15):1) v:{
924 # 4 <1> rv2av[t2] lK/1
927 # 7 <2> sassign sKS/2
928 # 8 <1> leavesub[1 ref] K/REFC,1
934 # chunk: $s = sort { $a <=> $b } grep { $_ == $_ } @input;
938 checkOptree(note => q{},
940 code => q{$s = sort { $a <=> $b } grep { $_ == $_ } @input; },
941 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
942 # 1 <;> nextstate(main 695 (eval 54):1) v:{
946 # 5 <1> rv2av[t8] lKM/1
947 # 6 <@> grepstart lK*
948 # 7 <|> grepwhile(other->8)[t9] lK
956 # d <2> sassign sKS/2
957 # e <1> leavesub[1 ref] K/REFC,1
959 # 1 <;> nextstate(main 547 (eval 15):1) v:{
963 # 5 <1> rv2av[t2] lKM/1
964 # 6 <@> grepstart lK*
965 # 7 <|> grepwhile(other->8)[t3] lK
973 # d <2> sassign sKS/2
974 # e <1> leavesub[1 ref] K/REFC,1