| line |
true |
false |
branch |
|
125
|
12 |
191 |
if (callback->type == XSPR_CALLBACK_CHAIN) { |
|
128
|
182 |
9 |
} else if (callback->type == XSPR_CALLBACK_PERL) { |
|
131
|
157 |
25 |
if (origin->finished.result->state == XSPR_RESULT_RESOLVED) { |
|
133
|
25 |
0 |
} else if (origin->finished.result->state == XSPR_RESULT_REJECTED) { |
|
140
|
178 |
4 |
if (callback_fn != NULL) { |
|
147
|
120 |
58 |
if (callback->perl.next != NULL) { |
|
150
|
118 |
2 |
if (result->count == 1 && result->state == XSPR_RESULT_RESOLVED) { |
|
|
109 |
9 |
if (result->count == 1 && result->state == XSPR_RESULT_RESOLVED) { |
|
152
|
13 |
96 |
if (promise != NULL && promise == callback->perl.next) { |
|
|
1 |
12 |
if (promise != NULL && promise == callback->perl.next) { |
|
162
|
12 |
96 |
} else if (promise != NULL) { |
|
172
|
107 |
13 |
if (!skip_passthrough) { |
|
179
|
4 |
0 |
} else if (callback->perl.next) { |
|
185
|
9 |
0 |
} else if (callback->type == XSPR_CALLBACK_FINALLY) { |
|
187
|
9 |
0 |
if (callback_fn != NULL) { |
|
196
|
8 |
1 |
if (callback->finally.next != NULL) { |
|
208
|
12 |
192 |
if (callback->type == XSPR_CALLBACK_CHAIN) { |
|
211
|
183 |
9 |
} else if (callback->type == XSPR_CALLBACK_PERL) { |
|
214
|
124 |
59 |
if (callback->perl.next != NULL) |
|
217
|
9 |
0 |
} else if (callback->type == XSPR_CALLBACK_FINALLY) { |
|
219
|
8 |
1 |
if (callback->finally.next != NULL) |
|
234
|
0 |
5 |
if (MY_CXT.in_flush) { |
|
241
|
203 |
5 |
while (MY_CXT.queue_head != NULL) { |
|
252
|
5 |
198 |
if (cur->next == NULL) { |
|
278
|
5 |
198 |
if (MY_CXT.queue_head == NULL) { |
|
295
|
251 |
3 |
if (MY_CXT.queue_head == NULL || MY_CXT.backend_scheduled || MY_CXT.in_flush) { |
|
|
5 |
246 |
if (MY_CXT.queue_head == NULL || MY_CXT.backend_scheduled || MY_CXT.in_flush) { |
|
|
0 |
5 |
if (MY_CXT.queue_head == NULL || MY_CXT.backend_scheduled || MY_CXT.in_flush) { |
|
302
|
0 |
5 |
PUSHMARK(SP); |
|
314
|
3 |
189 |
if (!SvROK(perl_fn)) { |
|
321
|
0 |
189 |
PUSHMARK(SP); |
|
322
|
189 |
0 |
EXTEND(SP, input_count); |
|
|
0 |
189 |
EXTEND(SP, input_count); |
|
323
|
206 |
189 |
for (i = 0; i < input_count; i++) { |
|
335
|
189 |
0 |
error = ERRSV; |
|
336
|
189 |
0 |
if (SvTRUE(error)) { |
|
|
0 |
189 |
if (SvTRUE(error)) { |
|
|
0 |
0 |
if (SvTRUE(error)) { |
|
|
0 |
189 |
if (SvTRUE(error)) { |
|
|
0 |
0 |
if (SvTRUE(error)) { |
|
|
0 |
0 |
if (SvTRUE(error)) { |
|
|
187 |
2 |
if (SvTRUE(error)) { |
|
|
187 |
0 |
if (SvTRUE(error)) { |
|
|
181 |
6 |
if (SvTRUE(error)) { |
|
|
0 |
181 |
if (SvTRUE(error)) { |
|
|
0 |
0 |
if (SvTRUE(error)) { |
|
|
6 |
181 |
if (SvTRUE(error)) { |
|
|
0 |
2 |
if (SvTRUE(error)) { |
|
|
0 |
0 |
if (SvTRUE(error)) { |
|
|
0 |
0 |
if (SvTRUE(error)) { |
|
|
0 |
0 |
if (SvTRUE(error)) { |
|
|
0 |
0 |
if (SvTRUE(error)) { |
|
|
0 |
0 |
if (SvTRUE(error)) { |
|
|
2 |
0 |
if (SvTRUE(error)) { |
|
341
|
174 |
181 |
for (i = 0; i < count; i++) { |
|
347
|
189 |
0 |
FREETMPS; |
|
362
|
255 |
194 |
if (--(result->refs) == 0) { |
|
364
|
269 |
255 |
for (i = 0; i < result->count; i++) { |
|
384
|
148 |
194 |
for (i = 0; i < count; i++) { |
|
395
|
0 |
255 |
Newxz(result->result, count, SV*); |
|
418
|
195 |
425 |
if (--(promise->refs) == 0) { |
|
419
|
1 |
194 |
if (promise->state == XSPR_STATE_PENDING) { |
|
424
|
1 |
1 |
for (i = 0; i < count; i++) { |
|
429
|
194 |
0 |
} else if (promise->state == XSPR_STATE_FINISHED) { |
|
455
|
11 |
172 |
if (SvOK(on_resolve)) |
|
|
11 |
0 |
if (SvOK(on_resolve)) |
|
|
0 |
11 |
if (SvOK(on_resolve)) |
|
457
|
52 |
131 |
if (SvOK(on_reject)) |
|
|
52 |
0 |
if (SvOK(on_reject)) |
|
|
0 |
52 |
if (SvOK(on_reject)) |
|
460
|
124 |
59 |
if (next) |
|
470
|
0 |
9 |
if (SvOK(on_finally)) |
|
|
0 |
0 |
if (SvOK(on_finally)) |
|
|
0 |
0 |
if (SvOK(on_finally)) |
|
473
|
8 |
1 |
if (next) |
|
491
|
149 |
55 |
if (promise->state == XSPR_STATE_PENDING) { |
|
493
|
0 |
149 |
Renew(promise->pending.callbacks, promise->pending.callbacks_count, xspr_callback_t*); |
|
496
|
55 |
0 |
} else if (promise->state == XSPR_STATE_FINISHED) { |
|
507
|
109 |
0 |
if (input == NULL || !sv_isobject(input)) { |
|
|
96 |
13 |
if (input == NULL || !sv_isobject(input)) { |
|
512
|
8 |
5 |
if (sv_derived_from(input, "AnyEvent::XSPromises::PromisePtr")) { |
|
513
|
8 |
0 |
IV tmp = SvIV((SV*)SvRV(input)); |
|
521
|
5 |
0 |
if (method_gv != NULL && isGV(method_gv) && GvCV(method_gv) != NULL) { |
|
|
5 |
0 |
if (method_gv != NULL && isGV(method_gv) && GvCV(method_gv) != NULL) { |
|
|
5 |
0 |
if (method_gv != NULL && isGV(method_gv) && GvCV(method_gv) != NULL) { |
|
525
|
5 |
0 |
if (new_result->state == XSPR_RESULT_RESOLVED && |
|
|
5 |
0 |
if (new_result->state == XSPR_RESULT_RESOLVED && |
|
526
|
5 |
0 |
new_result->count == 1 && |
|
527
|
5 |
0 |
new_result->result[0] != NULL && |
|
528
|
5 |
0 |
SvROK(new_result->result[0]) && |
|
531
|
5 |
0 |
IV tmp = SvIV((SV*)SvRV(new_result->result[0])); |
|
595
|
0 |
2 |
if (MY_CXT.conversion_helper != NULL) |
|
604
|
0 |
2 |
if (MY_CXT.backend_fn != NULL) |
|
625
|
4 |
49 |
if (self->promise->state != XSPR_STATE_PENDING) { |
|
631
|
75 |
49 |
for (i = 0; i < items-1; i++) { |
|
642
|
2 |
13 |
if (self->promise->state != XSPR_STATE_PENDING) { |
|
648
|
8 |
13 |
for (i = 0; i < items-1; i++) { |
|
681
|
0 |
172 |
if (items > 3) { |
|
685
|
172 |
0 |
on_resolve = (items > 1) ? ST(1) : &PL_sv_undef; |
|
686
|
120 |
52 |
on_reject = (items > 2) ? ST(2) : &PL_sv_undef; |
|
689
|
143 |
29 |
if (GIMME_V != G_VOID) { |
|
|
113 |
59 |
if (GIMME_V != G_VOID) { |
|
714
|
8 |
3 |
if (GIMME_V != G_VOID) { |
|
|
11 |
0 |
if (GIMME_V != G_VOID) { |
|
739
|
6 |
3 |
if (GIMME_V != G_VOID) { |
|
|
8 |
1 |
if (GIMME_V != G_VOID) { |