| line |
true |
false |
branch |
|
125
|
12 |
181 |
if (callback->type == XSPR_CALLBACK_CHAIN) { |
|
128
|
172 |
9 |
} else if (callback->type == XSPR_CALLBACK_PERL) { |
|
131
|
148 |
24 |
if (origin->finished.result->state == XSPR_RESULT_RESOLVED) { |
|
133
|
24 |
0 |
} else if (origin->finished.result->state == XSPR_RESULT_REJECTED) { |
|
140
|
168 |
4 |
if (callback_fn != NULL) { |
|
147
|
113 |
55 |
if (callback->perl.next != NULL) { |
|
150
|
111 |
2 |
if (result->count == 1 && result->state == XSPR_RESULT_RESOLVED) { |
|
|
102 |
9 |
if (result->count == 1 && result->state == XSPR_RESULT_RESOLVED) { |
|
152
|
13 |
89 |
if (promise != NULL && promise == callback->perl.next) { |
|
|
1 |
12 |
if (promise != NULL && promise == callback->perl.next) { |
|
162
|
12 |
89 |
} else if (promise != NULL) { |
|
172
|
100 |
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 |
182 |
if (callback->type == XSPR_CALLBACK_CHAIN) { |
|
211
|
173 |
9 |
} else if (callback->type == XSPR_CALLBACK_PERL) { |
|
214
|
117 |
56 |
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
|
193 |
5 |
while (MY_CXT.queue_head != NULL) { |
|
252
|
5 |
188 |
if (cur->next == NULL) { |
|
278
|
5 |
188 |
if (MY_CXT.queue_head == NULL) { |
|
295
|
234 |
7 |
if (MY_CXT.queue_head == NULL || MY_CXT.backend_scheduled || MY_CXT.in_flush) { |
|
|
5 |
229 |
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 |
179 |
if (!SvROK(perl_fn)) { |
|
321
|
0 |
179 |
PUSHMARK(SP); |
|
322
|
179 |
0 |
EXTEND(SP, input_count); |
|
|
0 |
179 |
EXTEND(SP, input_count); |
|
323
|
194 |
179 |
for (i = 0; i < input_count; i++) { |
|
335
|
179 |
0 |
error = ERRSV; |
|
336
|
179 |
0 |
if (SvTRUE(error)) { |
|
|
0 |
179 |
if (SvTRUE(error)) { |
|
|
0 |
0 |
if (SvTRUE(error)) { |
|
|
0 |
179 |
if (SvTRUE(error)) { |
|
|
0 |
0 |
if (SvTRUE(error)) { |
|
|
0 |
0 |
if (SvTRUE(error)) { |
|
|
177 |
2 |
if (SvTRUE(error)) { |
|
|
177 |
0 |
if (SvTRUE(error)) { |
|
|
171 |
6 |
if (SvTRUE(error)) { |
|
|
0 |
171 |
if (SvTRUE(error)) { |
|
|
0 |
0 |
if (SvTRUE(error)) { |
|
|
6 |
171 |
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
|
164 |
171 |
for (i = 0; i < count; i++) { |
|
347
|
179 |
0 |
FREETMPS; |
|
362
|
242 |
184 |
if (--(result->refs) == 0) { |
|
364
|
254 |
242 |
for (i = 0; i < result->count; i++) { |
|
384
|
141 |
184 |
for (i = 0; i < count; i++) { |
|
395
|
0 |
242 |
Newxz(result->result, count, SV*); |
|
418
|
185 |
405 |
if (--(promise->refs) == 0) { |
|
419
|
1 |
184 |
if (promise->state == XSPR_STATE_PENDING) { |
|
424
|
1 |
1 |
for (i = 0; i < count; i++) { |
|
429
|
184 |
0 |
} else if (promise->state == XSPR_STATE_FINISHED) { |
|
455
|
11 |
162 |
if (SvOK(on_resolve)) |
|
|
11 |
0 |
if (SvOK(on_resolve)) |
|
|
0 |
11 |
if (SvOK(on_resolve)) |
|
457
|
49 |
124 |
if (SvOK(on_reject)) |
|
|
49 |
0 |
if (SvOK(on_reject)) |
|
|
0 |
49 |
if (SvOK(on_reject)) |
|
460
|
117 |
56 |
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
|
142 |
52 |
if (promise->state == XSPR_STATE_PENDING) { |
|
493
|
0 |
142 |
Renew(promise->pending.callbacks, promise->pending.callbacks_count, xspr_callback_t*); |
|
496
|
52 |
0 |
} else if (promise->state == XSPR_STATE_FINISHED) { |
|
507
|
102 |
0 |
if (input == NULL || !sv_isobject(input)) { |
|
|
89 |
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 |
47 |
if (self->promise->state != XSPR_STATE_PENDING) { |
|
631
|
71 |
47 |
for (i = 0; i < items-1; i++) { |
|
642
|
2 |
12 |
if (self->promise->state != XSPR_STATE_PENDING) { |
|
648
|
7 |
12 |
for (i = 0; i < items-1; i++) { |
|
681
|
0 |
162 |
if (items > 3) { |
|
685
|
162 |
0 |
on_resolve = (items > 1) ? ST(1) : &PL_sv_undef; |
|
686
|
113 |
49 |
on_reject = (items > 2) ? ST(2) : &PL_sv_undef; |
|
689
|
136 |
26 |
if (GIMME_V != G_VOID) { |
|
|
106 |
56 |
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) { |