fix some bugs in call_cleanup: the result of action should not matter,

and !,fail would not wakeup the delayed goal.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1754 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2006-12-31 01:50:35 +00:00
parent a24c8bee1c
commit 88f51c97d7
4 changed files with 34 additions and 2 deletions

View File

@@ -10,8 +10,11 @@
* *
* File: absmi.c *
* comments: Portable abstract machine interpreter *
* Last rev: $Date: 2006-12-30 03:25:44 $,$Author: vsc $ *
* Last rev: $Date: 2006-12-31 01:50:34 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $
* Revision 1.217 2006/12/30 03:25:44 vsc
* call_cleanup/2 and 3
*
* Revision 1.216 2006/12/29 01:57:50 vsc
* allow coroutining plus tabling, this means fixing some trouble with the
* gc and a bug in global variable handling.
@@ -1754,6 +1757,12 @@ Yap_absmi(int inp)
/* fail */
PBOp(op_fail, e);
#ifdef COROUTINING
CACHE_Y_AS_ENV(YREG);
check_stack(NoStackFail, H);
ENDCACHE_Y_AS_ENV();
#endif
fail:
{
register tr_fr_ptr pt0 = TR;
@@ -2809,6 +2818,19 @@ Yap_absmi(int inp)
/* don't do debugging and friends here */
goto do_commit_b_x;
/* Problem: have I got an environment or not? */
NoStackFail:
/* find something to fool S */
if (!ActiveSignals || ActiveSignals & YAP_CDOVF_SIGNAL) {
goto fail;
}
if (!(ActiveSignals & YAP_CREEP_SIGNAL)) {
SREG = (CELL *)RepPredProp(Yap_GetPredPropByAtom(AtomFail,0));
goto creep;
}
/* don't do debugging and friends here */
goto fail;
/* don't forget I cannot creep at ; */
NoStackEither:
if (ActiveSignals & YAP_CREEP_SIGNAL) {