line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FLAT::Symbol; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
2455
|
use strict; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
172
|
|
4
|
6
|
|
|
6
|
|
29
|
use Carp; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
1713
|
|
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
|
19377
|
|
|
19377
|
|
23954
|
my $self = shift; |
17
|
19377
|
100
|
|
|
|
31254
|
my $add = $_[0] ? shift : 1; |
18
|
19377
|
|
|
|
|
26346
|
$self->{COUNT} += $add; |
19
|
19377
|
|
|
|
|
55587
|
return $self->{COUNT}; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub _decrement_count { |
23
|
11020
|
|
|
11020
|
|
13964
|
my $self = shift; |
24
|
11020
|
50
|
|
|
|
16428
|
my $sub = $_[0] ? shift : 1; |
25
|
11020
|
|
|
|
|
14089
|
$self->{COUNT} -= $sub; |
26
|
11020
|
50
|
|
|
|
18159
|
croak "Count less than 0!\n" if ( 0 > $self->{COUNT} ); |
27
|
11020
|
|
|
|
|
26031
|
return $self->{COUNT}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub get_count { |
31
|
150
|
|
|
150
|
0
|
226
|
my $self = shift; |
32
|
150
|
|
|
|
|
355
|
return $self->{COUNT}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub as_string { |
36
|
0
|
|
|
0
|
0
|
|
return $_[0]->{LABEL}; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |