Branch Coverage

XS.xs
Criterion Covered Total %
branch 567 794 71.4


line true false branch
72 59512 0 if (UNLIKELY(len == 0 || len > (MAX_INDEX_DIGITS + 1))) return 0; /* Empty or too long */
5 59507 if (UNLIKELY(len == 0 || len > (MAX_INDEX_DIGITS + 1))) return 0; /* Empty or too long */
75 17 59490 if (*s == '-') {
79 0 17 if (UNLIKELY(len == 0)) return 0; /* Just "-" */
82 1 59506 if (UNLIKELY(len > MAX_INDEX_DIGITS)) return 0; /* Too many digits */
83 239 59267 if (len > 1 && *s == '0') return 0; /* No leading zeros */
8 231 if (len > 1 && *s == '0') return 0; /* No leading zeros */
85 59517 42183 while (s < end) {
86 59513 4 if (UNLIKELY(*s < '0' || *s > '9')) return 0;
17311 42202 if (UNLIKELY(*s < '0' || *s > '9')) return 0;
91 17 42166 *idx = negative ? -val : val;
97 68 4019 if (SvIOK(sv)) {
113 0 109230 if (UNLIKELY(path_len == 0)) {
120 107229 2001 if (*p == '/') p++;
122 246176 4 while (p < end) {
124 778676 101214 while (p < end && *p != '/') p++;
633714 144962 while (p < end && *p != '/') p++;
128 13 246163 if (UNLIKELY(tok_len == 0)) {
135 289907 101219 while (check < end && *check == '/') check++;
144963 144944 while (check < end && *check == '/') check++;
138 101219 144944 if (check >= end) {
145 0 144944 if (UNLIKELY(!SvROK(current))) {
153 142922 2022 if (LIKELY(t == SVt_PVHV)) {
156 124094 18828 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
0 124094 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
124094 18828 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
2006 122088 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
157 12828 8006 if (create) {
160 21457 4211 while (next_end < end && *next_end != '/') next_end++;
12840 8617 while (next_end < end && *next_end != '/') next_end++;
164 9 12819 : newRV_noinc((SV*)newHV());
165 0 12828 if (UNLIKELY(!hv_store(hv, tok_start, tok_len, new_ref, 0))) {
178 2022 0 } else if (t == SVt_PVAV) {
180 0 2022 if (UNLIKELY(!is_array_index(tok_start, tok_len, &idx))) {
185 2014 8 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
0 2014 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
2014 8 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
0 2014 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
186 7 1 if (create) {
189 14 5 while (next_end < end && *next_end != '/') next_end++;
12 2 while (next_end < end && *next_end != '/') next_end++;
193 4 3 : newRV_noinc((SV*)newHV());
194 0 7 if (UNLIKELY(!av_store((AV*)inner, idx, new_ref))) {
230 42 5 if (path_len > 0 && *start == '/') start++;
41 1 if (path_len > 0 && *start == '/') start++;
234 101 47 while (p < path_end) {
236 225 42 while (p < path_end && *p != '/') p++;
166 59 while (p < path_end && *p != '/') p++;
237 101 0 if (p > tok_start) count++;
238 59 42 if (p < path_end) p++;
242 5 42 if (count == 0) {
255 40 2 if (count > 1) {
274 101 42 while (p < copy_end && i < count) {
101 0 while (p < copy_end && i < count) {
276 225 42 while (p < copy_end && *p != '/') p++;
166 59 while (p < copy_end && *p != '/') p++;
278 101 0 if (tok_len > 0) {
285 59 42 if (p < copy_end) p++; /* Skip slash */
289 59 42 for (SSize_t j = 0; j < count - 1; j++) {
298 47 0 if (cp) {
326 147 3 while (p < end && *p == '/') p++;
74 73 while (p < end && *p == '/') p++;
328 190 74 while (p < end && SvOK(current)) {
189 1 while (p < end && SvOK(current)) {
331 1719 71 while (p < end && *p != '/') p++;
1601 118 while (p < end && *p != '/') p++;
334 5 184 if (UNLIKELY(comp_len == 0)) {
335 5 0 if (p < end) p++;
339 1 183 if (UNLIKELY(!SvROK(current))) {
347 42 141 if (is_array_index(start, comp_len, &idx)) {
348 0 42 if (UNLIKELY(SvTYPE(inner) != SVt_PVAV)) {
353 40 2 current = elem ? *elem : &PL_sv_undef;
355 0 141 if (UNLIKELY(SvTYPE(inner) != SVt_PVHV)) {
360 134 7 current = svp ? *svp : &PL_sv_undef;
363 113 70 if (p < end && *p == '/') p++;
113 0 if (p < end && *p == '/') p++;
373 19 0 if (p >= end || *p != '/') return 0;
0 19 if (p >= end || *p != '/') return 0;
375 42 0 while (p < end && *p == '/') p++;
23 19 while (p < end && *p == '/') p++;
376 0 19 if (p >= end) return 0;
379 0 19 if (*p == '-') {
381 0 0 if (p >= end || *p == '/') return 0; /* Just "-" */
0 0 if (p >= end || *p == '/') return 0; /* Just "-" */
385 21 4 while (p < end && *p != '/') {
19 2 while (p < end && *p != '/') {
386 18 1 if (*p < '0' || *p > '9') return 0;
12 6 if (*p < '0' || *p > '9') return 0;
391 6 0 if (UNLIKELY(len == 0 || len > MAX_INDEX_DIGITS)) return 0;
0 6 if (UNLIKELY(len == 0 || len > MAX_INDEX_DIGITS)) return 0;
392 0 6 if (len > 1 && *digits_start == '0') return 0;
0 0 if (len > 1 && *digits_start == '0') return 0;
411 48 4 while (p < end && *p == '/') p++;
27 21 while (p < end && *p == '/') p++;
413 4 21 if (UNLIKELY(p >= end)) {
420 49 19 while (p < end) {
423 1147 21 while (p < end && *p != '/') p++;
1119 28 while (p < end && *p != '/') p++;
426 4 45 if (UNLIKELY(comp_len == 0)) {
427 4 0 if (p < end) p++;
433 52 21 while (next_p < end && *next_p == '/') next_p++;
28 24 while (next_p < end && *next_p == '/') next_p++;
436 0 45 if (UNLIKELY(!SvROK(current))) {
443 10 35 if (is_array_index(start, comp_len, &idx)) {
445 0 10 if (UNLIKELY(SvTYPE(inner) != SVt_PVAV)) {
450 8 2 if (is_last) {
452 0 8 SV *copy = SvROK(value_sv) ? SvREFCNT_inc(value_sv) : newSVsv(value_sv);
453 1 7 if (UNLIKELY(!av_store(av, idx, copy))) {
460 0 2 if (UNLIKELY(!elem)) {
463 0 2 if (!SvOK(*elem) || !SvROK(*elem)) {
0 0 if (!SvOK(*elem) || !SvROK(*elem)) {
466 0 2 if (kw_next_component_is_numeric(p, end)) {
478 1 34 if (UNLIKELY(SvTYPE(inner) != SVt_PVHV)) {
483 12 22 if (is_last) {
485 0 12 SV *copy = SvROK(value_sv) ? SvREFCNT_inc(value_sv) : newSVsv(value_sv);
486 0 12 if (UNLIKELY(!hv_store(hv, start, comp_len, copy, 0))) {
493 0 22 if (UNLIKELY(!elem)) {
496 7 15 if (!SvOK(*elem) || !SvROK(*elem)) {
2 5 if (!SvOK(*elem) || !SvROK(*elem)) {
499 6 11 if (kw_next_component_is_numeric(p, end)) {
511 24 19 if (p < end && *p == '/') p++;
24 0 if (p < end && *p == '/') p++;
531 63 3 while (p < end && *p == '/') p++;
34 29 while (p < end && *p == '/') p++;
533 3 29 if (p >= end) {
545 65 0 while (p < end) {
548 195 26 while (p < end && *p != '/') p++;
156 39 while (p < end && *p != '/') p++;
551 0 65 if (UNLIKELY(comp_len == 0)) {
552 0 0 if (p < end) p++;
562 78 27 while (next_p < end && *next_p == '/') next_p++;
40 38 while (next_p < end && *next_p == '/') next_p++;
565 27 38 if (is_last) {
575 2 36 if (UNLIKELY(!SvROK(current))) {
582 2 34 if (is_numeric) {
583 0 2 if (UNLIKELY(SvTYPE(inner) != SVt_PVAV)) {
588 2 0 current = elem ? *elem : &PL_sv_undef;
590 0 34 if (UNLIKELY(SvTYPE(inner) != SVt_PVHV)) {
595 34 0 current = svp ? *svp : &PL_sv_undef;
598 36 0 if (p < end && *p == '/') p++;
36 0 if (p < end && *p == '/') p++;
603 27 0 if (parent && SvROK(parent)) {
27 0 if (parent && SvROK(parent)) {
605 6 21 if (last_is_numeric) {
606 6 0 if (SvTYPE(inner) == SVt_PVAV)
609 21 0 if (SvTYPE(inner) == SVt_PVHV)
614 25 2 if (deleted) {
636 73 4 while (p < end && *p == '/') p++;
38 35 while (p < end && *p == '/') p++;
638 4 35 if (p >= end) {
646 81 0 while (p < end) {
649 238 32 while (p < end && *p != '/') p++;
189 49 while (p < end && *p != '/') p++;
652 0 81 if (UNLIKELY(comp_len == 0)) {
653 0 0 if (p < end) p++;
663 98 33 while (next_p < end && *next_p == '/') next_p++;
50 48 while (next_p < end && *next_p == '/') next_p++;
666 0 81 if (UNLIKELY(!SvROK(current))) {
673 12 69 if (is_numeric) {
674 0 12 if (UNLIKELY(SvTYPE(inner) != SVt_PVAV)) {
680 8 4 if (is_last) {
683 4 4 PUSHs(exists ? &PL_sv_yes : &PL_sv_no);
687 3 1 if (!elem || !SvOK(*elem)) {
0 3 if (!elem || !SvOK(*elem)) {
694 0 69 if (UNLIKELY(SvTYPE(inner) != SVt_PVHV)) {
700 25 44 if (is_last) {
703 17 8 PUSHs(exists ? &PL_sv_yes : &PL_sv_no);
707 43 1 if (!svp || !SvOK(*svp)) {
0 43 if (!svp || !SvOK(*svp)) {
715 46 0 if (p < end && *p == '/') p++;
46 0 if (p < end && *p == '/') p++;
742 42 0 if (p < end && *p == '/') p++;
41 1 if (p < end && *p == '/') p++;
744 125 42 while (p < end) {
747 526 41 while (p < end && *p != '/') p++;
442 84 while (p < end && *p != '/') p++;
750 3 122 if (comp_len == 0) {
751 3 0 if (p < end) p++;
759 27 95 if (is_numeric) {
771 81 41 if (p < end && *p == '/') p++;
81 0 if (p < end && *p == '/') p++;
855 44 22 if (path_op->op_type == OP_CONST &&
856 44 0 (path_op->op_private & OPpCONST_BARE) == 0)
859 44 0 if (SvPOK(path_sv)) {
865 87 2 while (p < path + path_len && *p == '/') p++;
45 42 while (p < path + path_len && *p == '/') p++;
866 2 42 if (p >= path + path_len) {
974 4 44250 if (path_len == 0) {
980 4005 40245 if (!final_key) {
981 1 4004 RETVAL = parent ? SvREFCNT_inc(parent) : &PL_sv_undef;
982 40245 0 } else if (!parent || !SvROK(parent)) {
0 40245 } else if (!parent || !SvROK(parent)) {
988 20229 20016 if (t == SVt_PVHV) {
990 18224 2005 RETVAL = (val && *val) ? SvREFCNT_inc(*val) : &PL_sv_undef;
18224 0 RETVAL = (val && *val) ? SvREFCNT_inc(*val) : &PL_sv_undef;
991 20016 0 } else if (t == SVt_PVAV) {
993 20012 4 if (is_array_index(final_key, final_key_len, &idx)) {
995 20009 3 RETVAL = (val && *val) ? SvREFCNT_inc(*val) : &PL_sv_undef;
20009 0 RETVAL = (val && *val) ? SvREFCNT_inc(*val) : &PL_sv_undef;
1018 2001 38536 if (path_len == 0) {
1026 1 38535 if (!final_key) {
1027 1 0 croak(parent ? "Cannot set root" : "Cannot navigate to path");
1029 38535 0 if (!parent || !SvROK(parent)) {
0 38535 if (!parent || !SvROK(parent)) {
1035 2005 36530 SV *copy = SvROK(value) ? SvREFCNT_inc(value) : newSVsv(value); /* Refs shared, scalars copied */
1037 18525 20010 if (t == SVt_PVHV) {
1038 0 18525 if (UNLIKELY(!hv_store((HV*)inner, final_key, final_key_len, copy, 0))) {
1042 20010 0 } else if (t == SVt_PVAV) {
1044 1 20009 if (!is_array_index(final_key, final_key_len, &idx)) {
1048 1 20008 if (UNLIKELY(!av_store((AV*)inner, idx, copy))) {
1057 38532 1 if (GIMME_V == G_VOID) {
1074 2001 24220 if (path_len == 0) {
1082 2003 22217 if (!final_key) {
1083 1 2002 if (parent) {
1087 22217 0 } else if (!parent || !SvROK(parent)) {
0 22217 } else if (!parent || !SvROK(parent)) {
1093 22212 5 if (t == SVt_PVHV) {
1095 22208 4 if (RETVAL) SvREFCNT_inc(RETVAL);
1097 5 0 } else if (t == SVt_PVAV) {
1099 5 0 if (is_array_index(final_key, final_key_len, &idx)) {
1101 4 1 RETVAL = old ? SvREFCNT_inc(old) : &PL_sv_undef;
1122 4 2224 if (path_len == 0) {
1129 2002 222 if (!final_key) {
1131 222 0 } else if (!parent || !SvROK(parent)) {
0 222 } else if (!parent || !SvROK(parent)) {
1137 214 8 if (t == SVt_PVHV) {
1139 8 0 } else if (t == SVt_PVAV) {
1142 8 0 ? av_exists((AV*)inner, idx) : 0;
1159 16110 4044 for (SSize_t i = 0; i < len; i++) {
1161 16110 0 if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) {
0 16110 if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) {
16110 0 if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) {
1 16109 if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) {
1169 16073 36 if (LIKELY(t == SVt_PVHV)) {
1173 16068 5 if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; }
0 16068 if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; }
1175 36 0 } else if (t == SVt_PVAV) {
1177 3 33 if (UNLIKELY(!sv_to_index(aTHX_ *key_ptr, &idx))) { RETVAL = &PL_sv_undef; goto done; }
1179 31 2 if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; }
0 31 if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; }
1200 2 4025 if (UNLIKELY(len == 0)) croak("Cannot set root");
1202 8029 4025 for (SSize_t i = 0; i < len - 1; i++) {
1204 8029 0 if (UNLIKELY(!key_ptr || !*key_ptr)) croak("Invalid path element");
0 8029 if (UNLIKELY(!key_ptr || !*key_ptr)) croak("Invalid path element");
1205 0 8029 if (UNLIKELY(!SvROK(current))) croak("Cannot navigate to path");
1210 8025 4 if (LIKELY(t == SVt_PVHV)) {
1214 4012 4013 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
0 4012 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
4012 4013 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
1 4011 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
1217 4014 0 SV *new_ref = (next_key && *next_key && sv_to_index(aTHX_ *next_key, &dummy))
5 4009 SV *new_ref = (next_key && *next_key && sv_to_index(aTHX_ *next_key, &dummy))
1219 4014 0 : newRV_noinc((SV*)newHV());
1220 0 4014 if (UNLIKELY(!hv_store((HV*)inner, kstr, klen, new_ref, 0))) {
1228 4 0 } else if (t == SVt_PVAV) {
1230 0 4 if (UNLIKELY(!sv_to_index(aTHX_ *key_ptr, &idx))) croak("Invalid array index");
1232 0 4 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
0 0 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
0 4 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
0 0 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
1235 4 0 SV *new_ref = (next_key && *next_key && sv_to_index(aTHX_ *next_key, &dummy))
1 3 SV *new_ref = (next_key && *next_key && sv_to_index(aTHX_ *next_key, &dummy))
1237 4 0 : newRV_noinc((SV*)newHV());
1238 0 4 if (UNLIKELY(!av_store((AV*)inner, idx, new_ref))) {
1251 0 4025 if (UNLIKELY(!SvROK(current))) croak("Cannot set on non-reference");
1255 4025 0 if (UNLIKELY(!final_key_ptr || !*final_key_ptr)) croak("Invalid final key");
0 4025 if (UNLIKELY(!final_key_ptr || !*final_key_ptr)) croak("Invalid final key");
1256 1 4024 SV *copy = SvROK(value) ? SvREFCNT_inc(value) : newSVsv(value); /* Refs shared, scalars copied */
1258 4014 11 if (LIKELY(t == SVt_PVHV)) {
1261 0 4014 if (UNLIKELY(!hv_store((HV*)inner, kstr, klen, copy, 0))) {
1265 11 0 } else if (t == SVt_PVAV) {
1267 0 11 if (UNLIKELY(!sv_to_index(aTHX_ *final_key_ptr, &idx))) {
1271 1 10 if (UNLIKELY(!av_store((AV*)inner, idx, copy))) {
1280 4023 1 if (GIMME_V == G_VOID) {
1295 2 26 if (UNLIKELY(len == 0)) { RETVAL = 1; goto done; }
1297 24 26 for (SSize_t i = 0; i < len - 1; i++) {
1299 24 0 if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { RETVAL = 0; goto done; }
0 24 if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { RETVAL = 0; goto done; }
24 0 if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { RETVAL = 0; goto done; }
0 24 if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { RETVAL = 0; goto done; }
1304 23 1 if (LIKELY(t == SVt_PVHV)) {
1308 23 0 if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; }
0 23 if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; }
1310 1 0 } else if (t == SVt_PVAV) {
1312 0 1 if (UNLIKELY(!sv_to_index(aTHX_ *key_ptr, &idx))) { RETVAL = 0; goto done; }
1314 1 0 if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; }
0 1 if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; }
1321 0 26 if (UNLIKELY(!SvROK(current))) { RETVAL = 0; goto done; }
1325 26 0 if (UNLIKELY(!final_key_ptr || !*final_key_ptr)) { RETVAL = 0; goto done; }
0 26 if (UNLIKELY(!final_key_ptr || !*final_key_ptr)) { RETVAL = 0; goto done; }
1327 12 14 if (LIKELY(t == SVt_PVHV)) {
1331 14 0 } else if (t == SVt_PVAV) {
1333 14 0 RETVAL = sv_to_index(aTHX_ *final_key_ptr, &idx) ? av_exists((AV*)inner, idx) : 0;
1337 2 26 done:
1349 2 4015 if (UNLIKELY(len == 0)) croak("Cannot delete root");
1351 8011 4014 for (SSize_t i = 0; i < len - 1; i++) {
1353 8011 0 if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { RETVAL = &PL_sv_undef; goto done; }
0 8011 if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { RETVAL = &PL_sv_undef; goto done; }
8011 0 if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { RETVAL = &PL_sv_undef; goto done; }
1 8010 if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { RETVAL = &PL_sv_undef; goto done; }
1358 8010 0 if (LIKELY(t == SVt_PVHV)) {
1362 8010 0 if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; }
0 8010 if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; }
1364 0 0 } else if (t == SVt_PVAV) {
1366 0 0 if (UNLIKELY(!sv_to_index(aTHX_ *key_ptr, &idx))) { RETVAL = &PL_sv_undef; goto done; }
1368 0 0 if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; }
0 0 if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; }
1375 0 4014 if (UNLIKELY(!SvROK(current))) { RETVAL = &PL_sv_undef; goto done; }
1379 4014 0 if (UNLIKELY(!final_key_ptr || !*final_key_ptr)) { RETVAL = &PL_sv_undef; goto done; }
0 4014 if (UNLIKELY(!final_key_ptr || !*final_key_ptr)) { RETVAL = &PL_sv_undef; goto done; }
1381 4011 3 if (LIKELY(t == SVt_PVHV)) {
1385 4008 3 if (RETVAL) SvREFCNT_inc(RETVAL);
1387 3 0 } else if (t == SVt_PVAV) {
1389 3 0 if (sv_to_index(aTHX_ *final_key_ptr, &idx)) {
1391 3 0 RETVAL = old ? SvREFCNT_inc(old) : &PL_sv_undef;
1421 1 225 VALIDATE_COMPILED_PATH(compiled, cp);
225 0 VALIDATE_COMPILED_PATH(compiled, cp);
0 225 VALIDATE_COMPILED_PATH(compiled, cp);
1423 1 224 if (UNLIKELY(cp->count == 0)) {
1431 459 222 while (c < end) {
1432 1 458 if (UNLIKELY(!SvROK(current))) {
1440 448 10 if (LIKELY(t == SVt_PVHV)) {
1442 447 1 if (UNLIKELY(!val || !*val)) {
0 447 if (UNLIKELY(!val || !*val)) {
1447 10 0 } else if (t == SVt_PVAV) {
1448 0 10 if (UNLIKELY(!c->is_numeric)) {
1453 10 0 if (UNLIKELY(!val || !*val)) {
0 10 if (UNLIKELY(!val || !*val)) {
1477 0 211 VALIDATE_COMPILED_PATH(compiled, cp);
211 0 VALIDATE_COMPILED_PATH(compiled, cp);
0 211 VALIDATE_COMPILED_PATH(compiled, cp);
1479 1 210 if (UNLIKELY(cp->count == 0)) croak("Cannot set root");
1487 214 209 while (c < last) {
1488 0 214 if (UNLIKELY(!SvROK(current))) croak("Cannot navigate to path");
1493 212 2 if (LIKELY(t == SVt_PVHV)) {
1495 205 7 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
0 205 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
205 7 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
0 205 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
1499 1 6 : newRV_noinc((SV*)newHV());
1500 0 7 if (UNLIKELY(!hv_store((HV*)inner, c->str, c->len, new_ref, 0))) {
1508 2 0 } else if (t == SVt_PVAV) {
1509 1 1 if (UNLIKELY(!c->is_numeric)) croak("Invalid array index");
1511 0 1 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
0 0 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
0 1 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
0 0 if (UNLIKELY(!val || !*val || !SvROK(*val))) {
1514 0 1 : newRV_noinc((SV*)newHV());
1515 0 1 if (UNLIKELY(!av_store((AV*)inner, c->idx, new_ref))) {
1530 0 209 if (UNLIKELY(!SvROK(current))) croak("Cannot navigate to path");
1533 0 209 SV *copy = SvROK(value) ? SvREFCNT_inc(value) : newSVsv(value); /* Refs shared, scalars copied */
1535 207 2 if (LIKELY(t == SVt_PVHV)) {
1536 0 207 if (UNLIKELY(!hv_store((HV*)inner, last->str, last->len, copy, 0))) {
1540 2 0 } else if (t == SVt_PVAV) {
1541 0 2 if (UNLIKELY(!last->is_numeric)) { SvREFCNT_dec(copy); croak("Invalid array index"); }
1542 1 1 if (UNLIKELY(!av_store((AV*)inner, last->idx, copy))) {
1552 207 1 if (GIMME_V == G_VOID) {
1565 0 11 VALIDATE_COMPILED_PATH(compiled, cp);
11 0 VALIDATE_COMPILED_PATH(compiled, cp);
0 11 VALIDATE_COMPILED_PATH(compiled, cp);
1567 1 10 if (UNLIKELY(cp->count == 0)) {
1575 10 10 while (c < last) {
1576 0 10 if (UNLIKELY(!SvROK(current))) {
1583 10 0 if (LIKELY(t == SVt_PVHV)) {
1585 10 0 if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; }
0 10 if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; }
1587 0 0 } else if (t == SVt_PVAV) {
1588 0 0 if (UNLIKELY(!c->is_numeric)) { RETVAL = 0; goto done; }
1590 0 0 if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; }
0 0 if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; }
1600 0 10 if (UNLIKELY(!SvROK(current))) {
1605 5 5 if (LIKELY(t == SVt_PVHV)) {
1607 5 0 } else if (t == SVt_PVAV) {
1608 5 0 RETVAL = last->is_numeric ? av_exists((AV*)inner, last->idx) : 0;
1614 2 9 done:
1624 0 6 VALIDATE_COMPILED_PATH(compiled, cp);
6 0 VALIDATE_COMPILED_PATH(compiled, cp);
0 6 VALIDATE_COMPILED_PATH(compiled, cp);
1626 1 5 if (UNLIKELY(cp->count == 0)) croak("Cannot delete root");
1633 5 5 while (c < last) {
1634 0 5 if (UNLIKELY(!SvROK(current))) {
1641 5 0 if (LIKELY(t == SVt_PVHV)) {
1643 5 0 if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; }
0 5 if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; }
1645 0 0 } else if (t == SVt_PVAV) {
1646 0 0 if (UNLIKELY(!c->is_numeric)) { RETVAL = &PL_sv_undef; goto done; }
1648 0 0 if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; }
0 0 if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; }
1658 0 5 if (UNLIKELY(!SvROK(current))) {
1664 4 1 if (LIKELY(t == SVt_PVHV)) {
1666 3 1 if (RETVAL) SvREFCNT_inc(RETVAL);
1668 1 0 } else if (t == SVt_PVAV) {
1669 1 0 if (last->is_numeric) {
1671 1 0 RETVAL = old ? SvREFCNT_inc(old) : &PL_sv_undef;
1689 47 0 if (SvROK(self)) {
1692 47 0 if (cp && cp->magic == COMPILED_PATH_MAGIC) {
47 0 if (cp && cp->magic == COMPILED_PATH_MAGIC) {