Branch Coverage

PadWalker.xs
Criterion Covered Total %
branch 158 220 71.8


line true false branch
107 83 22 for (i = startingblock; i >= 0; i--) {
109 49 34 switch (CxTYPE(cx)) {
141 34 0 if (cxix_from_p) *cxix_from_p = cxstack_ix+1;
142 34 0 if (cxix_to_p) *cxix_to_p = cxix;
145 22 34 while (cxix < 0 && top_si->si_type != PERLSI_MAIN) {
2 20 while (cxix < 0 && top_si->si_type != PERLSI_MAIN) {
149 2 0 if (cxix_to_p && cxix_from_p) *cxix_from_p = *cxix_to_p;
2 0 if (cxix_to_p && cxix_from_p) *cxix_from_p = *cxix_to_p;
150 2 0 if (cxix_to_p) *cxix_to_p = cxix;
152 20 34 if (cxix < 0 && count == 0) {
19 1 if (cxix < 0 && count == 0) {
153 19 0 if (ccstack_p) *ccstack_p = ccstack;
156 1 34 else if (cxix < 0)
158 34 0 if (PL_DBsub && cxix >= 0 &&
34 0 if (PL_DBsub && cxix >= 0 &&
0 34 if (PL_DBsub && cxix >= 0 &&
161 14 20 if (!count--)
164 19 1 if (cop_p) *cop_p = ccstack[cxix].blk_oldcop;
166 20 0 if (cxix_to_p && cxix_from_p) *cxix_from_p = *cxix_to_p;
20 0 if (cxix_to_p && cxix_from_p) *cxix_from_p = *cxix_to_p;
167 20 0 if (cxix_to_p) *cxix_to_p = cxix;
169 14 0 if (ccstack_p) *ccstack_p = ccstack;
180 17 0 char *package_name = HvNAME(stash);
17 0 char *package_name = HvNAME(stash);
0 17 char *package_name = HvNAME(stash);
0 0 char *package_name = HvNAME(stash);
17 0 char *package_name = HvNAME(stash);
0 17 char *package_name = HvNAME(stash);
216 696 68 for (i=PadnamelistMAX(pad_namelist); i>=0; --i) {
219 530 166 if (name_sv) {
221 346 184 if (name_str) {
238 334 12 if ((PadnameOUTER(name_sv) || 0 == valid_at_seq ||
324 10 if ((PadnameOUTER(name_sv) || 0 == valid_at_seq ||
211 113 if ((PadnameOUTER(name_sv) || 0 == valid_at_seq ||
239 101 110 (valid_at_seq <= COP_SEQ_RANGE_HIGH(name_sv) &&
240 123 0 valid_at_seq > COP_SEQ_RANGE_LOW(name_sv))) &&
251 116 7 if ( hv_exists(my_hash, name_str, name_len)
252 109 7 || hv_exists(our_hash, name_str, name_len))
257 17 92 if (is_our) {
260 0 17 if (!val_sv) {
268 92 0 pad_vallist ? PadARRAY(pad_vallist)[i] : &PL_sv_undef;
269 0 92 if (!val_sv) val_sv = &PL_sv_undef;
272 109 0 hv_store((is_our ? our_hash : my_hash), name_str, PadnameUTF8(name_sv) ? -name_len : name_len,
17 92 hv_store((is_our ? our_hash : my_hash), name_str, PadnameUTF8(name_sv) ? -name_len : name_len,
288 6 62 if (depth == 0) depth = 1;
290 0 68 if (!padlist) {
309 1 36 if (cx == (PERL_CONTEXT*)-1)
313 14 22 CV* cur_cv = cx ? cx->blk_sub.cv : cv;
314 14 22 long depth = cx ? cx->blk_sub.olddepth + 1 : 1;
316 0 36 if (!cur_cv)
319 65 36 while (cur_cv) {
322 64 1 if (CvPADLIST(cur_cv))
325 29 36 if (cur_cv) depth = CvDEPTH(cur_cv);
344 14 13 if (cop == 0) {
352 25 24 for (i = cxix_from-1; i > cxix_to; --i) {
360 3 2 if (first_eval) {
370 2 0 if (first_eval)
396 6 1 if (CvISXSUB(cv) || !CvPADLIST(cv)) {
0 6 if (CvISXSUB(cv) || !CvPADLIST(cv)) {
400 2 4 val_depth = CvDEPTH(cv) ? CvDEPTH(cv) : 1;
407 66 6 for (i=PadnamelistMAX(pad_namelist); i>=0; --i) {
410 66 0 if (name_sv && PadnamePV(name_sv)) {
15 51 if (name_sv && PadnamePV(name_sv)) {
414 9 6 if (PadnameOUTER(name_sv) && !PadnameIsOUR(name_sv)) {
8 1 if (PadnameOUTER(name_sv) && !PadnameIsOUR(name_sv)) {
416 0 8 if (!val_sv) val_sv = &PL_sv_undef;
425 0 8 if (indices) {
441 7 1 U32 val_depth = CvDEPTH(cv) ? CvDEPTH(cv) : 1;
445 40 0 for (i=PadnamelistMAX(pad_namelist); i>=0; --i) {
449 19 21 if ( name && (name_str = PadnamePV(name))
19 0 if ( name && (name_str = PadnamePV(name))
450 8 11 && PadARRAY(pad_vallist)[i] == var) {
463 0 7 if (uplevel < 0)
467 0 7 if (cx == (PERL_CONTEXT *)-1) {
471 0 7 else if (cx)
476 9 3 for (i = cxix_from-1; i > cxix_to; --i)
477 6 3 if (CxTYPE(&ccstack[i]) == CXt_EVAL) {
479 5 1 if (old_op_type == OP_REQUIRE || old_op_type == OP_DOFILE)
3 2 if (old_op_type == OP_REQUIRE || old_op_type == OP_DOFILE)
489 2 1 return !(
2 0 return !(
491 2 0 || SvTYPE(sv) == SVt_PVHV
492 2 0 || SvTYPE(sv) == SVt_PVCV
493 0 2 || isGV_with_GP(sv)
0 0 || isGV_with_GP(sv)
0 0 || isGV_with_GP(sv)
503 1 0 ( is_scalar_type(orig) && is_scalar_type(restore) )
520 0 25 EXTEND(SP, 1);
532 0 1 EXTEND(SP, 1);
543 1 4 if (CvISXSUB(cv))
547 0 4 EXTEND(SP, 1);
557 0 4 U32 val_depth = CvDEPTH(cv) ? CvDEPTH(cv) : 1;
561 20 3 for (i=PadnamelistMAX(pad_namelist); i>=0; --i) {
565 20 0 if (name && (name_str = PadnamePV(name))) {
10 10 if (name && (name_str = PadnamePV(name))) {
568 7 3 if (PadnameOUTER(name) && !PadnameIsOUR(name)) {
7 0 if (PadnameOUTER(name) && !PadnameIsOUR(name)) {
570 4 3 if ( restore_ref ) {
571 4 0 if ( SvROK(*restore_ref) ) {
576 4 0 if ( !orig || is_correct_type(orig, restore) ) {
3 1 if ( !orig || is_correct_type(orig, restore) ) {
600 7 0 if (GIMME_V == G_ARRAY) {
1 6 if (GIMME_V == G_ARRAY) {
604 0 1 EXTEND(SP, 2);
611 0 6 EXTEND(SP, 1);
622 0 8 if (!SvROK(var_ref))
625 1 7 if (SvROK(sub)) {
627 0 1 if (SvTYPE(cv) != SVt_PVCV)
630 7 0 cv = (SV *) up_cv(aTHX_ SvIV(sub), "PadWalker::upcontext");
641 0 0 XPUSHs(sv_2mortal(newSViv((IV)upcontext(aTHX_ uplevel, 0, 0, 0, 0))));