get rid of MBIT in dbase

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@914 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2003-10-31 12:09:49 +00:00
parent a23c409540
commit 6c126a4392
2 changed files with 9 additions and 6 deletions

View File

@ -1160,7 +1160,7 @@ non_ground(Term t, Term *Var)
#endif #endif
/* check whether the two terms unify and return what variables should /* check whether the two terms unify and return what variables should
be bound before the terms are execatly equal */ be bound before the terms are exactly equal */
static Int p_can_unify(void) static Int p_can_unify(void)
{ {
#ifdef COROUTINING #ifdef COROUTINING

View File

@ -626,6 +626,9 @@ copy_big_int(CELL *st, CELL *pt)
} }
#endif /* BIG_INT */ #endif /* BIG_INT */
#define DB_MARKED(d0) ((CELL *)(d0) < CodeMax && (CELL *)(d0) >= tbase)
/* This routine creates a complex term in the heap. */ /* This routine creates a complex term in the heap. */
static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end, static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end,
register CELL *StoPoint, register CELL *StoPoint,
@ -827,7 +830,7 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end,
/* the code to dereference a variable */ /* the code to dereference a variable */
deref_var: deref_var:
if (!MARKED(d0)) { if (!DB_MARKED(d0)) {
if ( if (
#if SBA #if SBA
d0 != 0 d0 != 0
@ -847,14 +850,14 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end,
pt0++; pt0++;
/* first time we found this variable! */ /* first time we found this variable! */
if (!MARKED(d0)) { if (!DB_MARKED(d0)) {
/* store previous value */ /* store previous value */
visited --; visited --;
visited->addr = ptd0; visited->addr = ptd0;
CheckDBOverflow(); CheckDBOverflow();
/* variables need to be offset at read time */ /* variables need to be offset at read time */
*ptd0 = ((CELL)StoPoint|MBIT); *ptd0 = (CELL)StoPoint;
#if SBA #if SBA
/* the copy we keep will be an empty variable */ /* the copy we keep will be an empty variable */
*StoPoint++ = 0; *StoPoint++ = 0;
@ -911,9 +914,9 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end,
#endif #endif
/* store the offset */ /* store the offset */
#ifdef IDB_USE_MBIT #ifdef IDB_USE_MBIT
*StoPoint = d0; *StoPoint = d0 | MBIT;
#else #else
*StoPoint = d0 ^ MBIT; *StoPoint = d0;
#endif #endif
StoPoint++; StoPoint++;
continue; continue;