fix another bug in when removing indexing code.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@896 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2003-10-14 18:37:56 +00:00
parent 9d64f1d2d1
commit 9f6ef90e85
3 changed files with 5 additions and 4 deletions

View File

@ -3917,7 +3917,8 @@ p_eraseall(void)
if (!pe->cs.p_code.NOfClauses)
return TRUE;
Yap_RemoveIndexation(pe);
if (pe->PredFlags & IndexedPredFlag)
Yap_RemoveIndexation(pe);
cl = ClauseCodeToLogUpdClause(pe->cs.p_code.FirstClause);
do {
LogUpdClause *ncl = cl->ClNext;

View File

@ -4726,7 +4726,6 @@ replace_lu_block(LogUpdIndex *blk, int flag, PredEntry *ap, yamop *code, int has
i = 0;
}
codep = cp_lu_trychain(codep, ocodep, blk->ClCode, flag, ap, code, has_cut, ncl, ncls, i);
if (codep > (char *)ncl+sz) exit(1);
/* the copying has been done */
start->u.Ill.l2 = codep;
/* insert ourselves into chain */
@ -5378,7 +5377,8 @@ Yap_AddClauseToIndex(PredEntry *ap, yamop *beg, int first) {
int cb;
if (!(ap->PredFlags & LogUpdatePredFlag)) {
Yap_RemoveIndexation(ap);
if (ap->PredFlags & IndexedPredFlag)
Yap_RemoveIndexation(ap);
return;
}
if ((cb = setjmp(Yap_CompilerBotch)) == 3) {

View File

@ -115,9 +115,9 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)
vsc_count++;
#ifdef COMMENTED
if (vsc_count < 123536430LL) {
if (vsc_count == 123536441LL) vsc_xstop = 1;
return;
}
if (vsc_count == 123536441LL) vsc_xstop = 1;
if (vsc_count < 5530257LL) {
return;
}