Opcodes.xs

filter: Statementstmt 100% 12 / 12 Branchbran 80.0% 8 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 90.9% 20 / 22 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« const-xs.inc ↑ Summary
1 #define PERL_NO_GET_CONTEXT
2 #include "EXTERN.h"
3 #include "perl.h"
4 #include "XSUB.h"
5  
6 #include "ppport.h"
7 #include "const-c.inc"
8  
9 /* Private flags added by me for the optimizer, not in CORE */
10 #define OA_NOSTACK 512
11 #define OA_MAYSCALAR 1024
12 #define OA_MAYARRAY 2048
13 #define OA_MAYVOID 4096
14 #define OA_RETFIXED 8192
15 #define OA_MAYBRANCH 16384
16  
17 MODULE = Opcodes PACKAGE = Opcodes
18  
19 PROTOTYPES: DISABLE
20  
21 INCLUDE: const-xs.inc
22  
23 void
24 opcodes()
25 PPCODE:
26 4 ▶ if (GIMME_V == G_ARRAY) {
Branch: 1 branch
BranchTrueFalseTotal
if (GIMME_V == G_ARRAY) { 3 1 4
27 int i;
28 3 ▶ EXTEND(sp, MAXO);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(sp, MAXO); 1 2 3
29 /* ([ opcode opname ppaddr check opargs ]) from opnames.h/opcode.h */
30 1290 ▶ for (i=0; i < MAXO; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for (i=0; i < MAXO; i++) { 1287 3 1290
31 AV* ref;
32 1287 ref = newAV();
33 1287 av_extend(ref, 5);
34 1287 av_store(ref, 0, newSViv( i ));
35 1287 av_store(ref, 1, newSVpvn(PL_op_name[i], strlen(PL_op_name[i]) ));
36 1287 av_store(ref, 2, newSVuv( PTR2UV(PL_ppaddr[i]) ));
37 1287 av_store(ref, 3, newSVuv( PTR2UV(PL_check[i]) ));
38 1287 av_store(ref, 4, newSViv( PL_opargs[i] ));
39 1287 ▶ XPUSHs( sv_2mortal(newRV((SV*)ref)) );
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs( sv_2mortal(newRV((SV*)ref)) ); 0 1287 1287
40 }
41 }
42 else {
43 1 ▶ XPUSHs(sv_2mortal(newSViv(PL_maxo)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(PL_maxo))); 0 1 1
44 }
45  
« const-xs.inc ↑ Summary