… | |
… | |
137 | |
137 | |
138 | #define IN_DESTRUCT PL_dirty |
138 | #define IN_DESTRUCT PL_dirty |
139 | |
139 | |
140 | #if __GNUC__ >= 3 |
140 | #if __GNUC__ >= 3 |
141 | # define attribute(x) __attribute__(x) |
141 | # define attribute(x) __attribute__(x) |
142 | # define expect(expr,value) __builtin_expect ((expr),(value)) |
142 | # define expect(expr,value) __builtin_expect ((expr), (value)) |
143 | # define INLINE static inline |
143 | # define INLINE static inline |
144 | #else |
144 | #else |
145 | # define attribute(x) |
145 | # define attribute(x) |
146 | # define expect(expr,value) (expr) |
146 | # define expect(expr,value) (expr) |
147 | # define INLINE static |
147 | # define INLINE static |
… | |
… | |
615 | { |
615 | { |
616 | while (expect_true (cxix >= 0)) |
616 | while (expect_true (cxix >= 0)) |
617 | { |
617 | { |
618 | PERL_CONTEXT *cx = &ccstk[cxix--]; |
618 | PERL_CONTEXT *cx = &ccstk[cxix--]; |
619 | |
619 | |
620 | if (expect_true (CxTYPE (cx) == CXt_SUB || CxTYPE (cx) == CXt_FORMAT)) |
620 | if (expect_true (CxTYPE (cx) == CXt_SUB) || expect_false (CxTYPE (cx) == CXt_FORMAT)) |
621 | { |
621 | { |
622 | CV *cv = cx->blk_sub.cv; |
622 | CV *cv = cx->blk_sub.cv; |
623 | |
623 | |
624 | if (expect_true (CvDEPTH (cv))) |
624 | if (expect_true (CvDEPTH (cv))) |
625 | { |
625 | { |
… | |
… | |
2477 | /* Coro::Semaphore & Coro::Signal */ |
2477 | /* Coro::Semaphore & Coro::Signal */ |
2478 | |
2478 | |
2479 | static SV * |
2479 | static SV * |
2480 | coro_waitarray_new (pTHX_ int count) |
2480 | coro_waitarray_new (pTHX_ int count) |
2481 | { |
2481 | { |
2482 | /* a semaphore contains a counter IV in $sem->[0] and any waiters after that */ |
2482 | /* a waitarray=semaphore contains a counter IV in $sem->[0] and any waiters after that */ |
2483 | AV *av = newAV (); |
2483 | AV *av = newAV (); |
2484 | SV **ary; |
2484 | SV **ary; |
2485 | |
2485 | |
2486 | /* unfortunately, building manually saves memory */ |
2486 | /* unfortunately, building manually saves memory */ |
2487 | Newx (ary, 2, SV *); |
2487 | Newx (ary, 2, SV *); |