line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FLAT::Symbol; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
2338
|
use strict; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
171
|
|
4
|
6
|
|
|
6
|
|
30
|
use Carp; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
1583
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
0
|
|
|
0
|
0
|
0
|
my ( $pkg, $label ) = @_; |
8
|
0
|
|
|
|
|
0
|
bless { |
9
|
|
|
|
|
|
|
LABEL => $label, #serialized representation |
10
|
|
|
|
|
|
|
OBJECT => $label, #as object |
11
|
|
|
|
|
|
|
COUNT => 1, |
12
|
|
|
|
|
|
|
}, $pkg; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub _increment_count { |
16
|
19159
|
|
|
19159
|
|
25714
|
my $self = shift; |
17
|
19159
|
100
|
|
|
|
31865
|
my $add = $_[0] ? shift : 1; |
18
|
19159
|
|
|
|
|
28086
|
$self->{COUNT} += $add; |
19
|
19159
|
|
|
|
|
58375
|
return $self->{COUNT}; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub _decrement_count { |
23
|
10767
|
|
|
10767
|
|
14838
|
my $self = shift; |
24
|
10767
|
50
|
|
|
|
18411
|
my $sub = $_[0] ? shift : 1; |
25
|
10767
|
|
|
|
|
15096
|
$self->{COUNT} -= $sub; |
26
|
10767
|
50
|
|
|
|
20099
|
croak "Count less than 0!\n" if ( 0 > $self->{COUNT} ); |
27
|
10767
|
|
|
|
|
29261
|
return $self->{COUNT}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub get_count { |
31
|
147
|
|
|
147
|
0
|
247
|
my $self = shift; |
32
|
147
|
|
|
|
|
362
|
return $self->{COUNT}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub as_string { |
36
|
0
|
|
|
0
|
0
|
|
return $_[0]->{LABEL}; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |