line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PJVM::Runtime::Object; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
35329
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
191
|
|
4
|
4
|
|
|
4
|
|
23
|
use warnings; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
132
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
24
|
use Scalar::Util qw(weaken); |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
326
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
646
|
use PJVM::Access qw(:flags); |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
2530
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
0
|
|
|
0
|
0
|
|
my ($pkg, $class) = @_; |
12
|
0
|
|
|
|
|
|
my $self = bless { ".class" => $class }, $pkg; |
13
|
0
|
|
|
|
|
|
weaken $self->{".class"}; |
14
|
|
|
|
|
|
|
# Set defaults for all fields |
15
|
0
|
|
|
|
|
|
my $fields = $class->instance_fields; |
16
|
0
|
|
|
|
|
|
for my $name (keys %$fields) { |
17
|
0
|
|
|
|
|
|
my $default = PJVM::Types->default_value_for_signature($fields->{$name}); |
18
|
0
|
|
|
|
|
|
$self->{$name} = $default; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
return $self; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub class { |
25
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
26
|
0
|
|
|
|
|
|
return $self->{".class"}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub clone { |
30
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
31
|
0
|
|
|
|
|
|
my $clone = bless {}, $self; |
32
|
0
|
|
|
|
|
|
$clone->{$_} = $self->{$_} for keys %$self; |
33
|
0
|
|
|
|
|
|
return $clone; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
__END__ |