improvements to indexing: allow user control and fix bugs in sorting

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@836 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2003-06-06 11:54:02 +00:00
parent eee154bb00
commit b936201465
15 changed files with 388 additions and 238 deletions

View File

@@ -906,14 +906,14 @@ addclause(Term t, yamop *cp, int mode, int mod)
p->PredFlags |= CompiledPredFlag | FastPredFlag;
else
p->PredFlags |= CompiledPredFlag;
if ((Yap_GetValue(AtomIndex) != TermNil) &&
(p->cs.p_code.FirstClause != NIL) &&
(Arity != 0)) {
if (yap_flags[INDEXING_MODE_FLAG] != INDEX_MODE_OFF &&
p->cs.p_code.FirstClause != NULL &&
Arity != 0) {
p->OpcodeOfPred = INDEX_OPCODE;
p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred));
}
}
if (p->cs.p_code.FirstClause == NIL) {
if (p->cs.p_code.FirstClause == NULL) {
if (!(p->PredFlags & DynamicPredFlag)) {
add_first_static(p, cp, spy_flag);
/* make sure we have a place to jump to */