2014-07-13 05:30:14 +01:00
|
|
|
#define CUT_INSTINIT
|
|
|
|
|
|
|
|
#ifdef COROUTINING
|
|
|
|
#define CUT_COROUTINING \
|
|
|
|
if (FALSE) { \
|
|
|
|
NoStackCut_Exception; \
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define CUT_NOCOROUTINING \
|
2015-01-07 10:22:52 +00:00
|
|
|
SET_ASP(YREG, (*_PREG)->y_u.s.s); \
|
2014-07-13 05:30:14 +01:00
|
|
|
(*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), s),Osbpp),l); \
|
|
|
|
saveregs(); \
|
|
|
|
prune((choiceptr)YREG[E_CB]); \
|
|
|
|
setregs(); \
|
|
|
|
GONext();
|
|
|
|
|
|
|
|
#define CUT_T_INSTINIT
|
|
|
|
|
|
|
|
#ifdef COROUTINING
|
|
|
|
#define CUT_T_COROUTINING \
|
|
|
|
if (FALSE) { \
|
|
|
|
NoStackCutT_Exception; \
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define CUT_T_NOCOROUTINING \
|
2015-01-07 10:22:52 +00:00
|
|
|
SET_ASP(YREG, (*_PREG)->y_u.s.s); \
|
2014-07-13 05:30:14 +01:00
|
|
|
saveregs(); \
|
|
|
|
prune((choiceptr)YREG[E_CB]); \
|
|
|
|
setregs(); \
|
|
|
|
(*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), s),Osbpp),l); \
|
|
|
|
GONext();
|
|
|
|
|
|
|
|
#define CUT_E_INSTINIT
|
|
|
|
|
|
|
|
#ifdef COROUTINING
|
|
|
|
#define CUT_E_COROUTINING \
|
|
|
|
if (FALSE) { \
|
|
|
|
NoStackCutE_Exception; \
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define CUT_E_NOCOROUTINING \
|
2015-01-07 10:22:52 +00:00
|
|
|
SET_ASP(YREG, (*_PREG)->y_u.s.s); \
|
2014-07-13 05:30:14 +01:00
|
|
|
(*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), s),Osbpp),l); \
|
|
|
|
saveregs(); \
|
|
|
|
prune((choiceptr)(*_SREG)[E_CB]); \
|
|
|
|
setregs(); \
|
|
|
|
GONext();
|
|
|
|
|
|
|
|
#define SAVE_B_X_INSTINIT \
|
|
|
|
register CELL d0; \
|
2015-01-07 10:22:52 +00:00
|
|
|
d0 = (*_PREG)->y_u.x.x;
|
2014-07-13 05:30:14 +01:00
|
|
|
|
|
|
|
#if defined(YAPOR_SBA) && defined(FROZEN_STACKS)
|
|
|
|
#define SAVE_B_X_YSBA_FROZEN \
|
|
|
|
XREG(d0) = MkIntegerTerm((Int)B);
|
|
|
|
#else
|
|
|
|
#define SAVE_B_X_NOYSBA_NOFROZEN \
|
|
|
|
XREG(d0) = MkIntegerTerm(LCL0-(CELL *) (B));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define SAVE_B_X_END \
|
|
|
|
(*_PREG) = NEXTOP((*_PREG), x); \
|
|
|
|
GONext();
|
|
|
|
|
|
|
|
#define SAVE_B_Y_INSTINIT
|
|
|
|
|
|
|
|
#if defined(YAPOR_SBA)
|
|
|
|
#define SAVE_B_Y_YSBA \
|
2015-01-07 10:22:52 +00:00
|
|
|
INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.y.y,MkIntegerTerm((Int)B));
|
2014-07-13 05:30:14 +01:00
|
|
|
#else
|
|
|
|
#define SAVE_B_Y_NOYSBA \
|
2015-01-07 10:22:52 +00:00
|
|
|
INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.y.y,MkIntegerTerm(LCL0-(CELL *)(B)));
|
2014-07-13 05:30:14 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define SAVE_B_Y_END \
|
|
|
|
(*_PREG) = NEXTOP((*_PREG), y); \
|
|
|
|
GONext();
|
|
|
|
|
|
|
|
#define COMMIT_B_X_INSTINIT \
|
|
|
|
register CELL d0; \
|
|
|
|
register CELL *pt1;
|
|
|
|
|
|
|
|
#define COMMIT_B_X_DO_COMMIT_B_X \
|
2015-01-07 10:22:52 +00:00
|
|
|
d0 = XREG((*_PREG)->y_u.xps.x);
|
2014-07-13 05:30:14 +01:00
|
|
|
|
|
|
|
#define COMMIT_B_X_COMMIT_B_X_NVAR \
|
2015-01-07 10:22:52 +00:00
|
|
|
SET_ASP(YREG, (*_PREG)->y_u.xps.s); \
|
2014-07-13 05:30:14 +01:00
|
|
|
(*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xps),Osbpp),l); \
|
|
|
|
choiceptr pt0;
|
|
|
|
|
|
|
|
#if defined(YAPOR_SBA) && defined(FROZEN_STACKS)
|
|
|
|
#define COMMIT_B_X_YSBA_FROZEN \
|
|
|
|
pt0 = (choiceptr)IntegerOfTerm(d0);
|
|
|
|
#else
|
|
|
|
#define COMMIT_B_X_NOYSBA_NOFROZEN \
|
|
|
|
pt0 = (choiceptr)(LCL0-IntegerOfTerm(d0));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define COMMIT_B_X_POST_YSBA_FROZEN \
|
|
|
|
saveregs(); \
|
|
|
|
prune(pt0); \
|
|
|
|
setregs(); \
|
|
|
|
GONext();
|
|
|
|
|
|
|
|
#define COMMIT_B_X_END
|
|
|
|
|
|
|
|
#define COMMIT_B_Y_INSTINIT \
|
|
|
|
register CELL d0; \
|
|
|
|
register CELL *pt1;
|
|
|
|
|
|
|
|
#define COMMIT_B_Y_DO_COMMIT_B_Y \
|
2015-01-07 10:22:52 +00:00
|
|
|
d0 = YREG[(*_PREG)->y_u.yps.y];
|
2014-07-13 05:30:14 +01:00
|
|
|
|
|
|
|
#define COMMIT_B_Y_COMMIT_B_Y_NVAR \
|
2015-01-07 10:22:52 +00:00
|
|
|
SET_ASP(YREG, (*_PREG)->y_u.yps.s); \
|
2014-07-13 05:30:14 +01:00
|
|
|
(*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yps),Osbpp),l); \
|
|
|
|
choiceptr pt0;
|
|
|
|
|
|
|
|
#if defined(YAPOR_SBA) && defined(FROZEN_STACKS)
|
|
|
|
#define COMMIT_B_Y_YSBA_FROZEN \
|
|
|
|
pt0 = (choiceptr)IntegerOfTerm(d0);
|
|
|
|
#else
|
|
|
|
#define COMMIT_B_Y_NOYSBA_NOFROZEN \
|
|
|
|
pt0 = (choiceptr)(LCL0-IntegerOfTerm(d0));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define COMMIT_B_Y_POST_YSBA_FROZEN \
|
|
|
|
saveregs(); \
|
|
|
|
prune(pt0); \
|
|
|
|
setregs(); \
|
|
|
|
GONext();
|
|
|
|
|