fix TopLevelGoal to handle correctly undefined predicates. Make sure that

undefined predicated will not force the boot process to loop.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2310 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2008-08-19 13:33:45 +00:00
parent df22b925b5
commit 16d0f2e749
2 changed files with 3 additions and 2 deletions

View File

@ -7812,7 +7812,8 @@ Yap_absmi(int inp)
PredEntry *pe = PredFromDefCode(PREG);
BEGD(d0);
/* avoid trouble with undefined dynamic procedures */
if (pe->PredFlags & (DynamicPredFlag|LogUpdatePredFlag|MultiFileFlag)) {
if ((pe->PredFlags & (DynamicPredFlag|LogUpdatePredFlag|MultiFileFlag)) ||
(UndefCode->OpcodeOfPred == UNDEF_OPCODE)) {
#if defined(YAPOR) || defined(THREADS)
PP = NULL;
#endif

View File

@ -1685,7 +1685,7 @@ Yap_RunTopGoal(Term t)
/* I cannot use the standard macro here because
otherwise I would dereference the argument and
might skip a svar */
pe = Yap_GetPredPropByFunc(f, CurrentModule);
pe = PredPropByFunc(f, CurrentModule);
pt = RepAppl(t)+1;
arity = ArityOfFunctor(f);
} else {