Branch Coverage

PadWalker.xs
Criterion Covered Total %
branch 158 220 71.8


line true false branch
111 83 22 for (i = startingblock; i >= 0; i--) {
113 49 34 switch (CxTYPE(cx)) {
145 34 0 if (cxix_from_p) *cxix_from_p = cxstack_ix+1;
146 34 0 if (cxix_to_p) *cxix_to_p = cxix;
149 22 34 while (cxix < 0 && top_si->si_type != PERLSI_MAIN) {
2 20 while (cxix < 0 && top_si->si_type != PERLSI_MAIN) {
153 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;
154 2 0 if (cxix_to_p) *cxix_to_p = cxix;
156 20 34 if (cxix < 0 && count == 0) {
19 1 if (cxix < 0 && count == 0) {
157 19 0 if (ccstack_p) *ccstack_p = ccstack;
160 1 34 else if (cxix < 0)
162 34 0 if (PL_DBsub && cxix >= 0 &&
34 0 if (PL_DBsub && cxix >= 0 &&
0 34 if (PL_DBsub && cxix >= 0 &&
165 14 20 if (!count--)
168 19 1 if (cop_p) *cop_p = ccstack[cxix].blk_oldcop;
170 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;
171 20 0 if (cxix_to_p) *cxix_to_p = cxix;
173 14 0 if (ccstack_p) *ccstack_p = ccstack;
184 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);
220 696 68 for (i=PadnamelistMAX(pad_namelist); i>=0; --i) {
223 530 166 if (name_sv) {
225 346 184 if (name_str) {
242 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 ||
243 101 110 (valid_at_seq <= COP_SEQ_RANGE_HIGH(name_sv) &&
244 123 0 valid_at_seq > COP_SEQ_RANGE_LOW(name_sv))) &&
255 116 7 if ( hv_exists(my_hash, name_str, name_len)
256 109 7 || hv_exists(our_hash, name_str, name_len))
261 17 92 if (is_our) {
264 0 17 if (!val_sv) {
272 92 0 pad_vallist ? PadARRAY(pad_vallist)[i] : &PL_sv_undef;
273 0 92 if (!val_sv) val_sv = &PL_sv_undef;
276 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,
292 6 62 if (depth == 0) depth = 1;
294 0 68 if (!padlist) {
313 1 36 if (cx == (PERL_CONTEXT*)-1)
317 14 22 CV* cur_cv = cx ? cx->blk_sub.cv : cv;
318 14 22 long depth = cx ? cx->blk_sub.olddepth + 1 : 1;
320 0 36 if (!cur_cv)
323 65 36 while (cur_cv) {
326 64 1 if (CvPADLIST(cur_cv))
329 29 36 if (cur_cv) depth = CvDEPTH(cur_cv);
348 14 13 if (cop == 0) {
356 25 24 for (i = cxix_from-1; i > cxix_to; --i) {
364 3 2 if (first_eval) {
374 2 0 if (first_eval)
400 6 1 if (CvISXSUB(cv) || !CvPADLIST(cv)) {
0 6 if (CvISXSUB(cv) || !CvPADLIST(cv)) {
404 2 4 val_depth = CvDEPTH(cv) ? CvDEPTH(cv) : 1;
411 66 6 for (i=PadnamelistMAX(pad_namelist); i>=0; --i) {
414 66 0 if (name_sv && PadnamePV(name_sv)) {
15 51 if (name_sv && PadnamePV(name_sv)) {
418 9 6 if (PadnameOUTER(name_sv) && !PadnameIsOUR(name_sv)) {
8 1 if (PadnameOUTER(name_sv) && !PadnameIsOUR(name_sv)) {
420 0 8 if (!val_sv) val_sv = &PL_sv_undef;
429 0 8 if (indices) {
445 7 1 U32 val_depth = CvDEPTH(cv) ? CvDEPTH(cv) : 1;
449 40 0 for (i=PadnamelistMAX(pad_namelist); i>=0; --i) {
453 19 21 if ( name && (name_str = PadnamePV(name))
19 0 if ( name && (name_str = PadnamePV(name))
454 8 11 && PadARRAY(pad_vallist)[i] == var) {
467 0 7 if (uplevel < 0)
471 0 7 if (cx == (PERL_CONTEXT *)-1) {
475 0 7 else if (cx)
480 9 3 for (i = cxix_from-1; i > cxix_to; --i)
481 6 3 if (CxTYPE(&ccstack[i]) == CXt_EVAL) {
483 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)
493 2 1 return !(
2 0 return !(
495 2 0 || SvTYPE(sv) == SVt_PVHV
496 2 0 || SvTYPE(sv) == SVt_PVCV
497 0 2 || isGV_with_GP(sv)
0 0 || isGV_with_GP(sv)
0 0 || isGV_with_GP(sv)
507 1 0 ( is_scalar_type(orig) && is_scalar_type(restore) )
524 0 25 EXTEND(SP, 1);
536 0 1 EXTEND(SP, 1);
547 1 4 if (CvISXSUB(cv))
551 0 4 EXTEND(SP, 1);
561 0 4 U32 val_depth = CvDEPTH(cv) ? CvDEPTH(cv) : 1;
565 20 3 for (i=PadnamelistMAX(pad_namelist); i>=0; --i) {
569 20 0 if (name && (name_str = PadnamePV(name))) {
10 10 if (name && (name_str = PadnamePV(name))) {
572 7 3 if (PadnameOUTER(name) && !PadnameIsOUR(name)) {
7 0 if (PadnameOUTER(name) && !PadnameIsOUR(name)) {
574 4 3 if ( restore_ref ) {
575 4 0 if ( SvROK(*restore_ref) ) {
580 4 0 if ( !orig || is_correct_type(orig, restore) ) {
3 1 if ( !orig || is_correct_type(orig, restore) ) {
604 7 0 if (GIMME_V == G_ARRAY) {
1 6 if (GIMME_V == G_ARRAY) {
608 0 1 EXTEND(SP, 2);
615 0 6 EXTEND(SP, 1);
626 0 8 if (!SvROK(var_ref))
629 1 7 if (SvROK(sub)) {
631 0 1 if (SvTYPE(cv) != SVt_PVCV)
634 7 0 cv = (SV *) up_cv(aTHX_ SvIV(sub), "PadWalker::upcontext");
645 0 0 XPUSHs(sv_2mortal(newSViv((IV)upcontext(aTHX_ uplevel, 0, 0, 0, 0))));