fix bug in clause: a trust_me followed by a try should be implemented by
reusing the choice-point. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1598 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
307a132aa6
commit
af65e2dbc2
18
C/index.c
18
C/index.c
@ -11,8 +11,11 @@
|
|||||||
* File: index.c *
|
* File: index.c *
|
||||||
* comments: Indexing a Prolog predicate *
|
* comments: Indexing a Prolog predicate *
|
||||||
* *
|
* *
|
||||||
* Last rev: $Date: 2006-04-05 00:16:54 $,$Author: vsc $ *
|
* Last rev: $Date: 2006-04-12 18:56:50 $,$Author: vsc $ *
|
||||||
* $Log: not supported by cvs2svn $
|
* $Log: not supported by cvs2svn $
|
||||||
|
* Revision 1.161 2006/04/05 00:16:54 vsc
|
||||||
|
* Lots of fixes (check logfile for details
|
||||||
|
*
|
||||||
* Revision 1.160 2006/03/24 17:13:41 rslopes
|
* Revision 1.160 2006/03/24 17:13:41 rslopes
|
||||||
* New update to BEAM engine.
|
* New update to BEAM engine.
|
||||||
* BEAM now uses YAP Indexing (JITI)
|
* BEAM now uses YAP Indexing (JITI)
|
||||||
@ -8008,8 +8011,10 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y
|
|||||||
case _try_clause:
|
case _try_clause:
|
||||||
if (b0 == NULL)
|
if (b0 == NULL)
|
||||||
store_clause_choice_point(Terms[0], Terms[1], Terms[2], NEXTOP(ipc,ld), ap, ap_pc, cp_pc);
|
store_clause_choice_point(Terms[0], Terms[1], Terms[2], NEXTOP(ipc,ld), ap, ap_pc, cp_pc);
|
||||||
else
|
else {
|
||||||
|
B = b0;
|
||||||
update_clause_choice_point(NEXTOP(ipc,ld), ap_pc);
|
update_clause_choice_point(NEXTOP(ipc,ld), ap_pc);
|
||||||
|
}
|
||||||
if (lu_pred)
|
if (lu_pred)
|
||||||
return lu_clause(ipc->u.ld.d);
|
return lu_clause(ipc->u.ld.d);
|
||||||
else
|
else
|
||||||
@ -8019,8 +8024,10 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y
|
|||||||
case _try_clause4:
|
case _try_clause4:
|
||||||
if (b0 == NULL)
|
if (b0 == NULL)
|
||||||
store_clause_choice_point(Terms[0], Terms[1], Terms[2], NEXTOP(ipc,l), ap, ap_pc, cp_pc);
|
store_clause_choice_point(Terms[0], Terms[1], Terms[2], NEXTOP(ipc,l), ap, ap_pc, cp_pc);
|
||||||
else
|
else {
|
||||||
|
B = b0;
|
||||||
update_clause_choice_point(NEXTOP(ipc,l), ap_pc);
|
update_clause_choice_point(NEXTOP(ipc,l), ap_pc);
|
||||||
|
}
|
||||||
if (lu_pred)
|
if (lu_pred)
|
||||||
return lu_clause(ipc->u.l.l);
|
return lu_clause(ipc->u.l.l);
|
||||||
else
|
else
|
||||||
@ -8028,8 +8035,10 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y
|
|||||||
case _try_me:
|
case _try_me:
|
||||||
if (b0 == NULL)
|
if (b0 == NULL)
|
||||||
store_clause_choice_point(Terms[0], Terms[1], Terms[2], ipc->u.ld.d, ap, ap_pc, cp_pc);
|
store_clause_choice_point(Terms[0], Terms[1], Terms[2], ipc->u.ld.d, ap, ap_pc, cp_pc);
|
||||||
else
|
else {
|
||||||
|
B = b0;
|
||||||
update_clause_choice_point(ipc->u.ld.d, ap_pc);
|
update_clause_choice_point(ipc->u.ld.d, ap_pc);
|
||||||
|
}
|
||||||
ipc = NEXTOP(ipc,ld);
|
ipc = NEXTOP(ipc,ld);
|
||||||
break;
|
break;
|
||||||
case _retry_profiled:
|
case _retry_profiled:
|
||||||
@ -8081,6 +8090,7 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y
|
|||||||
case _profiled_trust_me:
|
case _profiled_trust_me:
|
||||||
case _trust_me:
|
case _trust_me:
|
||||||
case _count_trust_me:
|
case _count_trust_me:
|
||||||
|
b0 = B;
|
||||||
#ifdef CUT_C
|
#ifdef CUT_C
|
||||||
{
|
{
|
||||||
while (POP_CHOICE_POINT(B->cp_b))
|
while (POP_CHOICE_POINT(B->cp_b))
|
||||||
|
Reference in New Issue
Block a user