ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro/State.xs
(Generate patch)

Comparing Coro/Coro/State.xs (file contents):
Revision 1.318 by root, Thu Nov 20 07:02:43 2008 UTC vs.
Revision 1.320 by root, Fri Nov 21 07:29:04 2008 UTC

901 slf_frame.prepare = prepare_nop; /* provide a nop function for an eventual pp_slf */ 901 slf_frame.prepare = prepare_nop; /* provide a nop function for an eventual pp_slf */
902 slf_frame.check = slf_check_nop; /* signal pp_slf to not repeat */ 902 slf_frame.check = slf_check_nop; /* signal pp_slf to not repeat */
903 903
904 /* and we have to provide the pp_slf op in any case, so pp_slf can skip it */ 904 /* and we have to provide the pp_slf op in any case, so pp_slf can skip it */
905 coro_setup_op.op_next = PL_op; 905 coro_setup_op.op_next = PL_op;
906 coro_setup_op.op_type = OP_CUSTOM; 906 coro_setup_op.op_type = OP_ENTERSUB;
907 coro_setup_op.op_ppaddr = pp_slf; 907 coro_setup_op.op_ppaddr = pp_slf;
908 /* no flags etc. required, as an init function won't be called */ 908 /* no flags etc. required, as an init function won't be called */
909 909
910 PL_op = (OP *)&coro_setup_op; 910 PL_op = (OP *)&coro_setup_op;
911 911
1026 { 1026 {
1027 PERL_CONTEXT *cx = &cxstack[cxstack_ix]; 1027 PERL_CONTEXT *cx = &cxstack[cxstack_ix];
1028 1028
1029 if (CxTYPE (cx) == CXt_SUB && oldcxix < cxstack_ix) 1029 if (CxTYPE (cx) == CXt_SUB && oldcxix < cxstack_ix)
1030 { 1030 {
1031 runops_proc_t old_runops = PL_runops;
1032 dSP; 1031 dSP;
1033 GV *gv = CvGV (cx->blk_sub.cv); 1032 GV *gv = CvGV (cx->blk_sub.cv);
1034 SV *fullname = sv_2mortal (newSV (0)); 1033 SV *fullname = sv_2mortal (newSV (0));
1035 1034
1036 if (isGV (gv)) 1035 if (isGV (gv))
1657 else 1656 else
1658 { 1657 {
1659 next->flags &= ~CF_READY; 1658 next->flags &= ~CF_READY;
1660 --coro_nready; 1659 --coro_nready;
1661 1660
1662 return prepare_schedule_to (aTHX_ ta, next); 1661 prepare_schedule_to (aTHX_ ta, next);
1662 break;
1663 } 1663 }
1664 } 1664 }
1665 else 1665 else
1666 { 1666 {
1667 /* nothing to schedule: call the idle handler */ 1667 /* nothing to schedule: call the idle handler */
2250 } 2250 }
2251 else 2251 else
2252 slf_argc = 0; 2252 slf_argc = 0;
2253 2253
2254 PL_op->op_ppaddr = pp_slf; 2254 PL_op->op_ppaddr = pp_slf;
2255 PL_op->op_type = OP_CUSTOM; /* maybe we should leave it at entersub? */ 2255 /*PL_op->op_type = OP_CUSTOM; /* we do behave like entersub still */
2256 2256
2257 PL_op = (OP *)&slf_restore; 2257 PL_op = (OP *)&slf_restore;
2258} 2258}
2259 2259
2260/*****************************************************************************/ 2260/*****************************************************************************/
2765 2765
2766 { 2766 {
2767 SV *slf = sv_2mortal (newSViv (PTR2IV (pp_slf))); 2767 SV *slf = sv_2mortal (newSViv (PTR2IV (pp_slf)));
2768 2768
2769 if (!PL_custom_op_names) PL_custom_op_names = newHV (); 2769 if (!PL_custom_op_names) PL_custom_op_names = newHV ();
2770 hv_store_ent (PL_custom_op_names, slf, 2770 hv_store_ent (PL_custom_op_names, slf, newSVpv ("coro_slf", 0), 0);
2771 newSVpv ("coro_slf", 0), 0);
2772 2771
2773 if (!PL_custom_op_descs) PL_custom_op_descs = newHV (); 2772 if (!PL_custom_op_descs) PL_custom_op_descs = newHV ();
2774 hv_store_ent (PL_custom_op_descs, slf, 2773 hv_store_ent (PL_custom_op_descs, slf, newSVpv ("coro schedule like function", 0), 0);
2775 newSVpv ("coro schedule like function", 0), 0);
2776 } 2774 }
2777 2775
2778 coroapi.ver = CORO_API_VERSION; 2776 coroapi.ver = CORO_API_VERSION;
2779 coroapi.rev = CORO_API_REVISION; 2777 coroapi.rev = CORO_API_REVISION;
2780 2778

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines