Branch Coverage

Indexed.xs
Criterion Covered Total %
branch 201 332 60.5


line true false branch
259 2 86 switch (mode)
272 0 108 if ((he = hv_fetch_ent(THIS->hv, key, 1, 0)) == NULL)
279 86 22 if (SvTYPE(pair) == SVt_NULL)
289 4 82 if (mode == SM_GET_NUM)
295 0 82 if (mode == SM_GET && !value)
0 0 if (mode == SM_GET && !value)
307 9 13 if (mode < SM_GET)
309 2 7 if (mode != SM_SET)
326 15 15 for (cur = THIS->root->next; cur != THIS->root;)
344 0 160 if ((he = hv_fetch_ent(THIS->hv, key, 0, 0)) == NULL)
373 1 18 THI_CHECK_ITERATOR;
375 18 0 if (GIMME_V == G_ARRAY && THIS->cur != THIS->end)
7 11 if (GIMME_V == G_ARRAY && THIS->cur != THIS->end)
6 1 if (GIMME_V == G_ARRAY && THIS->cur != THIS->end)
377 0 6 EXTEND(SP, 2);
383 6 12 THIS->cur = ix == THIS->reverse ? THIS->cur->next : THIS->cur->prev;
390 12 0 RETVAL = SvIVX(THIS->serial) == THIS->orig_serial &&
10 2 RETVAL = SvIVX(THIS->serial) == THIS->orig_serial &&
402 0 20 THI_CHECK_ITERATOR;
403 10 10 ST(0) = sv_mortalcopy(ix ? THIS->cur->val : THIS->cur->key);
436 0 12 if (items % 2 == 0)
449 12 12 for (cur = &ST(1); cur < end; cur += 2)
475 0 20 THI_CHECK_OBJECT;
0 20 THI_CHECK_OBJECT;
0 0 THI_CHECK_OBJECT;
20 0 THI_CHECK_OBJECT;
0 20 THI_CHECK_OBJECT;
479 131 20 for (cur = THIS->root->next; cur != THIS->root;)
523 0 160 THI_CHECK_OBJECT;
0 160 THI_CHECK_OBJECT;
0 0 THI_CHECK_OBJECT;
160 0 THI_CHECK_OBJECT;
0 160 THI_CHECK_OBJECT;
528 160 0 ST(0) = link == NULL ? &PL_sv_undef : sv_mortalcopy(link->val);
555 0 66 THI_CHECK_OBJECT;
0 66 THI_CHECK_OBJECT;
0 0 THI_CHECK_OBJECT;
66 0 THI_CHECK_OBJECT;
0 66 THI_CHECK_OBJECT;
579 0 34 THI_CHECK_OBJECT;
0 34 THI_CHECK_OBJECT;
0 0 THI_CHECK_OBJECT;
34 0 THI_CHECK_OBJECT;
0 34 THI_CHECK_OBJECT;
583 2 32 if (THIS->iter->key == NULL)
609 0 213 THI_CHECK_OBJECT;
0 213 THI_CHECK_OBJECT;
0 0 THI_CHECK_OBJECT;
213 0 THI_CHECK_OBJECT;
0 213 THI_CHECK_OBJECT;
613 32 181 if (THIS->iter->key == NULL)
643 0 14 THI_CHECK_OBJECT;
0 14 THI_CHECK_OBJECT;
0 0 THI_CHECK_OBJECT;
14 0 THI_CHECK_OBJECT;
0 14 THI_CHECK_OBJECT;
646 8 6 if (hv_exists_ent(THIS->hv, key, 0))
680 0 11 THI_CHECK_OBJECT;
0 11 THI_CHECK_OBJECT;
0 0 THI_CHECK_OBJECT;
11 0 THI_CHECK_OBJECT;
0 11 THI_CHECK_OBJECT;
683 4 7 if ((sv = hv_delete_ent(THIS->hv, key, 0, 0)) == NULL)
695 4 3 if (THIS->iter == cur)
729 0 14 THI_CHECK_OBJECT;
0 14 THI_CHECK_OBJECT;
0 0 THI_CHECK_OBJECT;
14 0 THI_CHECK_OBJECT;
0 14 THI_CHECK_OBJECT;
736 2 12 if (ix == 1 && GIMME_V != G_VOID)
2 0 if (ix == 1 && GIMME_V != G_VOID)
1 1 if (ix == 1 && GIMME_V != G_VOID)
757 0 5 THI_CHECK_OBJECT;
0 5 THI_CHECK_OBJECT;
0 0 THI_CHECK_OBJECT;
5 0 THI_CHECK_OBJECT;
0 5 THI_CHECK_OBJECT;
762 3 2 if (HvFILL(THIS->hv))
797 0 30 THI_CHECK_OBJECT;
0 30 THI_CHECK_OBJECT;
0 0 THI_CHECK_OBJECT;
30 0 THI_CHECK_OBJECT;
0 30 THI_CHECK_OBJECT;
799 3 27 num_keys = items > 1 ? (items - 1) : HvUSEDKEYS(THIS->hv);
0 27 num_keys = items > 1 ? (items - 1) : HvUSEDKEYS(THIS->hv);
800 12 18 num_items = (ix == 0 ? 2 : 1)*num_keys;
802 30 0 if (GIMME_V == G_SCALAR)
10 20 if (GIMME_V == G_SCALAR)
804 0 10 mXPUSHi(num_items);
808 17 3 if (items == 1) /* "vanilla" version */
812 17 0 EXTEND(SP, num_items);
0 17 EXTEND(SP, num_items);
814 58 17 for (cur = THIS->root->next; cur != THIS->root; cur = cur->next, num_keys--)
816 54 4 if (ix != 2) PUSHs(sv_mortalcopy(cur->key));
817 35 23 if (ix != 1) PUSHs(sv_mortalcopy(cur->val));
829 3 0 EXTEND(SP, num_items);
0 3 EXTEND(SP, num_items);
835 0 3 Move(beg + 1, beg, items, SV *);
837 6 3 for (; key >= beg; --key)
839 6 0 if ((he = hv_fetch_ent(THIS->hv, *key, 0, 0)) != NULL)
841 4 2 if (ix != 1)
848 0 0 if (ix != 1)
853 4 2 if (ix != 2) *end-- = *key;
883 0 5 THI_CHECK_OBJECT;
0 5 THI_CHECK_OBJECT;
0 0 THI_CHECK_OBJECT;
5 0 THI_CHECK_OBJECT;
0 5 THI_CHECK_OBJECT;
885 0 5 if (items % 2 == 0)
899 1 4 if (mode == SM_UNSHIFT)
902 2 1 for (cur = &ST(items - 1); cur > end; cur -= 2)
910 11 4 for (cur = &ST(1); cur < end; cur += 2)
916 5 0 if (GIMME_V != G_VOID)
4 1 if (GIMME_V != G_VOID)
918 0 4 XSRETURN_IV(HvUSEDKEYS(THIS->hv));
942 0 6 THI_CHECK_OBJECT;
0 6 THI_CHECK_OBJECT;
0 0 THI_CHECK_OBJECT;
6 0 THI_CHECK_OBJECT;
0 6 THI_CHECK_OBJECT;
946 1 5 if (root->next == root)
953 2 3 goner = ix == 0 ? root->prev : root->next;
958 5 0 if (GIMME_V == G_ARRAY)
2 3 if (GIMME_V == G_ARRAY)
960 0 2 XPUSHs(sv_2mortal(goner->key));
967 0 5 XPUSHs(sv_2mortal(goner->val));
993 2 1 it->cur = ix == 1 ? THIS->root->prev : THIS->root->next;
1033 4 4 if (ix >= 2 && GIMME_V != G_VOID)
4 0 if (ix >= 2 && GIMME_V != G_VOID)
4 0 if (ix >= 2 && GIMME_V != G_VOID)
1049 0 8 SvSETMAGIC(link->val);
1051 8 0 if (GIMME_V == G_VOID)
0 8 if (GIMME_V == G_VOID)
1056 4 4 ST(0) = orig ? orig : sv_mortalcopy(link->val);
1124 0 9 PUSHMARK(SP);
1126 8 1 if (myop.op_type == OP_OR || myop.op_type == MY_OP_DOR)
2 6 if (myop.op_type == OP_OR || myop.op_type == MY_OP_DOR)
1128 0 3 XPUSHs(val);
1129 0 3 XPUSHs(link->val);
1133 0 6 XPUSHs(link->val);
1134 0 6 XPUSHs(val);
1148 8 1 if (myop.op_type == OP_OR || myop.op_type == MY_OP_DOR)
2 6 if (myop.op_type == OP_OR || myop.op_type == MY_OP_DOR)
1152 0 3 SvSETMAGIC(link->val);
1156 1 8 FREETMPS;
1160 9 0 if (GIMME_V != G_VOID)
8 1 if (GIMME_V != G_VOID)
1188 0 8 THI_CHECK_OBJECT;
0 8 THI_CHECK_OBJECT;
0 0 THI_CHECK_OBJECT;
8 0 THI_CHECK_OBJECT;
0 8 THI_CHECK_OBJECT;
1194 0 8 XPUSHs(sv_2mortal(newSVpvn((char *)&s, sizeof(Serialized))));
1195 0 8 num_keys = HvUSEDKEYS(THIS->hv);
1196 8 0 EXTEND(SP, 2*num_keys);
0 8 EXTEND(SP, 2*num_keys);
1197 72 8 for (cur = THIS->root->next; cur != THIS->root; cur = cur->next, num_keys--)
1229 8 0 if (!sv_isobject(object) || SvTYPE(SvRV(object)) != SVt_PVMG)
0 8 if (!sv_isobject(object) || SvTYPE(SvRV(object)) != SVt_PVMG)
1233 8 0 ps = (Serialized *) SvPV(serialized, len);
1235 8 0 if (len < sizeof(SerialRev) ||
0 8 if (len < sizeof(SerialRev) ||
1240 0 8 if (ps->rev.major != THI_SERIAL_REV_MAJOR)
1255 0 8 if ((items-3) % 2)
1258 72 8 for (i = 3; i < items; i+=2)
1274 0 72 if (hv_store_ent(THIS->hv, key, val, 0) == NULL)