line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl6::Controls; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
547513
|
use 5.012; use warnings; |
|
9
|
|
|
9
|
|
100
|
|
|
9
|
|
|
|
|
46
|
|
|
9
|
|
|
|
|
15
|
|
|
9
|
|
|
|
|
395
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000007'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
9
|
|
|
9
|
|
7073
|
use Keyword::Declare; |
|
9
|
|
|
|
|
926717
|
|
|
9
|
|
|
|
|
85
|
|
9
|
|
|
|
|
|
|
|
10
|
0
|
|
|
|
|
|
sub import { |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# Rewire the 'for' loop (but we need to handle existing usages first)... |
13
|
9
|
|
|
9
|
|
92
|
|
14
|
9
|
50
|
50
|
|
|
188
|
keyword for {{{ foreach }}} |
15
|
9
|
|
|
|
|
42
|
|
|
9
|
|
|
|
|
272
|
|
16
|
9
|
|
|
9
|
|
290287
|
keytype OptIter is /(?:my|our|state)\s*\$\w+/; |
17
|
9
|
|
|
|
|
16
|
|
18
|
9
|
50
|
50
|
|
|
95
|
keyword for (OptIter $iter = '', '(', '^', Int $max, ')') {{{ for <{$iter}> (0..<{$max-1}>) }}} |
19
|
9
|
|
|
5
|
|
58
|
|
|
5
|
|
|
|
|
680478
|
|
|
5
|
|
|
|
|
25
|
|
|
9
|
|
|
|
|
33
|
|
|
9
|
|
|
|
|
248
|
|
20
|
9
|
50
|
50
|
|
|
92
|
keyword for (ParenthesesList $list, '->', CommaList $parameters, Block $code_block) |
21
|
9
|
|
|
9
|
|
298548
|
:desc(enhanced for loop) |
|
9
|
|
|
|
|
225
|
|
22
|
|
|
|
|
|
|
{{{ |
23
|
9
|
|
|
1
|
|
53
|
{ |
|
1
|
|
|
|
|
146378
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
12
|
|
24
|
|
|
|
|
|
|
state $__acc__ = []; |
25
|
9
|
|
|
9
|
|
61
|
foreach my $__nary__ <{ $list =~ s{\)\Z}{,\\\$__acc__)}; $list }> |
|
0
|
|
|
2
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
306423
|
|
|
2
|
|
|
|
|
311295
|
|
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4
|
|
26
|
|
|
|
|
|
|
{ |
27
|
|
|
|
|
|
|
if (!ref($__nary__) || $__nary__ != \$__acc__) { |
28
|
2
|
|
|
|
|
11
|
push @{$__acc__}, $__nary__; |
|
2
|
|
|
|
|
6
|
|
29
|
9
|
|
|
|
|
66
|
next if @{$__acc__} <= <{ $parameters =~ tr/,// }>; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
next if !@{$__acc__}; |
32
|
2
|
|
|
|
|
9
|
my ( <{"$parameters"}> ) = @{$__acc__}; |
33
|
|
|
|
|
|
|
@{$__acc__} = (); |
34
|
|
|
|
|
|
|
|
35
|
2
|
|
|
|
|
5
|
<{substr $code_block, 1, -1}> |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
2
|
|
|
|
|
5
|
}}} |
|
2
|
|
|
|
|
24
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
9
|
|
|
|
|
51
|
# Perl 6 infinite loop... |
|
9
|
|
|
|
|
259
|
|
42
|
9
|
50
|
50
|
|
|
87
|
keyword loop (Block $loop_block) {{{ |
43
|
9
|
|
|
9
|
|
300607
|
foreach (;;) <{$loop_block}> |
|
9
|
|
|
|
|
29
|
|
44
|
|
|
|
|
|
|
}}} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
1
|
|
0
|
# Perl 6 while loop... |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
59493
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
9
|
|
|
|
|
223
|
|
48
|
1
|
50
|
50
|
|
|
2
|
keyword while (List $condition, Block $loop_block) {{{ |
|
1
|
|
|
|
|
4
|
|
|
9
|
|
|
|
|
85
|
|
49
|
9
|
|
|
|
|
47
|
foreach (;<{$condition}>;) <{$loop_block}> |
|
9
|
|
|
|
|
32
|
|
50
|
0
|
|
|
|
|
0
|
}}} |
|
0
|
|
|
|
|
0
|
|
51
|
9
|
|
|
9
|
|
293945
|
|
|
9
|
|
|
|
|
214
|
|
52
|
9
|
50
|
50
|
|
|
77
|
keyword while (List $condition, '->', ScalarVar $parameter, Block $loop_block) {{{ |
53
|
4
|
|
|
4
|
|
460639
|
foreach (;my <{$parameter}> = <{$condition}>;) <{$loop_block}> |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
8
|
|
|
9
|
|
|
|
|
31
|
|
54
|
0
|
|
|
|
|
0
|
}}} |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
26
|
|
55
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
47
|
|
56
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
57
|
0
|
|
|
9
|
|
0
|
# Perl 6 repeat...while and variants... |
|
9
|
|
|
1
|
|
68
|
|
|
9
|
|
|
|
|
295429
|
|
|
1
|
|
|
|
|
126629
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
2
|
|
58
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
|
9
|
|
|
|
|
278
|
|
59
|
9
|
50
|
50
|
|
|
52
|
keyword repeat ('while', List $while_condition, Block $code_block) :desc(repeat loop) {{{ |
|
9
|
|
|
|
|
77
|
|
60
|
0
|
|
|
|
|
0
|
foreach(;;) <{substr($code_block,0,-2)}>; last if !(<{$while_condition}>); } |
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
39
|
|
61
|
18
|
|
|
9
|
|
2380522
|
}}} |
|
18
|
|
|
|
|
58
|
|
|
18
|
|
|
|
|
48
|
|
|
18
|
|
|
|
|
40
|
|
|
9
|
|
|
|
|
300088
|
|
62
|
18
|
|
|
|
|
56
|
|
|
18
|
|
|
|
|
40
|
|
|
18
|
|
|
|
|
100
|
|
|
9
|
|
|
|
|
236
|
|
63
|
9
|
50
|
50
|
|
|
62
|
keyword repeat ('until', List $until_condition, Block $code_block) {{{ |
|
9
|
|
|
|
|
67
|
|
|
9
|
|
|
|
|
80
|
|
64
|
1
|
|
|
1
|
|
119885
|
foreach(;;) <{substr($code_block,0,-2)}>; last if <{$until_condition}>; } |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
9
|
|
|
|
|
30
|
|
65
|
0
|
|
|
|
|
0
|
}}} |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
66
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
46
|
|
|
9
|
|
|
|
|
232
|
|
67
|
9
|
50
|
50
|
|
|
62
|
keyword repeat (Block $code_block, |
|
9
|
|
|
|
|
74
|
|
68
|
9
|
|
|
9
|
|
305205
|
/while|until/ $while_or_until, |
|
1
|
|
|
1
|
|
118620
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1
|
|
|
9
|
|
|
|
|
30
|
|
69
|
1
|
|
|
|
|
3
|
Expr $condition) { |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
70
|
9
|
|
|
|
|
50
|
my $not = $while_or_until eq 'while' ? q{!} : q{}; |
71
|
|
|
|
|
|
|
qq{ foreach (;;) { do $code_block; last if $not ($condition); } }; |
72
|
0
|
|
|
9
|
|
0
|
} |
|
0
|
|
|
2
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
300646
|
|
|
2
|
|
|
|
|
248319
|
|
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4
|
|
73
|
0
|
100
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
2
|
|
|
|
|
7
|
|
74
|
9
|
|
|
|
|
64
|
|
|
2
|
|
|
|
|
11
|
|
75
|
9
|
|
|
|
|
45
|
# Special Perl 6 phasers within loops... |
76
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
254
|
|
77
|
0
|
|
|
9
|
|
0
|
keytype Etc is / (?: (?&PerlOWS) (?&PerlStatement) )* (?&PerlOWS) \} /x; |
|
0
|
|
|
9
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
310045
|
|
|
9
|
|
|
|
|
286333
|
|
78
|
9
|
|
|
|
|
66
|
|
|
9
|
|
|
|
|
15
|
|
79
|
9
|
50
|
50
|
|
|
75
|
keyword LEAVE (Block $code_block) :desc(LEAVE block) { |
80
|
9
|
|
|
|
|
31
|
state $leave_var = '__LEAVE__00000000000000000000000001'; |
81
|
0
|
|
|
|
|
0
|
return qq{use Scope::Upper; Scope::Upper::reap $code_block;}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
82
|
0
|
0
|
|
|
|
0
|
} |
83
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
244
|
|
84
|
9
|
50
|
50
|
4
|
|
74
|
keyword FIRST (Block $code_block) :then(Etc $rest_of_block) :desc(FIRST block) { |
|
4
|
|
|
|
|
235800
|
|
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
7
|
|
|
9
|
|
|
|
|
75
|
|
85
|
4
|
|
|
|
|
7
|
state $FIRST_ID = 'FIRST000000'; $FIRST_ID++; |
|
9
|
|
|
|
|
30
|
|
86
|
4
|
|
|
|
|
16
|
qq{ |
87
|
9
|
|
|
|
|
45
|
if (!(our \$$FIRST_ID)++) $code_block |
88
|
|
|
|
|
|
|
$rest_of_block; |
89
|
9
|
|
|
9
|
|
298609
|
{our \$$FIRST_ID = 0} |
|
2
|
|
|
2
|
|
118578
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
5
|
|
90
|
2
|
|
|
|
|
5
|
}; |
|
2
|
|
|
|
|
4
|
|
91
|
2
|
|
|
|
|
11
|
} |
92
|
9
|
|
|
|
|
236
|
|
93
|
0
|
50
|
50
|
|
|
0
|
keyword NEXT (Block $code_block) :then(Etc $rest_of_block) :desc(NEXT block) { |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
91
|
|
94
|
0
|
|
|
|
|
0
|
state $NEXT_ID = 'NEXT000000'; $NEXT_ID++; |
|
9
|
|
|
|
|
31
|
|
95
|
0
|
|
|
|
|
0
|
chop $rest_of_block; |
96
|
9
|
|
|
|
|
60
|
qq{ |
|
9
|
|
|
|
|
46
|
|
97
|
|
|
|
|
|
|
my \$$NEXT_ID = sub $code_block; |
98
|
9
|
|
|
9
|
|
311443
|
$rest_of_block; |
|
0
|
|
|
0
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
99
|
0
|
|
|
|
|
0
|
\$$NEXT_ID->(); |
|
0
|
|
|
|
|
0
|
|
100
|
0
|
|
|
|
|
0
|
\} |
101
|
0
|
|
|
|
|
0
|
}; |
102
|
0
|
|
|
|
|
0
|
} |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
103
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
246
|
|
104
|
0
|
50
|
50
|
|
|
0
|
keyword LAST (Block $code_block) :then(Etc $rest_of_block) :desc(LAST block) { |
|
9
|
|
|
|
|
85
|
|
105
|
9
|
|
|
|
|
32
|
state $LAST_ID = 'LAST000000'; $LAST_ID++; |
106
|
|
|
|
|
|
|
qq{ |
107
|
9
|
|
|
|
|
49
|
our \$$LAST_ID = sub $code_block; |
108
|
|
|
|
|
|
|
$rest_of_block; |
109
|
9
|
|
|
9
|
|
61
|
{our \$$LAST_ID->();} |
|
9
|
|
|
2
|
|
309375
|
|
|
2
|
|
|
|
|
150144
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
5
|
|
110
|
2
|
|
|
|
|
6
|
}; |
|
2
|
|
|
|
|
7
|
|
111
|
2
|
|
|
|
|
15
|
} |
112
|
|
|
|
|
|
|
|
113
|
0
|
|
|
|
|
0
|
# try and CATCH... |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
114
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
246
|
|
115
|
0
|
|
|
9
|
|
0
|
keytype CatchParam is / \( (?&PerlOWS) (?&PerlVariableScalar) (?&PerlOWS) \) /x; |
|
9
|
|
|
|
|
284791
|
|
116
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
46
|
|
|
9
|
|
|
|
|
13
|
|
117
|
9
|
50
|
50
|
|
|
75
|
keyword CATCH (CatchParam $param = '($P6C____EXCEPTION)', Block $block) :desc(CATCH phaser) {{{ |
118
|
9
|
|
|
9
|
|
307137
|
BEGIN { eval'$P6C____CATCH=$P6C____CATCH;1' // die q{Can't specify CATCH block outside a try}; } |
|
9
|
|
|
|
|
31
|
|
119
|
|
|
|
|
|
|
BEGIN { die q{Can't specify two CATCH blocks inside a single try} if defined $P6C____CATCH; } |
120
|
|
|
|
|
|
|
BEGIN { $P6C____CATCH = sub { use experimentals; my <{$param}> = @_; given (<{$param}>) <{$block}> } } |
121
|
|
|
|
|
|
|
}}} |
122
|
9
|
|
|
9
|
|
91
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
655675
|
|
|
9
|
|
|
|
|
33
|
|
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
245
|
|
123
|
0
|
50
|
50
|
|
|
0
|
keyword try (Block $block) {{{ |
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
75
|
|
124
|
0
|
|
|
|
|
0
|
{ my $P6C____CATCH; eval { <{$block}> 1 } // do{ my $error = $@; $P6C____CATCH && $P6C____CATCH->($error) }; } |
|
9
|
|
|
|
|
40
|
|
125
|
9
|
|
|
|
|
24
|
}}} |
|
9
|
|
|
|
|
21
|
|
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
61
|
|
126
|
9
|
|
|
|
|
46
|
|
127
|
|
|
|
|
|
|
|
128
|
9
|
|
|
9
|
|
303112
|
# Feed statement... |
|
10
|
|
|
10
|
|
739048
|
|
|
10
|
|
|
|
|
33
|
|
|
10
|
|
|
|
|
29
|
|
129
|
9
|
|
|
|
|
71
|
|
|
10
|
|
|
|
|
26
|
|
|
10
|
|
|
|
|
58
|
|
|
9
|
|
|
|
|
236
|
|
130
|
9
|
|
|
9
|
|
295049
|
keytype FeedArg is / (?&PerlExpression) (?&PerlOWS) ==> /xs; |
|
9
|
|
|
|
|
48
|
|
131
|
9
|
|
|
|
|
15
|
|
132
|
0
|
50
|
50
|
9
|
|
0
|
keyword feed (FeedArg @from, Expr $to) { |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
9
|
|
|
|
|
298474
|
|
|
9
|
|
|
|
|
75
|
|
133
|
9
|
|
|
|
|
30
|
|
134
|
|
|
|
|
|
|
my @list = map { |
135
|
0
|
|
|
|
|
0
|
m{\A ( (?&PerlVariable) | (?&PerlVariableDeclaration) ) \Z $PPR::GRAMMAR }xms |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
136
|
9
|
|
|
|
|
61
|
? "($1) = " |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
137
|
0
|
0
|
|
0
|
|
0
|
: $_ |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
138
|
9
|
|
|
|
|
58
|
} |
139
|
|
|
|
|
|
|
($to, reverse map { substr($_,0,-4) } @from); |
140
|
0
|
0
|
|
|
|
|
|
141
|
|
|
|
|
|
|
while (@list > 1) { |
142
|
|
|
|
|
|
|
my ($func, $data) = splice(@list, -2); |
143
|
|
|
|
|
|
|
push @list, "($func $data)"; |
144
|
0
|
|
|
|
|
|
} |
|
0
|
|
|
|
|
|
|
145
|
0
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
return $list[0]; |
147
|
0
|
|
|
|
|
|
} |
148
|
0
|
|
|
|
|
|
} |
149
|
0
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
1; # Magic true value required at end of module |
151
|
0
|
|
|
|
|
|
__END__ |