make sure $pred_exists does not create new pred prop.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@908 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
uid49918 2003-10-28 21:04:52 +00:00
parent 77bb5fed93
commit 614bdd981f
2 changed files with 5 additions and 3 deletions

View File

@ -460,7 +460,9 @@ Yap_NewPredPropByFunctor(FunctorEntry *fe, SMALLUNSGN cur_mod)
Prop p0;
PredEntry *p = (PredEntry *) Yap_AllocAtomSpace(sizeof(*p));
/* printf("entering %s:%s/%d\n", RepAtom(AtomOfTerm(ModuleName[cur_mod]))->StrOfAE, RepAtom(fe->NameOfFE)->StrOfAE, fe->ArityOfFE); */
extern long long int vsc_count;
if (p == 0x9183b68) printf("%lld entering %s:%s/%d\n", vsc_count,
RepAtom(AtomOfTerm(ModuleName[cur_mod]))->StrOfAE, RepAtom(fe->NameOfFE)->StrOfAE, fe->ArityOfFE);
INIT_RWLOCK(p->PRWLock);
p->KindOfPE = PEProp;

View File

@ -1885,10 +1885,10 @@ p_pred_exists(void)
return (FALSE);
} else if (IsAtomTerm(t)) {
Atom at = AtomOfTerm(t);
pe = RepPredProp(PredPropByAtom(at, mod));
pe = RepPredProp(Yap_GetPredPropByAtom(at, mod));
} else if (IsApplTerm(t)) {
Functor fun = FunctorOfTerm(t);
pe = RepPredProp(PredPropByFunc(fun, mod));
pe = RepPredProp(Yap_GetPredPropByFunc(fun, mod));
} else
return (FALSE);
if (pe == NIL)