line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::Chitin::OpTree::SVOP; |
2
|
35
|
|
|
35
|
|
187
|
use base 'Devel::Chitin::OpTree'; |
|
35
|
|
|
|
|
53
|
|
|
35
|
|
|
|
|
3530
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.12'; # TRIAL |
5
|
|
|
|
|
|
|
|
6
|
35
|
|
|
35
|
|
189
|
use strict; |
|
35
|
|
|
|
|
51
|
|
|
35
|
|
|
|
|
615
|
|
7
|
35
|
|
|
35
|
|
130
|
use warnings; |
|
35
|
|
|
|
|
51
|
|
|
35
|
|
|
|
|
8237
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub pp_const { |
10
|
791
|
|
|
791
|
0
|
1024
|
my $self = shift; |
11
|
791
|
|
|
|
|
1184
|
my %params = @_; |
12
|
|
|
|
|
|
|
|
13
|
791
|
|
|
|
|
1386
|
my $sv = $self->op->sv; |
14
|
|
|
|
|
|
|
|
15
|
791
|
50
|
|
|
|
1663
|
$sv = $self->_padval_sv($self->op->targ) unless $$sv; # happens in thread-enabled perls |
16
|
|
|
|
|
|
|
|
17
|
791
|
100
|
|
|
|
4089
|
if ($sv->FLAGS & B::SVs_RMG) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# It's a version object |
19
|
1
|
|
|
|
|
16
|
for (my $mg = $sv->MAGIC; $mg; $mg = $mg->MOREMAGIC) { |
20
|
1
|
50
|
|
|
|
15
|
return $mg->PTR if $mg->TYPE eq 'V'; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
} elsif ($sv->isa('B::PV')) { |
24
|
354
|
|
|
|
|
898
|
return $self->_quote_sv($sv, %params); |
25
|
|
|
|
|
|
|
} elsif ($sv->isa('B::NV')) { |
26
|
2
|
|
|
|
|
43
|
return $sv->NV; |
27
|
|
|
|
|
|
|
} elsif ($sv->isa('B::IV')) { |
28
|
434
|
|
|
|
|
2764
|
return $sv->int_value; |
29
|
|
|
|
|
|
|
} elsif ($sv->isa('B::SPECIAL')) { |
30
|
0
|
|
|
|
|
0
|
'??pp_const B::SPECIAL ' . $B::specialsv_name[$$sv] . '>'; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
} else { |
33
|
0
|
|
|
|
|
0
|
die "Don't know how to get the value of a const from $sv"; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
*pp_method_named = \&pp_const; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub pp_gv { |
39
|
239
|
|
|
239
|
0
|
335
|
my $self = shift; |
40
|
|
|
|
|
|
|
# An 'our' varaible or subroutine |
41
|
239
|
|
|
|
|
497
|
$self->_gv_name($self->op->gv); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
*pp_gvsv = \&pp_gv; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |