line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SPVM::Builder::ObjectFileInfo; |
2
|
|
|
|
|
|
|
|
3
|
280
|
|
|
280
|
|
73871
|
use strict; |
|
280
|
|
|
|
|
626
|
|
|
280
|
|
|
|
|
8703
|
|
4
|
280
|
|
|
280
|
|
1493
|
use warnings; |
|
280
|
|
|
|
|
599
|
|
|
280
|
|
|
|
|
6549
|
|
5
|
280
|
|
|
280
|
|
1403
|
use Config; |
|
280
|
|
|
|
|
576
|
|
|
280
|
|
|
|
|
9229
|
|
6
|
280
|
|
|
280
|
|
1571
|
use Carp 'confess'; |
|
280
|
|
|
|
|
593
|
|
|
280
|
|
|
|
|
13613
|
|
7
|
280
|
|
|
280
|
|
1852
|
use File::Basename 'dirname'; |
|
280
|
|
|
|
|
710
|
|
|
280
|
|
|
|
|
26148
|
|
8
|
|
|
|
|
|
|
|
9
|
280
|
|
|
280
|
|
3273
|
use overload bool => sub {1}, '""' => sub { shift->to_string }, fallback => 1; |
|
280
|
|
|
260
|
|
1801
|
|
|
280
|
|
|
163
|
|
3054
|
|
|
0
|
|
|
|
|
0
|
|
|
468
|
|
|
|
|
3525
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Fields |
12
|
|
|
|
|
|
|
sub file { |
13
|
977
|
|
|
977
|
1
|
2579
|
my $self = shift; |
14
|
977
|
50
|
|
|
|
3769
|
if (@_) { |
15
|
0
|
|
|
|
|
0
|
$self->{file} = $_[0]; |
16
|
0
|
|
|
|
|
0
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
else { |
19
|
977
|
|
|
|
|
9842
|
return $self->{file}; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub compile_info { |
24
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
25
|
0
|
0
|
|
|
|
0
|
if (@_) { |
26
|
0
|
|
|
|
|
0
|
$self->{compile_info} = $_[0]; |
27
|
0
|
|
|
|
|
0
|
return $self; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
else { |
30
|
0
|
|
|
|
|
0
|
return $self->{compile_info}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# Class methods |
35
|
|
|
|
|
|
|
sub new { |
36
|
469
|
|
|
469
|
1
|
4171
|
my $class = shift; |
37
|
|
|
|
|
|
|
|
38
|
469
|
|
|
|
|
7165
|
my $self = {@_}; |
39
|
|
|
|
|
|
|
|
40
|
469
|
|
|
|
|
5165
|
bless $self, $class; |
41
|
|
|
|
|
|
|
|
42
|
469
|
|
|
|
|
3617
|
return $self; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# Instance methods |
46
|
|
|
|
|
|
|
sub to_string { |
47
|
977
|
|
|
977
|
1
|
3272
|
my ($self) = @_; |
48
|
|
|
|
|
|
|
|
49
|
977
|
|
|
|
|
4229
|
return $self->file; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 Name |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
SPVM::Builder::ObjectFileInfo - Object File Information |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 Description |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
The SPVM::Builder::ObjectFileInfo class has methods to manipulate information of an object file. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 Fields |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 file |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
my $file = $object_file_info->file; |
67
|
|
|
|
|
|
|
$object_file_info->file($file); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Gets and sets the C field. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
This field is the file name of an object file. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 compile_info |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
my $compile_info = $object_file_info->compile_info; |
76
|
|
|
|
|
|
|
$object_file_info->compile_info($compile_info); |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Gets and sets the C field. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This field is a L object. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 Class Methods |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 new |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
my $object_file_info = SPVM::Builder::ObjectFileInfo->new(%fields); |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Default Field Values: |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
If a field is not defined, the field is set to the following default value. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=over 2 |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item * L"file"> |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
undef |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item * L"compile_info"> |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
undef |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=back |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 Instance Methods |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 to_string |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
my $object_file_info = $object_file_info->to_string; |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Returns the L"file"> field. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 Operators |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Overloads the following operators. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head2 bool |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
my $bool = !!$object_file_info; |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Always true. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head2 stringify |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
my $object_file_info_name = "$object_file_info"; |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Alias for the L"to_string"> method. |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head1 Copyright & License |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Copyright (c) 2023 Yuki Kimoto |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
MIT License |