fix infinite terms in DB

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@259 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-01-03 06:26:15 +00:00
parent 698f6d2c04
commit 50128d8f6f

View File

@ -626,6 +626,8 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end,
ap2 = RepAppl(d0); ap2 = RepAppl(d0);
#ifdef RATIONAL_TREES #ifdef RATIONAL_TREES
if (ap2 < (CELL *)((CELL)CodeMax-(CELL)tbase)) { if (ap2 < (CELL *)((CELL)CodeMax-(CELL)tbase)) {
*lr++ = ToSmall((CELL)(StoPoint)-(CELL)(tbase));
check_trail(lr);
*StoPoint++ = d0; *StoPoint++ = d0;
++pt0; ++pt0;
continue; continue;
@ -761,6 +763,8 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end,
#ifdef RATIONAL_TREES #ifdef RATIONAL_TREES
if (RepPair(d0) < (CELL *)((CELL)CodeMax-(CELL)tbase)) { if (RepPair(d0) < (CELL *)((CELL)CodeMax-(CELL)tbase)) {
*StoPoint++ = d0; *StoPoint++ = d0;
*lr++ = ToSmall((CELL)(StoPoint)-(CELL)(tbase));
check_trail(lr);
++pt0; ++pt0;
continue; continue;
} }
@ -861,6 +865,8 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end,
Term t[4]; Term t[4];
int sz = to_visit-to_visit_base; int sz = to_visit-to_visit_base;
printf("visiting a constraint %p\n", ptd0);
H = (CELL *)to_visit; H = (CELL *)to_visit;
/* store the constraint away for now */ /* store the constraint away for now */
t[0] = (CELL)ptd0; t[0] = (CELL)ptd0;