line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mic::ArrayImpl; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
3978
|
use Readonly; |
|
9
|
|
|
|
|
23678
|
|
|
9
|
|
|
|
|
2248
|
|
4
|
|
|
|
|
|
|
require Mic::Implementation; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our @ISA = qw( Mic::Implementation ); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub update_args { |
9
|
9
|
|
|
9
|
0
|
22
|
my ($class, $arg) = @_; |
10
|
|
|
|
|
|
|
|
11
|
9
|
|
|
|
|
25
|
$arg->{arrayimp} = 1; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub add_attribute_syms { |
15
|
9
|
|
|
9
|
0
|
20
|
my ($class, $arg, $stash) = @_; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my @slots = ( |
18
|
|
|
|
|
|
|
'__', # semiprivate pkg |
19
|
9
|
|
|
|
|
25
|
keys %{ $arg->{has} }, |
20
|
|
|
|
|
|
|
( map { |
21
|
0
|
0
|
|
|
|
0
|
@{ $arg->{traits}{$_}{attributes} || [] } |
|
0
|
|
|
|
|
0
|
|
22
|
|
|
|
|
|
|
} |
23
|
9
|
|
|
|
|
17
|
keys %{ $arg->{traits} } |
|
9
|
|
|
|
|
29
|
|
24
|
|
|
|
|
|
|
), |
25
|
|
|
|
|
|
|
); |
26
|
9
|
|
|
|
|
15
|
my %seen_attr; |
27
|
9
|
|
|
|
|
30
|
foreach my $i ( 0 .. $#slots ) { |
28
|
19
|
50
|
|
|
|
68
|
next if exists $seen_attr{ $slots[$i] }; |
29
|
|
|
|
|
|
|
|
30
|
19
|
|
|
|
|
37
|
$seen_attr{ $slots[$i] }++; |
31
|
19
|
|
|
|
|
59
|
$class->add_sym($arg, $stash, $slots[$i], $i); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub add_sym { |
36
|
19
|
|
|
19
|
0
|
36
|
my ($class, $arg, $stash, $slot, $i) = @_; |
37
|
|
|
|
|
|
|
|
38
|
19
|
|
|
|
|
375
|
Readonly my $sym_val => $i; |
39
|
19
|
|
|
|
|
1616
|
$arg->{slot_offset}{$slot} = $sym_val; |
40
|
|
|
|
|
|
|
|
41
|
19
|
|
|
|
|
401
|
$stash->add_symbol( |
42
|
|
|
|
|
|
|
sprintf('$%s', uc $slot), |
43
|
|
|
|
|
|
|
\ $sym_val |
44
|
|
|
|
|
|
|
); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |