Branch Coverage

XS.xs
Criterion Covered Total %
branch 294 446 65.9


line true false branch
134 3394 0 if (expect_false (val < 0 || val >= sizeof (sviv_cache)))
0 3394 if (expect_false (val < 0 || val >= sizeof (sviv_cache)))
0 3394 if (expect_false (val < 0 || val >= sizeof (sviv_cache)))
137 53 3341 if (expect_false (!sviv_cache [val]))
153 1219 511 if (!SvOK (profile))
1219 0 if (!SvOK (profile))
1219 0 if (!SvOK (profile))
156 0 511 if (!SvROK (profile))
161 0 511 if (SvSTASH (profile) != profile_stash)
173 0 1935 if (expect_false (idx >= SvCUR (sv)))
187 220 523 if (idx >= oldlen)
219 300 30 for (celem = default_map + sizeof (default_map) / sizeof (default_map [0]); celem-- > default_map; )
237 3 832 if (expect_false ((uintptr_t)(end - cur) < count))
248 3 10991 if (cur == end)
271 1 1375 if (expect_false (c == 0x80))
276 545 6965 if (expect_false (res >> UVSIZE * 8 - 7))
281 829 6136 if (expect_true (!(c & 0x80)))
293 87 1584 if (expect_false (res & 0x80))
301 1 86 if (expect_false (cnt == 0))
304 1 85 if (expect_false (cnt > UVSIZE))
312 66 85 while (--cnt);
321 0 143 if (!len)
326 69 74 if (expect_false (len > 1))
330 67 2 if (expect_false (mask == 0xff80 || mask == 0x0000))
1 66 if (expect_false (mask == 0xff80 || mask == 0x0000))
3 66 if (expect_false (mask == 0xff80 || mask == 0x0000))
336 17 123 UV val = negative ? -1 : 0; // copy signbit to all bits
338 123 17 if (len > UVSIZE + (!negative && !*data))
47 76 if (len > UVSIZE + (!negative && !*data))
5 135 if (len > UVSIZE + (!negative && !*data))
343 234 135 while (--len);
347 16 119 return negative ? newSViv ((IV)val) : newSVuv (val);
361 792 397 if (expect_true (u < 10))
373 2691 397 while (u);
377 1454 397 while (--ptr > beg)
392 1 911 if (len <= 0)
404 3 363 if (relative)
410 82 281 if (w < 2 * 40)
420 462 364 while (cur < end)
423 0 462 if (oid + sizeof (oid) - app < 64)
441 4 39 if (len == 0)
447 4 34 if (info & 0x80)
451 0 4 NV S = info & 0x40 ? -1 : 1; // sign
456 0 4 if (!B)
461 1 3 SV *E = sv_2mortal (decode_int (L == 3 ? get_u8 () : L + 1));
464 0 4 res = newSVnv (S * SvNV (M) * F * Perl_pow (B, SvNV (E)));
0 4 res = newSVnv (S * SvNV (M) * F * Perl_pow (B, SvNV (E)));
466 4 0 FREETMPS;
468 14 20 else if (info & 0x40)
492 0 20 PUSHMARK (SP);
493 0 20 EXTEND (SP, 2);
501 20 0 FREETMPS;
505 0 40 if (cur - beg != len)
518 5 12 if (len & (chrsize - 1))
523 18 12 while (len)
529 6 12 if (chrsize == 4)
559 3 1688 if (tag == ASN_TAG_BER)
562 269 1422 if (constructed)
567 20 249 if (expect_false (*cur == 0x80))
575 18 31 if (!cur [0] && !cur [1])
18 0 if (!cur [0] && !cur [1])
589 568 241 while (cur < buf + seqend)
592 0 241 if (expect_false (cur > buf + seqend))
605 1 24 if (expect_false (len))
612 2 18 if (expect_false (len != 1))
641 1 3 if (len != 4)
688 0 416 if (sum < (size_t)l2 || sum != (size_t)(STRLEN)sum)
699 187 0 buf = (U8 *)SvPVbyte (buf_sv, len);
711 1 207 if (len1 > 4096 - 24)
714 208 0 return SvGROW (sv, len1);
21 187 return SvGROW (sv, len1);
720 208 1382 if (expect_false ((uintptr_t)(end - cur) < len))
764 574 77 if (val <= 0x7fU)
800 60 287 : 2
801 28 32 + (val > 0x000000000000ffU)
831 0 103 if (expect_false (!SvIOK (sv)))
836 99 4 if (SvIOK_notUV (sv))
840 8 91 if (expect_false (iv < 0))
862 4 91 UV uv = SvUV (sv);
898 60 287 if (expect_false (lenlen > 1))
914 958 640 while (*str >= '0')
928 97 0 char *ptr = SvPV (oid, len); // utf8 vs. bytes does not matter
936 95 2 if (!relative)
944 450 97 while (*ptr)
956 28 3 NV nv = SvNV (data);
958 5 26 if (expect_false (nv == (NV)0.))
960 2 3 if (signbit (nv))
975 4 22 else if (expect_false (Perl_isinf (nv)))
980 2 2 *cur++ = nv < (NV)0. ? 0x41 : 0x40;
982 2 20 else if (expect_false (Perl_isnan (nv)))
994 0 20 PUSHMARK (SP);
995 0 20 EXTEND (SP, 2);
1004 20 0 char *f = SvPV (sv, l);
1011 20 0 FREETMPS;
1020 8 0 char *ptr = SvPVutf8 (data, len);
1024 12 8 while (uchars--)
1027 0 12 UV uchr = utf8_to_uvchr_buf ((U8 *)ptr, (U8 *)ptr + len, &uclen);
1032 4 8 if (chrsize == 4)
1049 782 0 if (expect_false (!SvROK (tuple) || SvTYPE ((rv = SvRV (tuple))) != SVt_PVAV))
0 782 if (expect_false (!SvROK (tuple) || SvTYPE ((rv = SvRV (tuple))) != SVt_PVAV))
0 782 if (expect_false (!SvROK (tuple) || SvTYPE ((rv = SvRV (tuple))) != SVt_PVAV))
1052 0 782 if (expect_false (SvRMAGICAL (rv)))
1055 0 782 if (expect_false (AvFILL ((AV *)rv) != BER_ARRAYSIZE - 1))
0 782 if (expect_false (AvFILL ((AV *)rv) != BER_ARRAYSIZE - 1))
1056 0 0 croak ("BER tuple must contain exactly %d elements, not %d", BER_ARRAYSIZE, AvFILL ((AV *)rv) + 1);
1066 765 0 int klass = SvIV (AvARRAY (av)[BER_CLASS]);
1067 765 0 int tag = SvIV (AvARRAY (av)[BER_TAG]);
1068 765 0 int constructed = SvIV (AvARRAY (av)[BER_FLAGS]) & 1 ? ASN_CONSTRUCTED : 0;
250 515 int constructed = SvIV (AvARRAY (av)[BER_FLAGS]) & 1 ? ASN_CONSTRUCTED : 0;
1073 0 765 if (expect_false (tag >= ASN_TAG_BER))
1081 250 515 if (constructed)
1088 250 0 if (expect_false (!SvROK (data) || SvTYPE (SvRV (data)) != SVt_PVAV))
0 250 if (expect_false (!SvROK (data) || SvTYPE (SvRV (data)) != SVt_PVAV))
0 250 if (expect_false (!SvROK (data) || SvTYPE (SvRV (data)) != SVt_PVAV))
1092 0 250 int fill = AvFILL (av);
1094 0 250 if (expect_false (SvRMAGICAL (av)))
1098 578 250 for (i = 0; i <= fill; ++i)
1112 14 0 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
0 14 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
0 0 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
0 14 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
0 0 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
0 0 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
8 6 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
8 0 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
8 0 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
8 0 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
6 2 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
6 2 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
6 0 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
6 0 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
3 3 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
0 3 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
0 0 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
3 3 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
0 0 *cur++ = SvTRUE (data) ? 0xff : 0x00; // 0xff = DER/CER
1130 227 0 const char *ptr = SvPVbyte (data, len);
1138 11 0 const char *ptr = SvPVutf8 (data, len);
1146 2 0 sscanf (SvPV_nolen (data), "%hhu.%hhu.%hhu.%hhu", ip + 0, ip + 1, ip + 2, ip + 3);
1254 413 7 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--)
1266 1092 0 buf = (U8 *)SvPVbyte (ber, len);
1274 0 519 EXTEND (SP, 2);
1277 68 451 if (ix)
1279 68 383 else if (cur != end)
1287 0 84 if (!SvOK (tuple))
0 0 if (!SvOK (tuple))
0 0 if (!SvOK (tuple))
1290 84 0 if (!SvROK (tuple) || SvTYPE (SvRV (tuple)) != SVt_PVAV)
0 84 if (!SvROK (tuple) || SvTYPE (SvRV (tuple)) != SVt_PVAV)
1295 0 84 XPUSHs (
5 79 XPUSHs (
5 0 XPUSHs (
0 5 XPUSHs (
79 0 XPUSHs (
79 0 XPUSHs (
78 1 XPUSHs (
4 79 XPUSHs (
4 0 XPUSHs (
0 4 XPUSHs (
79 0 XPUSHs (
79 0 XPUSHs (
78 1 XPUSHs (
4 78 XPUSHs (
4 0 XPUSHs (
0 4 XPUSHs (
78 0 XPUSHs (
78 0 XPUSHs (
77 1 XPUSHs (
16 65 XPUSHs (
16 0 XPUSHs (
0 16 XPUSHs (
63 2 XPUSHs (
1307 0 3 if (!SvOK (tuple))
0 0 if (!SvOK (tuple))
0 0 if (!SvOK (tuple))
1312 0 3 XPUSHs (
3 0 XPUSHs (
2 1 XPUSHs (
0 0 XPUSHs (
2 0 XPUSHs (
2 0 XPUSHs (
0 0 XPUSHs (
2 0 XPUSHs (
1 1 XPUSHs (
0 0 XPUSHs (
1323 0 10 if (!SvOK (tuple))
0 0 if (!SvOK (tuple))
0 0 if (!SvOK (tuple))
1328 0 10 UV data = SvUV (AvARRAY (av)[BER_DATA]);
1330 0 10 XPUSHs (
10 0 XPUSHs (
9 1 XPUSHs (
0 0 XPUSHs (
9 0 XPUSHs (
9 0 XPUSHs (
0 0 XPUSHs (
9 0 XPUSHs (
7 2 XPUSHs (
0 0 XPUSHs (
1 6 XPUSHs (
1 0 XPUSHs (
0 1 XPUSHs (
0 6 XPUSHs (
6 0 XPUSHs (
3 4 XPUSHs (
1343 0 4 if (!SvOK (tuple))
0 0 if (!SvOK (tuple))
0 0 if (!SvOK (tuple))
1348 0 4 XPUSHs (
4 0 XPUSHs (
3 1 XPUSHs (
0 0 XPUSHs (
3 0 XPUSHs (
2 1 XPUSHs (
0 0 XPUSHs (
2 0 XPUSHs (
2 0 XPUSHs (
0 0 XPUSHs (
1 1 XPUSHs (
1 0 XPUSHs (
0 1 XPUSHs (
1 0 XPUSHs (
1372 0 187 XPUSHs (buf_sv);