Hook.xs

filter: Statementstmt 74.0% 37 / 50 Branchbran 50.0% 10 / 20 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 67.1% 47 / 70 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/B/CompilerPhase/Hook.pm ↑ Summary
1 #include "EXTERN.h"
2 #include "perl.h"
3 #include "XSUB.h"
4  
5 MODULE = B::CompilerPhase::Hook PACKAGE = B::CompilerPhase::Hook
6  
7 PROTOTYPES: ENABLE
8  
9 # UNITCHECK
10  
11 void
12 prepend_UNITCHECK(handler)
13 SV* handler
14 PROTOTYPE: &
15 CODE:
16 5 ▶ if ( !PL_unitcheckav ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( !PL_unitcheckav ) { 1 4 5
17 1 PL_unitcheckav = newAV();
18 }
19 5 SvREFCNT_inc(handler);
20 5 av_unshift(PL_unitcheckav, 1);
21 5 av_store(PL_unitcheckav, 0, handler);
22  
23 void
24 append_UNITCHECK(handler)
25 SV* handler
26 PROTOTYPE: &
27 CODE:
28 1 ▶ if ( !PL_unitcheckav ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( !PL_unitcheckav ) { 0 1 1
29 0 PL_unitcheckav = newAV();
30 }
31 1 SvREFCNT_inc(handler);
32 1 av_push(PL_unitcheckav, handler);
33  
34 # CHECK
35  
36 void
37 prepend_CHECK(handler)
38 SV* handler
39 PROTOTYPE: &
40 CODE:
41 4 ▶ if ( !PL_checkav ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( !PL_checkav ) { 0 4 4
42 0 PL_checkav = newAV();
43 }
44 4 SvREFCNT_inc(handler);
45 4 av_unshift(PL_checkav, 1);
46 4 av_store(PL_checkav, 0, handler);
47  
48 void
49 append_CHECK(handler)
50 SV* handler
51 PROTOTYPE: &
52 CODE:
53 1 ▶ if ( !PL_checkav ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( !PL_checkav ) { 0 1 1
54 0 PL_checkav = newAV();
55 }
56 1 SvREFCNT_inc(handler);
57 1 av_push(PL_checkav, handler);
58  
59 # INIT
60  
61 void
62 prepend_INIT(handler)
63 SV* handler
64 PROTOTYPE: &
65 CODE:
66 1 ▶ if ( !PL_initav ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( !PL_initav ) { 0 1 1
67 0 PL_initav = newAV();
68 }
69 1 SvREFCNT_inc(handler);
70 1 av_unshift(PL_initav, 1);
71 1 av_store(PL_initav, 0, handler);
72  
73 void
74 append_INIT(handler)
75 SV* handler
76 PROTOTYPE: &
77 CODE:
78 5 ▶ if ( !PL_initav ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( !PL_initav ) { 0 5 5
79 0 PL_initav = newAV();
80 }
81 5 SvREFCNT_inc(handler);
82 5 av_push(PL_initav, handler);
83  
84  
85 # BEGIN
86  
87 void
88 prepend_BEGIN(handler)
89 SV* handler
90 PROTOTYPE: &
91 CODE:
92 1 ▶ if ( !PL_beginav ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( !PL_beginav ) { 0 1 1
93 0 PL_beginav = newAV();
94 }
95 1 SvREFCNT_inc(handler);
96 1 av_unshift(PL_beginav, 1);
97 1 av_store(PL_beginav, 0, handler);
98  
99 void
100 append_BEGIN(handler)
101 SV* handler
102 PROTOTYPE: &
103 CODE:
104 4 ▶ if ( !PL_beginav ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( !PL_beginav ) { 0 4 4
105 0 PL_beginav = newAV();
106 }
107 4 SvREFCNT_inc(handler);
108 4 av_push(PL_beginav, handler);
109  
110 # END
111  
112 void
113 prepend_END(handler)
114 SV* handler
115 PROTOTYPE: &
116 CODE:
117 5 ▶ if ( !PL_endav ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( !PL_endav ) { 0 5 5
118 0 PL_endav = newAV();
119 }
120 5 SvREFCNT_inc(handler);
121 5 av_unshift(PL_endav, 1);
122 5 av_store(PL_endav, 0, handler);
123  
124 void
125 append_END(handler)
126 SV* handler
127 PROTOTYPE: &
128 CODE:
129 0 ▶ if ( !PL_endav ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( !PL_endav ) { 0 0 0
130 0 PL_endav = newAV();
131 }
132 0 SvREFCNT_inc(handler);
133 0 av_push(PL_endav, handler);
134  
135 MODULE = B::CompilerPhase::Hook PACKAGE = B::CompilerPhase::Hook::Debug
136  
137 AV*
138 get_END_array()
139 CODE:
140 0 RETVAL = PL_endav;
141 OUTPUT:
142 RETVAL
143  
144 AV*
145 get_BEGIN_array()
146 CODE:
147 4 RETVAL = PL_beginav;
148 OUTPUT:
149 RETVAL
150  
151 AV*
152 get_CHECK_array()
153 CODE:
154 3 RETVAL = PL_checkav;
155 OUTPUT:
156 RETVAL
157  
158 AV*
159 get_INIT_array()
160 CODE:
161 3 RETVAL = PL_initav;
162 OUTPUT:
163 RETVAL
164  
165 AV*
166 get_UNITCHECK_array()
167 CODE:
168 3 RETVAL = PL_unitcheckav;
169 OUTPUT:
170 RETVAL
171  
172  
« blib/lib/B/CompilerPhase/Hook.pm ↑ Summary