| line |
true |
false |
branch |
|
78
|
59329 |
0 |
if (UNLIKELY(len == 0 || len > (MAX_INDEX_DIGITS + 1))) return 0; |
|
|
1 |
59328 |
if (UNLIKELY(len == 0 || len > (MAX_INDEX_DIGITS + 1))) return 0; |
|
80
|
19 |
59309 |
if (*s == '-') { |
|
84
|
0 |
19 |
if (UNLIKELY(len == 0)) return 0; |
|
87
|
1 |
59327 |
if (UNLIKELY(len > MAX_INDEX_DIGITS)) return 0; |
|
88
|
129 |
59198 |
if (len > 1 && *s == '0') return 0; /* leading zeros => hash key */ |
|
|
7 |
122 |
if (len > 1 && *s == '0') return 0; /* leading zeros => hash key */ |
|
90
|
59347 |
42252 |
while (s < end) { |
|
91
|
59341 |
6 |
if (UNLIKELY(*s < '0' || *s > '9')) return 0; |
|
|
17062 |
42279 |
if (UNLIKELY(*s < '0' || *s > '9')) return 0; |
|
96
|
19 |
42233 |
*idx = negative ? -val : val; |
|
104
|
8 |
40180 |
return SvUTF8(sv) ? -(I32)klen : (I32)klen; |
|
109
|
370 |
131 |
while (p < end && *p == '/') p++; |
|
|
189 |
181 |
while (p < end && *p == '/') p++; |
|
115
|
70 |
4022 |
if (SvIOK(sv)) { |
|
133
|
0 |
109305 |
if (UNLIKELY(path_len == 0)) { |
|
140
|
107304 |
2001 |
if (*p == '/') p++; |
|
142
|
246283 |
4 |
while (p < end) { |
|
144
|
779062 |
101287 |
while (p < end && *p != '/') p++; |
|
|
634066 |
144996 |
while (p < end && *p != '/') p++; |
|
148
|
13 |
246270 |
if (UNLIKELY(tok_len == 0)) { |
|
155
|
289975 |
101292 |
while (check < end && *check == '/') check++; |
|
|
144997 |
144978 |
while (check < end && *check == '/') check++; |
|
158
|
101292 |
144978 |
if (check >= end) { |
|
165
|
0 |
144978 |
if (UNLIKELY(!SvROK(current))) { |
|
173
|
142951 |
2027 |
if (LIKELY(t == SVt_PVHV)) { |
|
176
|
124119 |
18832 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
0 |
124119 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
124119 |
18832 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
2006 |
122113 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
177
|
12832 |
8006 |
if (create) { |
|
181
|
0 |
12832 |
if (UNLIKELY(SvRMAGICAL((SV*)hv))) { |
|
186
|
21472 |
4214 |
while (next_end < end && *next_end != '/') next_end++; |
|
|
12854 |
8618 |
while (next_end < end && *next_end != '/') next_end++; |
|
190
|
9 |
12823 |
: newRV_noinc((SV*)newHV()); |
|
191
|
0 |
12832 |
if (UNLIKELY(!hv_store(hv, tok_start, (I32)tok_len * utf8_flag, new_ref, 0))) { |
|
204
|
2027 |
0 |
} else if (t == SVt_PVAV) { |
|
206
|
1 |
2026 |
if (UNLIKELY(!is_array_index(tok_start, tok_len, &idx))) { |
|
211
|
2018 |
8 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
0 |
2018 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
2018 |
8 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
1 |
2017 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
212
|
8 |
1 |
if (create) { |
|
213
|
1 |
7 |
if (UNLIKELY(SvRMAGICAL((SV*)inner))) { |
|
217
|
14 |
5 |
while (next_end < end && *next_end != '/') next_end++; |
|
|
12 |
2 |
while (next_end < end && *next_end != '/') next_end++; |
|
221
|
4 |
3 |
: newRV_noinc((SV*)newHV()); |
|
222
|
0 |
7 |
if (UNLIKELY(!av_store((AV*)inner, idx, new_ref))) { |
|
258
|
63 |
7 |
if (path_len > 0 && *start == '/') start++; |
|
|
62 |
1 |
if (path_len > 0 && *start == '/') start++; |
|
262
|
135 |
70 |
while (p < path_end) { |
|
264
|
329 |
63 |
while (p < path_end && *p != '/') p++; |
|
|
257 |
72 |
while (p < path_end && *p != '/') p++; |
|
265
|
135 |
0 |
if (p > tok_start) count++; |
|
266
|
72 |
63 |
if (p < path_end) p++; |
|
270
|
7 |
63 |
if (count == 0) { |
|
273
|
0 |
7 |
cp->utf8_flag = SvUTF8(path_sv) ? -1 : 1; |
|
284
|
3 |
60 |
cp->utf8_flag = SvUTF8(path_sv) ? -1 : 1; |
|
298
|
135 |
63 |
while (p < copy_end && i < count) { |
|
|
135 |
0 |
while (p < copy_end && i < count) { |
|
300
|
329 |
63 |
while (p < copy_end && *p != '/') p++; |
|
|
257 |
72 |
while (p < copy_end && *p != '/') p++; |
|
302
|
135 |
0 |
if (tok_len > 0) { |
|
309
|
72 |
63 |
if (p < copy_end) p++; /* Skip slash */ |
|
313
|
72 |
63 |
for (SSize_t j = 0; j < count - 1; j++) { |
|
322
|
70 |
0 |
if (cp) { |
|
346
|
3 |
93 |
const I32 utf8_flag = SvUTF8(path_sv) ? -1 : 1; |
|
351
|
187 |
3 |
while (p < end && *p == '/') p++; |
|
|
94 |
93 |
while (p < end && *p == '/') p++; |
|
353
|
217 |
94 |
while (p < end && SvOK(current)) { |
|
|
216 |
1 |
while (p < end && SvOK(current)) { |
|
355
|
1804 |
91 |
while (p < end && *p != '/') p++; |
|
|
1679 |
125 |
while (p < end && *p != '/') p++; |
|
358
|
5 |
211 |
if (UNLIKELY(comp_len == 0)) { |
|
359
|
5 |
0 |
if (p < end) p++; |
|
363
|
1 |
210 |
if (UNLIKELY(!SvROK(current))) { |
|
373
|
163 |
47 |
if (LIKELY(t == SVt_PVHV)) { |
|
375
|
156 |
7 |
current = svp ? *svp : &PL_sv_undef; |
|
376
|
47 |
0 |
} else if (t == SVt_PVAV) { |
|
378
|
0 |
47 |
if (UNLIKELY(!is_array_index(start, comp_len, &idx))) { |
|
383
|
45 |
2 |
current = elem ? *elem : &PL_sv_undef; |
|
389
|
120 |
90 |
if (p < end && *p == '/') p++; |
|
|
120 |
0 |
if (p < end && *p == '/') p++; |
|
399
|
94 |
0 |
while (p < end && *p == '/') p++; |
|
|
49 |
45 |
while (p < end && *p == '/') p++; |
|
400
|
0 |
45 |
if (p >= end) return 0; |
|
402
|
121 |
30 |
while (q < end && *q != '/') q++; |
|
|
106 |
15 |
while (q < end && *q != '/') q++; |
|
423
|
3 |
60 |
const I32 utf8_flag = SvUTF8(path_sv) ? -1 : 1; |
|
426
|
122 |
5 |
while (p < end && *p == '/') p++; |
|
|
64 |
58 |
while (p < end && *p == '/') p++; |
|
428
|
5 |
58 |
if (UNLIKELY(p >= end)) { |
|
435
|
153 |
50 |
while (p < end) { |
|
437
|
1641 |
56 |
while (p < end && *p != '/') p++; |
|
|
1544 |
97 |
while (p < end && *p != '/') p++; |
|
440
|
4 |
149 |
if (UNLIKELY(comp_len == 0)) { |
|
441
|
4 |
0 |
if (p < end) p++; |
|
447
|
1 |
148 |
if (UNLIKELY(!SvROK(current))) { |
|
454
|
108 |
40 |
if (LIKELY(t == SVt_PVHV)) { |
|
458
|
42 |
66 |
if (is_last) { |
|
459
|
1 |
41 |
SV *copy = SvROK(value_sv) ? SvREFCNT_inc(value_sv) : newSVsv(value_sv); |
|
460
|
3 |
39 |
if (UNLIKELY(!hv_store(hv, start, klen, copy, 0))) { |
|
462
|
3 |
0 |
croak(SvRMAGICAL((SV*)hv) |
|
468
|
0 |
66 |
if (UNLIKELY(!elem)) { |
|
469
|
0 |
0 |
croak(SvRMAGICAL((SV*)hv) |
|
473
|
33 |
33 |
if (!SvROK(*elem)) { |
|
476
|
1 |
32 |
if (UNLIKELY(SvRMAGICAL((SV*)hv))) { |
|
481
|
16 |
16 |
: newRV_noinc((SV*)newHV()); |
|
487
|
40 |
0 |
} else if (t == SVt_PVAV) { |
|
489
|
1 |
39 |
if (UNLIKELY(!is_array_index(start, comp_len, &idx))) { |
|
494
|
12 |
27 |
if (is_last) { |
|
495
|
0 |
12 |
SV *copy = SvROK(value_sv) ? SvREFCNT_inc(value_sv) : newSVsv(value_sv); |
|
496
|
1 |
11 |
if (UNLIKELY(!av_store(av, idx, copy))) { |
|
498
|
0 |
1 |
croak(SvRMAGICAL((SV*)av) |
|
504
|
0 |
27 |
if (UNLIKELY(!elem)) { |
|
505
|
0 |
0 |
croak(SvRMAGICAL((SV*)av) |
|
509
|
14 |
13 |
if (!SvROK(*elem)) { |
|
510
|
1 |
13 |
if (UNLIKELY(SvRMAGICAL((SV*)av))) { |
|
515
|
0 |
13 |
: newRV_noinc((SV*)newHV()); |
|
525
|
91 |
50 |
if (p < end && *p == '/') p++; |
|
|
91 |
0 |
if (p < end && *p == '/') p++; |
|
528
|
2 |
48 |
if (GIMME_V != G_VOID) |
|
545
|
2 |
36 |
const I32 utf8_flag = SvUTF8(path_sv) ? -1 : 1; |
|
548
|
73 |
4 |
while (p < end && *p == '/') p++; |
|
|
39 |
34 |
while (p < end && *p == '/') p++; |
|
550
|
4 |
34 |
if (p >= end) { |
|
560
|
72 |
0 |
while (p < end) { |
|
562
|
224 |
31 |
while (p < end && *p != '/') p++; |
|
|
183 |
41 |
while (p < end && *p != '/') p++; |
|
565
|
0 |
72 |
if (UNLIKELY(comp_len == 0)) { |
|
566
|
0 |
0 |
if (p < end) p++; |
|
572
|
32 |
40 |
if (is_last) { |
|
579
|
2 |
38 |
if (UNLIKELY(!SvROK(current))) { |
|
587
|
36 |
2 |
if (LIKELY(t == SVt_PVHV)) { |
|
589
|
36 |
0 |
current = svp ? *svp : &PL_sv_undef; |
|
590
|
2 |
0 |
} else if (t == SVt_PVAV) { |
|
592
|
0 |
2 |
if (UNLIKELY(!is_array_index(start, comp_len, &idx))) { |
|
597
|
2 |
0 |
current = elem ? *elem : &PL_sv_undef; |
|
603
|
38 |
0 |
if (p < end && *p == '/') p++; |
|
|
38 |
0 |
if (p < end && *p == '/') p++; |
|
608
|
32 |
0 |
if (parent && SvROK(parent)) { |
|
|
32 |
0 |
if (parent && SvROK(parent)) { |
|
611
|
26 |
6 |
if (LIKELY(t == SVt_PVHV)) { |
|
614
|
6 |
0 |
} else if (t == SVt_PVAV) { |
|
616
|
6 |
0 |
if (is_array_index(last_key_start, last_key_len, &idx)) |
|
622
|
30 |
2 |
PUSHs(deleted ? deleted : &PL_sv_undef); |
|
638
|
1 |
48 |
const I32 utf8_flag = SvUTF8(path_sv) ? -1 : 1; |
|
641
|
93 |
4 |
while (p < end && *p == '/') p++; |
|
|
48 |
45 |
while (p < end && *p == '/') p++; |
|
643
|
4 |
45 |
if (p >= end) { |
|
651
|
91 |
0 |
while (p < end) { |
|
653
|
272 |
42 |
while (p < end && *p != '/') p++; |
|
|
223 |
49 |
while (p < end && *p != '/') p++; |
|
656
|
0 |
91 |
if (UNLIKELY(comp_len == 0)) { |
|
657
|
0 |
0 |
if (p < end) p++; |
|
663
|
0 |
91 |
if (UNLIKELY(!SvROK(current))) { |
|
671
|
78 |
13 |
if (LIKELY(t == SVt_PVHV)) { |
|
674
|
34 |
44 |
if (is_last) { |
|
675
|
26 |
8 |
PUSHs(hv_exists(hv, start, klen) ? &PL_sv_yes : &PL_sv_no); |
|
679
|
43 |
1 |
if (!svp || !SvOK(*svp)) { |
|
|
0 |
43 |
if (!svp || !SvOK(*svp)) { |
|
684
|
13 |
0 |
} else if (t == SVt_PVAV) { |
|
686
|
0 |
13 |
if (UNLIKELY(!is_array_index(start, comp_len, &idx))) { |
|
691
|
9 |
4 |
if (is_last) { |
|
692
|
5 |
4 |
PUSHs(av_exists(av, idx) ? &PL_sv_yes : &PL_sv_no); |
|
696
|
3 |
1 |
if (!elem || !SvOK(*elem)) { |
|
|
0 |
3 |
if (!elem || !SvOK(*elem)) { |
|
706
|
46 |
0 |
if (p < end && *p == '/') p++; |
|
|
46 |
0 |
if (p < end && *p == '/') p++; |
|
733
|
23 |
0 |
if (p < end && *p == '/') p++; |
|
|
22 |
1 |
if (p < end && *p == '/') p++; |
|
735
|
51 |
23 |
while (p < end) { |
|
737
|
117 |
22 |
while (p < end && *p != '/') p++; |
|
|
88 |
29 |
while (p < end && *p != '/') p++; |
|
740
|
3 |
48 |
if (comp_len == 0) { |
|
741
|
3 |
0 |
if (p < end) p++; |
|
749
|
26 |
22 |
if (p < end && *p == '/') p++; |
|
|
26 |
0 |
if (p < end && *p == '/') p++; |
|
807
|
51 |
33 |
if (path_op->op_type == OP_CONST && |
|
808
|
51 |
0 |
(path_op->op_private & OPpCONST_BARE) == 0) |
|
811
|
51 |
0 |
if (SvPOK(path_sv) && !SvUTF8(path_sv)) { |
|
|
49 |
2 |
if (SvPOK(path_sv) && !SvUTF8(path_sv)) { |
|
818
|
95 |
3 |
while (p < path_end && *p == '/') p++; |
|
|
49 |
46 |
while (p < path_end && *p == '/') p++; |
|
819
|
3 |
46 |
if (p >= path_end) { |
|
831
|
103 |
23 |
while (q < path_end) { |
|
833
|
399 |
27 |
while (q < path_end && *q != '/') q++; |
|
|
323 |
76 |
while (q < path_end && *q != '/') q++; |
|
836
|
101 |
2 |
if (tok_len > 0 && is_array_index(tok, tok_len, &dummy)) { |
|
|
23 |
78 |
if (tok_len > 0 && is_array_index(tok, tok_len, &dummy)) { |
|
840
|
58 |
22 |
if (q < path_end) q++; |
|
843
|
23 |
23 |
if (!has_numeric) { |
|
949
|
4 |
44283 |
const I32 utf8_flag = SvUTF8(path) ? -1 : 1; |
|
951
|
4 |
44283 |
if (path_len == 0) { |
|
957
|
4005 |
40278 |
if (!final_key) { |
|
958
|
1 |
4004 |
RETVAL = parent ? SvREFCNT_inc(parent) : &PL_sv_undef; |
|
959
|
40278 |
0 |
} else if (!parent || !SvROK(parent)) { |
|
|
0 |
40278 |
} else if (!parent || !SvROK(parent)) { |
|
965
|
20256 |
20022 |
if (t == SVt_PVHV) { |
|
967
|
18251 |
2005 |
RETVAL = (val && *val) ? SvREFCNT_inc(*val) : &PL_sv_undef; |
|
|
18251 |
0 |
RETVAL = (val && *val) ? SvREFCNT_inc(*val) : &PL_sv_undef; |
|
968
|
20021 |
1 |
} else if (t == SVt_PVAV) { |
|
970
|
20017 |
4 |
if (is_array_index(final_key, final_key_len, &idx)) { |
|
972
|
20014 |
3 |
RETVAL = (val && *val) ? SvREFCNT_inc(*val) : &PL_sv_undef; |
|
|
20014 |
0 |
RETVAL = (val && *val) ? SvREFCNT_inc(*val) : &PL_sv_undef; |
|
994
|
3 |
40556 |
const I32 utf8_flag = SvUTF8(path) ? -1 : 1; |
|
996
|
2002 |
38557 |
if (path_len == 0) { |
|
1004
|
2 |
38554 |
if (!final_key) { |
|
1005
|
1 |
1 |
croak(parent ? "Cannot set root" : "Cannot navigate to path"); |
|
1007
|
38554 |
0 |
if (!parent || !SvROK(parent)) { |
|
|
1 |
38553 |
if (!parent || !SvROK(parent)) { |
|
1013
|
2006 |
36547 |
SV *copy = SvROK(value) ? SvREFCNT_inc(value) : newSVsv(value); /* Refs shared, scalars copied */ |
|
1015
|
18538 |
20015 |
if (t == SVt_PVHV) { |
|
1016
|
3 |
18535 |
if (UNLIKELY(!hv_store((HV*)inner, final_key, (I32)final_key_len * utf8_flag, copy, 0))) { |
|
1018
|
3 |
0 |
croak(SvRMAGICAL(inner) |
|
1022
|
20015 |
0 |
} else if (t == SVt_PVAV) { |
|
1024
|
2 |
20013 |
if (!is_array_index(final_key, final_key_len, &idx)) { |
|
1028
|
2 |
20011 |
if (UNLIKELY(!av_store((AV*)inner, idx, copy))) { |
|
1030
|
1 |
1 |
croak(SvRMAGICAL(inner) |
|
1039
|
38544 |
2 |
if (GIMME_V == G_VOID) { |
|
1055
|
1 |
26227 |
const I32 utf8_flag = SvUTF8(path) ? -1 : 1; |
|
1057
|
2002 |
24226 |
if (path_len == 0) { |
|
1065
|
2003 |
22223 |
if (!final_key) { |
|
1066
|
1 |
2002 |
if (parent) { |
|
1070
|
22223 |
0 |
} else if (!parent || !SvROK(parent)) { |
|
|
0 |
22223 |
} else if (!parent || !SvROK(parent)) { |
|
1076
|
22216 |
7 |
if (t == SVt_PVHV) { |
|
1078
|
22212 |
4 |
if (RETVAL) SvREFCNT_inc(RETVAL); |
|
1080
|
7 |
0 |
} else if (t == SVt_PVAV) { |
|
1082
|
7 |
0 |
if (is_array_index(final_key, final_key_len, &idx)) { |
|
1084
|
6 |
1 |
RETVAL = old ? SvREFCNT_inc(old) : &PL_sv_undef; |
|
1104
|
2 |
2241 |
const I32 utf8_flag = SvUTF8(path) ? -1 : 1; |
|
1106
|
4 |
2239 |
if (path_len == 0) { |
|
1113
|
2002 |
237 |
if (!final_key) { |
|
1115
|
237 |
0 |
} else if (!parent || !SvROK(parent)) { |
|
|
0 |
237 |
} else if (!parent || !SvROK(parent)) { |
|
1121
|
228 |
9 |
if (t == SVt_PVHV) { |
|
1123
|
9 |
0 |
} else if (t == SVt_PVAV) { |
|
1126
|
9 |
0 |
? av_exists((AV*)inner, idx) : 0; |
|
1143
|
16120 |
4054 |
for (SSize_t i = 0; i < len; i++) { |
|
1145
|
16120 |
0 |
if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { |
|
|
0 |
16120 |
if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { |
|
|
16120 |
0 |
if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { |
|
|
1 |
16119 |
if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { |
|
1153
|
16082 |
37 |
if (LIKELY(t == SVt_PVHV)) { |
|
1157
|
16077 |
5 |
if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; } |
|
|
0 |
16077 |
if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; } |
|
1159
|
37 |
0 |
} else if (t == SVt_PVAV) { |
|
1161
|
3 |
34 |
if (UNLIKELY(!sv_to_index(aTHX_ *key_ptr, &idx))) { RETVAL = &PL_sv_undef; goto done; } |
|
1163
|
32 |
2 |
if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; } |
|
|
0 |
32 |
if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; } |
|
1184
|
3 |
4031 |
if (UNLIKELY(len == 0)) croak("Cannot set root"); |
|
1186
|
8034 |
4030 |
for (SSize_t i = 0; i < len - 1; i++) { |
|
1188
|
8034 |
0 |
if (UNLIKELY(!key_ptr || !*key_ptr)) croak("Invalid path element"); |
|
|
0 |
8034 |
if (UNLIKELY(!key_ptr || !*key_ptr)) croak("Invalid path element"); |
|
1189
|
0 |
8034 |
if (UNLIKELY(!SvROK(current))) croak("Cannot navigate to path"); |
|
1194
|
8029 |
5 |
if (LIKELY(t == SVt_PVHV)) { |
|
1198
|
4015 |
4014 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
0 |
4015 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
4015 |
4014 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
1 |
4014 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
1201
|
4015 |
0 |
SV *new_ref = (next_key && *next_key && sv_to_index(aTHX_ *next_key, &dummy)) |
|
|
5 |
4010 |
SV *new_ref = (next_key && *next_key && sv_to_index(aTHX_ *next_key, &dummy)) |
|
1203
|
4015 |
0 |
: newRV_noinc((SV*)newHV()); |
|
1204
|
0 |
4015 |
if (UNLIKELY(!hv_store((HV*)inner, kstr, sklen, new_ref, 0))) { |
|
1206
|
0 |
0 |
croak(SvRMAGICAL(inner) |
|
1214
|
5 |
0 |
} else if (t == SVt_PVAV) { |
|
1216
|
0 |
5 |
if (UNLIKELY(!sv_to_index(aTHX_ *key_ptr, &idx))) croak("Invalid array index"); |
|
1218
|
1 |
4 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
0 |
1 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
1 |
4 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
1 |
0 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
1221
|
5 |
0 |
SV *new_ref = (next_key && *next_key && sv_to_index(aTHX_ *next_key, &dummy)) |
|
|
1 |
4 |
SV *new_ref = (next_key && *next_key && sv_to_index(aTHX_ *next_key, &dummy)) |
|
1223
|
5 |
0 |
: newRV_noinc((SV*)newHV()); |
|
1224
|
1 |
4 |
if (UNLIKELY(!av_store((AV*)inner, idx, new_ref))) { |
|
1226
|
1 |
0 |
croak(SvRMAGICAL(inner) |
|
1239
|
0 |
4030 |
if (UNLIKELY(!SvROK(current))) croak("Cannot set on non-reference"); |
|
1243
|
4030 |
0 |
if (UNLIKELY(!final_key_ptr || !*final_key_ptr)) croak("Invalid final key"); |
|
|
0 |
4030 |
if (UNLIKELY(!final_key_ptr || !*final_key_ptr)) croak("Invalid final key"); |
|
1244
|
1 |
4029 |
SV *copy = SvROK(value) ? SvREFCNT_inc(value) : newSVsv(value); /* Refs shared, scalars copied */ |
|
1246
|
4018 |
12 |
if (LIKELY(t == SVt_PVHV)) { |
|
1249
|
3 |
4015 |
if (UNLIKELY(!hv_store((HV*)inner, kstr, sklen, copy, 0))) { |
|
1251
|
3 |
0 |
croak(SvRMAGICAL(inner) |
|
1255
|
12 |
0 |
} else if (t == SVt_PVAV) { |
|
1257
|
1 |
11 |
if (UNLIKELY(!sv_to_index(aTHX_ *final_key_ptr, &idx))) { |
|
1261
|
1 |
10 |
if (UNLIKELY(!av_store((AV*)inner, idx, copy))) { |
|
1263
|
0 |
1 |
croak(SvRMAGICAL(inner) |
|
1272
|
4024 |
1 |
if (GIMME_V == G_VOID) { |
|
1287
|
2 |
27 |
if (UNLIKELY(len == 0)) { RETVAL = 1; goto done; } |
|
1289
|
24 |
27 |
for (SSize_t i = 0; i < len - 1; i++) { |
|
1291
|
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; } |
|
1296
|
23 |
1 |
if (LIKELY(t == SVt_PVHV)) { |
|
1300
|
23 |
0 |
if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; } |
|
|
0 |
23 |
if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; } |
|
1302
|
1 |
0 |
} else if (t == SVt_PVAV) { |
|
1304
|
0 |
1 |
if (UNLIKELY(!sv_to_index(aTHX_ *key_ptr, &idx))) { RETVAL = 0; goto done; } |
|
1306
|
1 |
0 |
if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; } |
|
|
0 |
1 |
if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; } |
|
1313
|
0 |
27 |
if (UNLIKELY(!SvROK(current))) { RETVAL = 0; goto done; } |
|
1317
|
27 |
0 |
if (UNLIKELY(!final_key_ptr || !*final_key_ptr)) { RETVAL = 0; goto done; } |
|
|
0 |
27 |
if (UNLIKELY(!final_key_ptr || !*final_key_ptr)) { RETVAL = 0; goto done; } |
|
1319
|
13 |
14 |
if (LIKELY(t == SVt_PVHV)) { |
|
1323
|
14 |
0 |
} else if (t == SVt_PVAV) { |
|
1325
|
14 |
0 |
RETVAL = sv_to_index(aTHX_ *final_key_ptr, &idx) ? av_exists((AV*)inner, idx) : 0; |
|
1329
|
2 |
27 |
done: |
|
1341
|
3 |
4016 |
if (UNLIKELY(len == 0)) croak("Cannot delete root"); |
|
1343
|
8012 |
4015 |
for (SSize_t i = 0; i < len - 1; i++) { |
|
1345
|
8012 |
0 |
if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { RETVAL = &PL_sv_undef; goto done; } |
|
|
0 |
8012 |
if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { RETVAL = &PL_sv_undef; goto done; } |
|
|
8012 |
0 |
if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { RETVAL = &PL_sv_undef; goto done; } |
|
|
1 |
8011 |
if (UNLIKELY(!key_ptr || !*key_ptr || !SvROK(current))) { RETVAL = &PL_sv_undef; goto done; } |
|
1350
|
8011 |
0 |
if (LIKELY(t == SVt_PVHV)) { |
|
1354
|
8011 |
0 |
if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; } |
|
|
0 |
8011 |
if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; } |
|
1356
|
0 |
0 |
} else if (t == SVt_PVAV) { |
|
1358
|
0 |
0 |
if (UNLIKELY(!sv_to_index(aTHX_ *key_ptr, &idx))) { RETVAL = &PL_sv_undef; goto done; } |
|
1360
|
0 |
0 |
if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; } |
|
|
0 |
0 |
if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; } |
|
1367
|
0 |
4015 |
if (UNLIKELY(!SvROK(current))) { RETVAL = &PL_sv_undef; goto done; } |
|
1371
|
4015 |
0 |
if (UNLIKELY(!final_key_ptr || !*final_key_ptr)) { RETVAL = &PL_sv_undef; goto done; } |
|
|
0 |
4015 |
if (UNLIKELY(!final_key_ptr || !*final_key_ptr)) { RETVAL = &PL_sv_undef; goto done; } |
|
1373
|
4012 |
3 |
if (LIKELY(t == SVt_PVHV)) { |
|
1377
|
4009 |
3 |
if (RETVAL) SvREFCNT_inc(RETVAL); |
|
1379
|
3 |
0 |
} else if (t == SVt_PVAV) { |
|
1381
|
3 |
0 |
if (sv_to_index(aTHX_ *final_key_ptr, &idx)) { |
|
1383
|
3 |
0 |
RETVAL = old ? SvREFCNT_inc(old) : &PL_sv_undef; |
|
1413
|
242 |
3 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
|
7 |
235 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
|
235 |
0 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
|
0 |
235 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
1415
|
1 |
234 |
if (UNLIKELY(cp->count == 0)) { |
|
1424
|
470 |
231 |
while (c < end) { |
|
1425
|
1 |
469 |
if (UNLIKELY(!SvROK(current))) { |
|
1433
|
458 |
11 |
if (LIKELY(t == SVt_PVHV)) { |
|
1435
|
457 |
1 |
if (UNLIKELY(!val || !*val)) { |
|
|
0 |
457 |
if (UNLIKELY(!val || !*val)) { |
|
1440
|
11 |
0 |
} else if (t == SVt_PVAV) { |
|
1441
|
1 |
10 |
if (UNLIKELY(!c->is_numeric)) { |
|
1446
|
10 |
0 |
if (UNLIKELY(!val || !*val)) { |
|
|
0 |
10 |
if (UNLIKELY(!val || !*val)) { |
|
1470
|
223 |
0 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
|
1 |
222 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
|
222 |
0 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
|
0 |
222 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
1472
|
2 |
220 |
if (UNLIKELY(cp->count == 0)) croak("Cannot set root"); |
|
1481
|
224 |
218 |
while (c < last) { |
|
1482
|
0 |
224 |
if (UNLIKELY(!SvROK(current))) croak("Cannot navigate to path"); |
|
1487
|
221 |
3 |
if (LIKELY(t == SVt_PVHV)) { |
|
1490
|
212 |
9 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
0 |
212 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
212 |
9 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
3 |
209 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
1494
|
2 |
10 |
: newRV_noinc((SV*)newHV()); |
|
1495
|
0 |
12 |
if (UNLIKELY(!hv_store((HV*)inner, c->str, klen, new_ref, 0))) { |
|
1497
|
0 |
0 |
croak(SvRMAGICAL(inner) |
|
1505
|
3 |
0 |
} else if (t == SVt_PVAV) { |
|
1506
|
1 |
2 |
if (UNLIKELY(!c->is_numeric)) croak("Invalid array index"); |
|
1508
|
1 |
1 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
0 |
1 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
1 |
1 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
|
1 |
0 |
if (UNLIKELY(!val || !*val || !SvROK(*val))) { |
|
1511
|
0 |
2 |
: newRV_noinc((SV*)newHV()); |
|
1512
|
1 |
1 |
if (UNLIKELY(!av_store((AV*)inner, c->idx, new_ref))) { |
|
1514
|
1 |
0 |
croak(SvRMAGICAL(inner) |
|
1529
|
0 |
218 |
if (UNLIKELY(!SvROK(current))) croak("Cannot navigate to path"); |
|
1532
|
0 |
218 |
SV *copy = SvROK(value) ? SvREFCNT_inc(value) : newSVsv(value); /* Refs shared, scalars copied */ |
|
1534
|
213 |
5 |
if (LIKELY(t == SVt_PVHV)) { |
|
1535
|
3 |
210 |
if (UNLIKELY(!hv_store((HV*)inner, last->str, (I32)last->len * utf8_flag, copy, 0))) { |
|
1537
|
3 |
0 |
croak(SvRMAGICAL(inner) |
|
1541
|
5 |
0 |
} else if (t == SVt_PVAV) { |
|
1542
|
2 |
3 |
if (UNLIKELY(!last->is_numeric)) { SvREFCNT_dec(copy); croak("Invalid array index"); } |
|
1543
|
1 |
2 |
if (UNLIKELY(!av_store((AV*)inner, last->idx, copy))) { |
|
1545
|
0 |
1 |
croak(SvRMAGICAL(inner) |
|
1555
|
211 |
1 |
if (GIMME_V == G_VOID) { |
|
1568
|
14 |
0 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
|
1 |
13 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
|
13 |
0 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
|
0 |
13 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
1570
|
1 |
12 |
if (UNLIKELY(cp->count == 0)) { |
|
1579
|
11 |
12 |
while (c < last) { |
|
1580
|
0 |
11 |
if (UNLIKELY(!SvROK(current))) { |
|
1587
|
11 |
0 |
if (LIKELY(t == SVt_PVHV)) { |
|
1589
|
11 |
0 |
if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; } |
|
|
0 |
11 |
if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; } |
|
1591
|
0 |
0 |
} else if (t == SVt_PVAV) { |
|
1592
|
0 |
0 |
if (UNLIKELY(!c->is_numeric)) { RETVAL = 0; goto done; } |
|
1594
|
0 |
0 |
if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; } |
|
|
0 |
0 |
if (UNLIKELY(!val || !*val)) { RETVAL = 0; goto done; } |
|
1604
|
0 |
12 |
if (UNLIKELY(!SvROK(current))) { |
|
1609
|
6 |
6 |
if (LIKELY(t == SVt_PVHV)) { |
|
1611
|
6 |
0 |
} else if (t == SVt_PVAV) { |
|
1612
|
5 |
1 |
RETVAL = last->is_numeric ? av_exists((AV*)inner, last->idx) : 0; |
|
1618
|
2 |
11 |
done: |
|
1628
|
10 |
0 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
|
1 |
9 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
|
9 |
0 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
|
0 |
9 |
VALIDATE_COMPILED_PATH(compiled, cp); |
|
1630
|
2 |
7 |
if (UNLIKELY(cp->count == 0)) croak("Cannot delete root"); |
|
1638
|
8 |
7 |
while (c < last) { |
|
1639
|
0 |
8 |
if (UNLIKELY(!SvROK(current))) { |
|
1646
|
8 |
0 |
if (LIKELY(t == SVt_PVHV)) { |
|
1648
|
8 |
0 |
if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; } |
|
|
0 |
8 |
if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; } |
|
1650
|
0 |
0 |
} else if (t == SVt_PVAV) { |
|
1651
|
0 |
0 |
if (UNLIKELY(!c->is_numeric)) { RETVAL = &PL_sv_undef; goto done; } |
|
1653
|
0 |
0 |
if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; } |
|
|
0 |
0 |
if (UNLIKELY(!val || !*val)) { RETVAL = &PL_sv_undef; goto done; } |
|
1663
|
0 |
7 |
if (UNLIKELY(!SvROK(current))) { |
|
1669
|
5 |
2 |
if (LIKELY(t == SVt_PVHV)) { |
|
1671
|
4 |
1 |
if (RETVAL) SvREFCNT_inc(RETVAL); |
|
1673
|
2 |
0 |
} else if (t == SVt_PVAV) { |
|
1674
|
1 |
1 |
if (last->is_numeric) { |
|
1676
|
1 |
0 |
RETVAL = old ? SvREFCNT_inc(old) : &PL_sv_undef; |
|
1694
|
75 |
0 |
if (SvROK(self)) { |
|
1698
|
70 |
5 |
if (SvIOK(inner)) { |
|
1700
|
70 |
0 |
if (cp && cp->magic == COMPILED_PATH_MAGIC) { |
|
|
70 |
0 |
if (cp && cp->magic == COMPILED_PATH_MAGIC) { |