line |
true |
false |
branch |
36
|
121032 |
0 |
U8 *s = (U8*)SvPV_nomg(sv,len); |
42
|
0 |
121032 |
if (!tbl) |
46
|
120653 |
379 |
if (!SvUTF8(sv)) { |
47
|
1039318 |
120653 |
while (s < send) { |
49
|
455651 |
583667 |
if (ch >= 0) { |
55
|
28 |
120625 |
SvSETMAGIC(sv); |
63
|
0 |
379 |
if (grows) |
68
|
2177 |
379 |
while (s < send) { |
73
|
886 |
1291 |
const UV c = utf8n_to_uvchr(s, send - s, &ulen, UTF8_ALLOW_DEFAULT); |
74
|
2157 |
20 |
if (c < 0x100 && (ch = tbl[c]) >= 0) { |
|
48 |
2109 |
if (c < 0x100 && (ch = tbl[c]) >= 0) { |
85
|
0 |
379 |
if (grows) { |
94
|
3 |
376 |
SvSETMAGIC(sv); |
104
|
41991 |
987 |
const U8 *s = (const U8*)SvPV_nomg_const(sv, len); |
111
|
0 |
42978 |
if (!tbl) |
114
|
42887 |
91 |
if (!SvUTF8(sv)) { |
115
|
1137671 |
42887 |
while (s < send) { |
116
|
86384 |
1051287 |
if (tbl[*s++] >= 0) |
122
|
9092 |
91 |
while (s < send) { |
124
|
314 |
8778 |
const UV c = utf8n_to_uvchr(s, send - s, &ulen, UTF8_ALLOW_DEFAULT); |
125
|
8357 |
735 |
if (c < 0x100) { |
126
|
87 |
8270 |
if (tbl[c] >= 0) |
128
|
49 |
686 |
} else if (complement) |
142
|
278835 |
0 |
U8 *s = (U8*)SvPV_nomg(sv, len); |
149
|
0 |
278835 |
if (!tbl) |
152
|
278610 |
225 |
if (!SvUTF8(sv)) { |
156
|
3104 |
275506 |
if (PL_op->op_private & OPpTRANS_SQUASH) { |
158
|
37624 |
3104 |
while (s < send) { |
160
|
1269 |
36355 |
if (ch >= 0) { |
163
|
485 |
784 |
if (p != d - 1 || *p != *d) |
|
123 |
362 |
if (p != d - 1 || *p != *d) |
166
|
36355 |
0 |
else if (ch == -1) /* -1 is unmapped character */ |
168
|
0 |
0 |
else if (ch == -2) /* -2 is delete character */ |
174
|
21820834 |
275506 |
while (s < send) { |
176
|
50 |
21820784 |
if (ch >= 0) { |
180
|
21651531 |
169253 |
else if (ch == -1) /* -1 is unmapped character */ |
182
|
169253 |
0 |
else if (ch == -2) /* -2 is delete character */ |
198
|
0 |
225 |
if (grows) |
203
|
5 |
220 |
if (complement && !del) |
206
|
222 |
3 |
if (PL_op->op_private & OPpTRANS_SQUASH) { |
208
|
10 |
3 |
while (s < send) { |
210
|
10 |
0 |
const UV comp = utf8n_to_uvchr(s, send - s, &len, |
214
|
5 |
5 |
if (comp > 0xff) { |
215
|
4 |
1 |
if (!complement) { |
221
|
1 |
0 |
if (!del) { |
222
|
0 |
1 |
ch = (rlen == 0) ? (I32)comp : |
224
|
1 |
0 |
tbl[comp+1] : tbl[0x100+rlen]; |
225
|
1 |
0 |
if ((UV)ch != pch) { |
234
|
3 |
2 |
else if ((ch = tbl[comp]) >= 0) { |
236
|
2 |
1 |
if ((UV)ch != pch) { |
243
|
2 |
0 |
else if (ch == -1) { /* -1 is unmapped character */ |
247
|
0 |
0 |
else if (ch == -2) /* -2 is delete character */ |
254
|
2375 |
222 |
while (s < send) { |
256
|
663 |
1712 |
const UV comp = utf8n_to_uvchr(s, send - s, &len, |
259
|
178 |
2197 |
if (comp > 0xff) { |
260
|
171 |
7 |
if (!complement) { |
266
|
7 |
0 |
if (!del) { |
267
|
5 |
2 |
if (comp - 0x100 < rlen) |
274
|
0 |
2197 |
else if ((ch = tbl[comp]) >= 0) { |
278
|
2195 |
2 |
else if (ch == -1) { /* -1 is unmapped character */ |
282
|
2 |
0 |
else if (ch == -2) /* -2 is delete character */ |
287
|
0 |
225 |
if (grows) { |
297
|
109601 |
169234 |
SvSETMAGIC(sv); |
321
|
41 |
0 |
const UV none = svp ? SvUV(*svp) : 0x7fffffff; |
|
0 |
41 |
const UV none = svp ? SvUV(*svp) : 0x7fffffff; |
328
|
41 |
0 |
s = (U8*)SvPV_nomg(sv, len); |
329
|
4 |
37 |
if (!SvUTF8(sv)) { |
332
|
10 |
3 |
while (t < e) { |
335
|
1 |
9 |
if (hibit) { |
345
|
2 |
39 |
if (svp) |
346
|
0 |
2 |
final = SvUV(*svp); |
348
|
6 |
35 |
if (grows) { |
359
|
1502 |
41 |
while (s < send) { |
361
|
1433 |
69 |
if (uv < none) { |
366
|
66 |
3 |
else if (uv == none) { |
372
|
3 |
0 |
else if (uv == extra) { |
380
|
0 |
1502 |
if (d > dend) { |
383
|
0 |
0 |
if (!grows) |
390
|
7 |
34 |
if (grows || hibit) { |
393
|
0 |
7 |
if (grows && hibit) |
400
|
4 |
37 |
SvSETMAGIC(sv); |
423
|
5 |
0 |
const UV none = svp ? SvUV(*svp) : 0x7fffffff; |
|
0 |
5 |
const UV none = svp ? SvUV(*svp) : 0x7fffffff; |
429
|
5 |
0 |
s = (const U8*)SvPV_nomg_const(sv, len); |
430
|
0 |
5 |
if (!SvUTF8(sv)) { |
433
|
0 |
0 |
while (t < e) { |
436
|
0 |
0 |
if (hibit) { |
444
|
19 |
5 |
while (s < send) { |
446
|
6 |
13 |
if (uv < none || uv == extra) |
450
|
0 |
5 |
if (hibit) |
474
|
17 |
0 |
const UV none = svp ? SvUV(*svp) : 0x7fffffff; |
|
0 |
17 |
const UV none = svp ? SvUV(*svp) : 0x7fffffff; |
481
|
17 |
0 |
U8 *s = (U8*)SvPV_nomg(sv, len); |
485
|
2 |
15 |
if (!SvUTF8(sv)) { |
488
|
14 |
2 |
while (t < e) { |
491
|
0 |
14 |
if (hibit) { |
501
|
9 |
8 |
if (svp) { |
502
|
0 |
9 |
final = SvUV(*svp); |
506
|
4 |
13 |
if (grows) { |
517
|
10 |
7 |
if (squash) { |
519
|
35 |
7 |
while (s < send) { |
522
|
0 |
35 |
if (d > dend) { |
525
|
0 |
0 |
if (!grows) |
531
|
16 |
19 |
if (uv < none) { |
534
|
7 |
9 |
if (uv != puv) { |
540
|
13 |
6 |
else if (uv == none) { /* "none" is unmapped character */ |
548
|
6 |
0 |
else if (uv == extra && !del) { |
550
|
4 |
2 |
if (havefinal) { |
552
|
1 |
3 |
if (puv != final) { |
559
|
2 |
0 |
uv = utf8n_to_uvchr(s, send - s, &len, UTF8_ALLOW_DEFAULT); |
560
|
1 |
1 |
if (uv != puv) { |
574
|
39 |
10 |
while (s < send) { |
576
|
0 |
39 |
if (d > dend) { |
579
|
0 |
0 |
if (!grows) |
585
|
4 |
35 |
if (uv < none) { |
591
|
19 |
16 |
else if (uv == none) { /* "none" is unmapped character */ |
598
|
13 |
3 |
else if (uv == extra && !del) { |
608
|
4 |
13 |
if (grows || hibit) { |
611
|
0 |
4 |
if (grows && hibit) |
619
|
0 |
17 |
SvSETMAGIC(sv); |
634
|
7 |
448428 |
if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL)) { |
|
2 |
5 |
if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL)) { |
637
|
440941 |
7492 |
(void)SvPV_const(sv, len); |
638
|
442908 |
5525 |
if (!len) |
640
|
399925 |
42983 |
if (!(PL_op->op_private & OPpTRANS_IDENTICAL)) { |
641
|
111421 |
288504 |
if (!SvPOKp(sv) || SvTHINKFIRST(sv)) |
642
|
0 |
111421 |
(void)SvPV_force_nomg(sv, len); |
652
|
41 |
121032 |
if (hasutf) |
659
|
5 |
42978 |
if (hasutf) |
665
|
17 |
278835 |
if (hasutf) |
674
|
217230 |
3483799 |
{ |
683
|
3700929 |
100 |
(void) SvPV_const(delim, delimlen); /* stringify and get the delimlen */ |
687
|
2972357 |
728672 |
len = (items > 0 ? (delimlen * (items - 1) ) : 0); |
689
|
197480 |
3503549 |
if (SvLEN(sv) < len + items) { /* current length is way too short */ |
690
|
2071109 |
197480 |
while (items-- > 0) { |
691
|
2071109 |
0 |
if (*mark && !SvGAMAGIC(*mark) && SvOK(*mark)) { |
|
2070370 |
739 |
if (*mark && !SvGAMAGIC(*mark) && SvOK(*mark)) { |
|
1131 |
2069239 |
if (*mark && !SvGAMAGIC(*mark) && SvOK(*mark)) { |
|
1000 |
131 |
if (*mark && !SvGAMAGIC(*mark) && SvOK(*mark)) { |
|
180 |
820 |
if (*mark && !SvGAMAGIC(*mark) && SvOK(*mark)) { |
|
56 |
2069494 |
if (*mark && !SvGAMAGIC(*mark) && SvOK(*mark)) { |
|
56 |
0 |
if (*mark && !SvGAMAGIC(*mark) && SvOK(*mark)) { |
|
0 |
56 |
if (*mark && !SvGAMAGIC(*mark) && SvOK(*mark)) { |
693
|
888568 |
1180926 |
SvPV_const(*mark, tmplen); |
698
|
197230 |
250 |
SvGROW(sv, len + 1); /* so try to pre-extend */ |
|
197230 |
0 |
SvGROW(sv, len + 1); /* so try to pre-extend */ |
709
|
6506 |
3694523 |
if (TAINTING_get && SvMAGICAL(sv)) |
|
1 |
6505 |
if (TAINTING_get && SvMAGICAL(sv)) |
710
|
1 |
0 |
SvTAINTED_off(sv); |
712
|
2972357 |
728672 |
if (items-- > 0) { |
713
|
2972357 |
0 |
if (*mark) |
718
|
1878757 |
1822272 |
if (delimlen) { |
719
|
3060183 |
1822272 |
for (; items > 0; items--,mark++) { |
725
|
1751413 |
1878757 |
for (; items > 0; items--,mark++) |
728
|
2 |
3701027 |
SvSETMAGIC(sv); |
736
|
2485058 |
5 |
const char * const pat = SvPV_const(*sarg, patlen); |
741
|
1 |
2485062 |
if (SvTAINTED(*sarg)) |
|
0 |
1 |
if (SvTAINTED(*sarg)) |
742
|
0 |
0 |
TAINT_PROPER( |
|
0 |
0 |
TAINT_PROPER( |
|
0 |
0 |
TAINT_PROPER( |
|
0 |
0 |
TAINT_PROPER( |
750
|
28 |
2485035 |
if (DO_UTF8(*sarg)) |
|
28 |
0 |
if (DO_UTF8(*sarg)) |
753
|
1 |
2485046 |
SvSETMAGIC(sv); |
754
|
0 |
2485047 |
if (do_taint) |
755
|
0 |
0 |
SvTAINTED_on(sv); |
764
|
2818700 |
19 |
const unsigned char *s = (const unsigned char *) SvPV_flags_const(sv, srclen, |
|
5 |
14 |
const unsigned char *s = (const unsigned char *) SvPV_flags_const(sv, srclen, |
|
0 |
5 |
const unsigned char *s = (const unsigned char *) SvPV_flags_const(sv, srclen, |
|
0 |
0 |
const unsigned char *s = (const unsigned char *) SvPV_flags_const(sv, srclen, |
769
|
8 |
2818711 |
if (!s) { |
775
|
2818718 |
1 |
if (offset < 0) |
777
|
2818714 |
4 |
if (size < 1 || (size & (size-1))) /* size < 1 or not a power of two */ |
|
1 |
2818713 |
if (size < 1 || (size & (size-1))) /* size < 1 or not a power of two */ |
780
|
4 |
2818709 |
if (SvUTF8(sv)) |
783
|
2818685 |
28 |
if (size < 8) { |
787
|
16 |
12 |
else if (size > 8) |
793
|
249111 |
2569602 |
if (len > srclen) { |
794
|
4 |
249107 |
if (size <= 8) |
797
|
0 |
4 |
if (size == 16) { |
798
|
0 |
0 |
if (uoffset >= srclen) |
803
|
1 |
3 |
else if (size == 32) { |
804
|
0 |
1 |
if (uoffset >= srclen) |
806
|
0 |
0 |
else if (uoffset + 1 >= srclen) |
809
|
0 |
0 |
else if (uoffset + 2 >= srclen) |
820
|
3 |
0 |
else if (size == 64) { |
823
|
0 |
3 |
if (uoffset >= srclen) |
825
|
0 |
0 |
else if (uoffset + 1 >= srclen) |
828
|
0 |
0 |
else if (uoffset + 2 >= srclen) |
832
|
0 |
0 |
else if (uoffset + 3 >= srclen) |
837
|
0 |
0 |
else if (uoffset + 4 >= srclen) |
843
|
0 |
0 |
else if (uoffset + 5 >= srclen) |
850
|
0 |
0 |
else if (uoffset + 6 >= srclen) |
871
|
2569579 |
23 |
else if (size < 8) |
874
|
11 |
12 |
if (size == 8) |
876
|
2 |
10 |
else if (size == 16) |
880
|
3 |
7 |
else if (size == 32) |
887
|
7 |
0 |
else if (size == 64) { |
925
|
2553389 |
0 |
if (!targ) |
927
|
2003696 |
549693 |
s = (unsigned char*)SvPV_force_flags(targ, targlen, |
929
|
1 |
2553387 |
if (SvUTF8(targ)) { |
938
|
0 |
2553388 |
lval = SvUV(sv); |
940
|
1 |
2553387 |
if (offset < 0) |
943
|
2553387 |
0 |
if (size < 1 || (size & (size-1))) /* size < 1 or not a power of two */ |
|
0 |
2553387 |
if (size < 1 || (size & (size-1))) /* size < 1 or not a power of two */ |
946
|
2553382 |
5 |
if (size < 8) { |
950
|
3 |
2 |
else if (size > 8) |
954
|
249093 |
2304294 |
if (len > targlen) { |
955
|
249093 |
0 |
s = (unsigned char*)SvGROW(targ, len + 1); |
|
7710 |
241383 |
s = (unsigned char*)SvGROW(targ, len + 1); |
960
|
2553382 |
5 |
if (size < 8) { |
967
|
2 |
3 |
if (size == 8) |
969
|
0 |
3 |
else if (size == 16) { |
973
|
2 |
1 |
else if (size == 32) { |
980
|
1 |
0 |
else if (size == 64) { |
994
|
9 |
2553378 |
SvSETMAGIC(targ); |
1021
|
151871 |
366090 |
if (sv != left || (optype != OP_BIT_AND && !SvOK(sv))) |
|
69714 |
82157 |
if (sv != left || (optype != OP_BIT_AND && !SvOK(sv))) |
|
6451 |
63263 |
if (sv != left || (optype != OP_BIT_AND && !SvOK(sv))) |
|
6451 |
0 |
if (sv != left || (optype != OP_BIT_AND && !SvOK(sv))) |
|
6451 |
0 |
if (sv != left || (optype != OP_BIT_AND && !SvOK(sv))) |
1023
|
151871 |
366090 |
if (sv == left) { |
1024
|
141290 |
10581 |
lsave = lc = SvPV_force_nomg(left, leftlen); |
1027
|
365941 |
149 |
lsave = lc = SvPV_nomg_const(left, leftlen); |
1028
|
0 |
366090 |
SvPV_force_nomg_nolen(sv); |
1030
|
517828 |
133 |
rsave = rc = SvPV_nomg_const(right, rightlen); |
1035
|
4436 |
513525 |
left_utf = DO_UTF8(left); |
|
0 |
4436 |
left_utf = DO_UTF8(left); |
1036
|
4435 |
513526 |
right_utf = DO_UTF8(right); |
|
0 |
4435 |
right_utf = DO_UTF8(right); |
1038
|
4436 |
513525 |
if (left_utf && !right_utf) { |
|
69 |
4367 |
if (left_utf && !right_utf) { |
1044
|
69 |
0 |
rsave = rc = SvPV_nomg_const(right, rightlen); |
1047
|
513525 |
4367 |
else if (!left_utf && right_utf) { |
|
68 |
513457 |
else if (!left_utf && right_utf) { |
1050
|
68 |
0 |
lsave = lc = SvPV_nomg_const(left, leftlen); |
1058
|
513457 |
4504 |
if ((left_utf || right_utf) && (sv == left || sv == right)) { |
|
0 |
513457 |
if ((left_utf || right_utf) && (sv == left || sv == right)) { |
|
36 |
4468 |
if ((left_utf || right_utf) && (sv == left || sv == right)) { |
1059
|
24 |
12 |
needlen = optype == OP_BIT_AND ? len : leftlen + rightlen; |
1062
|
0 |
517925 |
else if (SvOK(sv) || SvTYPE(sv) > SVt_PVMG) { |
|
0 |
0 |
else if (SvOK(sv) || SvTYPE(sv) > SVt_PVMG) { |
|
0 |
0 |
else if (SvOK(sv) || SvTYPE(sv) > SVt_PVMG) { |
|
0 |
0 |
else if (SvOK(sv) || SvTYPE(sv) > SVt_PVMG) { |
1063
|
517912 |
13 |
dc = SvPV_force_nomg_nolen(sv); |
1064
|
295 |
517630 |
if (SvLEN(sv) < len + 1) { |
1065
|
295 |
0 |
dc = SvGROW(sv, len + 1); |
|
295 |
0 |
dc = SvGROW(sv, len + 1); |
1068
|
349989 |
167936 |
if (optype != OP_BIT_AND && (left_utf || right_utf)) |
|
347736 |
2253 |
if (optype != OP_BIT_AND && (left_utf || right_utf)) |
|
0 |
347736 |
if (optype != OP_BIT_AND && (left_utf || right_utf)) |
1069
|
2253 |
0 |
dc = SvGROW(sv, leftlen + rightlen + 1); |
|
6 |
2247 |
dc = SvGROW(sv, leftlen + rightlen + 1); |
1073
|
0 |
0 |
? len : (leftlen > rightlen ? leftlen : rightlen); |
1078
|
513457 |
4504 |
if (left_utf || right_utf) { |
|
0 |
513457 |
if (left_utf || right_utf) { |
1088
|
3241 |
2227 |
while (lulen && rulen) { |
1098
|
12 |
2215 |
if (sv == left || sv == right) |
1103
|
1066 |
51 |
while (lulen && rulen) { |
1115
|
3241 |
2226 |
while (lulen && rulen) { |
1126
|
41 |
2236 |
if (rulen) |
1128
|
41 |
2195 |
else if (lulen) |
1130
|
24 |
2253 |
if (sv == left || sv == right) |
1133
|
41 |
2236 |
if (rulen) |
1135
|
41 |
2195 |
else if (lulen) |
1142
|
0 |
0 |
if (sv == left || sv == right) |
1152
|
10 |
513447 |
if (len >= sizeof(long)*4 && |
|
10 |
0 |
if (len >= sizeof(long)*4 && |
1153
|
10 |
0 |
!((unsigned long)dc % sizeof(long)) && |
1154
|
10 |
0 |
!((unsigned long)lc % sizeof(long)) && |
1166
|
4 |
3 |
while (len--) { |
1174
|
3 |
2 |
while (len--) { |
1182
|
6 |
5 |
while (len--) { |
1200
|
2491943 |
165721 |
while (len--) |
1205
|
161 |
110 |
while (len--) |
1209
|
3971421 |
347626 |
while (len--) |
1213
|
8997 |
338739 |
if (rightlen > len) |
1215
|
90073 |
248666 |
else if (leftlen > (STRLEN)len) |
1223
|
6651 |
511310 |
SvTAINT(sv); |
|
0 |
6651 |
SvTAINT(sv); |
|
0 |
0 |
SvTAINT(sv); |
1228
|
2389 |
3728482 |
{ |
1233
|
3999475 |
130656 |
const I32 gimme = GIMME_V; |
1236
|
3778262 |
351869 |
const I32 dokeys = dokv || (PL_op->op_type == OP_KEYS || PL_op->op_type == OP_RKEYS); |
|
48794 |
3729468 |
const I32 dokeys = dokv || (PL_op->op_type == OP_KEYS || PL_op->op_type == OP_RKEYS); |
1237
|
3778262 |
351869 |
const I32 dovalues = dokv || (PL_op->op_type == OP_VALUES || PL_op->op_type == OP_RVALUES); |
|
3729468 |
48794 |
const I32 dovalues = dokv || (PL_op->op_type == OP_VALUES || PL_op->op_type == OP_RVALUES); |
1241
|
608 |
4129523 |
if (gimme == G_VOID) |
1244
|
398652 |
3730871 |
if (gimme == G_SCALAR) { |
1245
|
398560 |
92 |
if (PL_op->op_flags & OPf_MOD || LVRET) { /* lvalue */ |
|
1 |
398559 |
if (PL_op->op_flags & OPf_MOD || LVRET) { /* lvalue */ |
|
1 |
0 |
if (PL_op->op_flags & OPf_MOD || LVRET) { /* lvalue */ |
1256
|
34 |
398525 |
if (! SvTIED_mg((const SV *)keys, PERL_MAGIC_tied) ) { |
|
22 |
12 |
if (! SvTIED_mg((const SV *)keys, PERL_MAGIC_tied) ) { |
1257
|
68 |
398469 |
i = HvUSEDKEYS(keys); |
1261
|
1296 |
22 |
while (hv_iternext(keys)) i++; |
1263
|
0 |
398559 |
PUSHi( i ); |
1268
|
56961 |
3673910 |
EXTEND(SP, HvUSEDKEYS(keys) * (dokeys + dovalues)); |
|
0 |
2389 |
EXTEND(SP, HvUSEDKEYS(keys) * (dokeys + dovalues)); |
1271
|
29322225 |
3730870 |
while ((entry = hv_iternext(keys))) { |
1273
|
27666680 |
1655545 |
if (dokeys) { |
1275
|
2298 |
27664382 |
XPUSHs(sv); /* won't clobber stack_sp */ |
1277
|
3842714 |
25479511 |
if (dovalues) { |
1286
|
2585 |
3840129 |
XPUSHs(tmpstr); |