line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
2479
|
use v5.10; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
183
|
|
2
|
4
|
|
|
4
|
|
6637
|
use MooseX::Declare; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
use utf8; |
4
|
|
|
|
|
|
|
{ |
5
|
|
|
|
|
|
|
package Mildew::AST; |
6
|
|
|
|
|
|
|
BEGIN { |
7
|
|
|
|
|
|
|
$Mildew::AST::VERSION = '0.05'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
sub unique_id { |
10
|
|
|
|
|
|
|
state $id = 0; |
11
|
|
|
|
|
|
|
'$id'.$id++; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
sub unique_reg { |
14
|
|
|
|
|
|
|
Mildew::AST::Reg->new(name=>unique_id); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
sub unique_label { |
17
|
|
|
|
|
|
|
state $lab = 0; |
18
|
|
|
|
|
|
|
'lab'.$lab++; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
sub indent { |
21
|
|
|
|
|
|
|
my $x = shift; |
22
|
|
|
|
|
|
|
my $i = shift || 1; |
23
|
|
|
|
|
|
|
my $s = ' ' x $i; |
24
|
|
|
|
|
|
|
$x =~ s/^/$s/mg; |
25
|
|
|
|
|
|
|
$x; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
sub terminate_stmt { |
28
|
|
|
|
|
|
|
my $stmt = shift; |
29
|
|
|
|
|
|
|
if ($stmt =~ /;|}$/) { |
30
|
|
|
|
|
|
|
$stmt . "\n"; |
31
|
|
|
|
|
|
|
} elsif ($stmt =~ /\n$/) { |
32
|
|
|
|
|
|
|
$stmt; |
33
|
|
|
|
|
|
|
} else { |
34
|
|
|
|
|
|
|
$stmt . ";\n"; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
use Mildew::AST::Base; |
40
|
|
|
|
|
|
|
use Mildew::AST::Call; |
41
|
|
|
|
|
|
|
use Mildew::AST::If; |
42
|
|
|
|
|
|
|
use Mildew::AST::Let; |
43
|
|
|
|
|
|
|
use Mildew::AST::Assign; |
44
|
|
|
|
|
|
|
use Mildew::AST::Helpers; |
45
|
|
|
|
|
|
|
use Mildew::AST::Comment; |
46
|
|
|
|
|
|
|
use Mildew::AST::While; |
47
|
|
|
|
|
|
|
use Mildew::AST::Pair; |
48
|
|
|
|
|
|
|
use Mildew::AST::IntegerConstant; |
49
|
|
|
|
|
|
|
use Mildew::AST::StringConstant; |
50
|
|
|
|
|
|
|
use Mildew::AST::Branch; |
51
|
|
|
|
|
|
|
use Mildew::AST::Reg; |
52
|
|
|
|
|
|
|
use Mildew::AST::Capture; |
53
|
|
|
|
|
|
|
use Mildew::AST::Goto; |
54
|
|
|
|
|
|
|
use Mildew::AST::Block; |
55
|
|
|
|
|
|
|
use Mildew::AST::Block::SSA; |
56
|
|
|
|
|
|
|
use Mildew::AST::Seq; |
57
|
|
|
|
|
|
|
use Mildew::AST::Loop; |
58
|
|
|
|
|
|
|
use Mildew::AST::InferredTypeTest; |
59
|
|
|
|
|
|
|
use Mildew::AST::Phi; |
60
|
|
|
|
|
|
|
use Mildew::AST::Block::Simplified; |
61
|
|
|
|
|
|
|
1; |