do not always remove the full index if removing a root node.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@894 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
521e70e9ab
commit
ef5b98628f
@ -158,7 +158,7 @@ LookupAtom(char *atom)
|
|||||||
return(a);
|
return(a);
|
||||||
}
|
}
|
||||||
/* add new atom to start of chain */
|
/* add new atom to start of chain */
|
||||||
ae = (AtomEntry *) Yap_AllocAtomSpace((sizeof *ae) + strlen(atom));
|
ae = (AtomEntry *) Yap_AllocAtomSpace((sizeof *ae) + strlen(atom) + 1);
|
||||||
a = AbsAtom(ae);
|
a = AbsAtom(ae);
|
||||||
ae->NextOfAE = HashChain[hash].Entry;
|
ae->NextOfAE = HashChain[hash].Entry;
|
||||||
HashChain[hash].Entry = a;
|
HashChain[hash].Entry = a;
|
||||||
|
@ -399,7 +399,9 @@ kill_first_log_iblock(LogUpdIndex *c, LogUpdIndex *cl, PredEntry *ap)
|
|||||||
ncl = next;
|
ncl = next;
|
||||||
}
|
}
|
||||||
c->ClRefCount--;
|
c->ClRefCount--;
|
||||||
if (cl == NULL) {
|
/* check if we are still the main index */
|
||||||
|
if (cl == NULL &&
|
||||||
|
ap->cs.p_code.TrueCodeOfPred == c->ClCode) {
|
||||||
RemoveMainIndex(ap);
|
RemoveMainIndex(ap);
|
||||||
}
|
}
|
||||||
if (!((c->ClFlags & InUseMask) || c->ClRefCount)) {
|
if (!((c->ClFlags & InUseMask) || c->ClRefCount)) {
|
||||||
|
Reference in New Issue
Block a user