recognise discontiguous flag

This commit is contained in:
Vitor Santos Costa 2016-05-12 11:48:39 +01:00
parent d46bef3adb
commit abe1168b1d

View File

@ -1464,9 +1464,10 @@ PredEntry *Yap_PredFromClause(Term t USES_REGS) {
bool Yap_discontiguous(PredEntry *ap, Term mode USES_REGS) { bool Yap_discontiguous(PredEntry *ap, Term mode USES_REGS) {
register consult_obj *fp; register consult_obj *fp;
if (ap->PredFlags & (DiscontiguousPredFlag|MultiFileFlag)) if (ap->PredFlags & (DiscontiguousPredFlag | MultiFileFlag) ||
falseGlobalPrologFlag(DISCONTIGUOUS_WARNINGS_FLAG))
return false; return false;
if (mode != TermConsult && mode != TermReconsult) if ((mode != TermConsult && mode != TermReconsult))
return false; return false;
if (!LOCAL_ConsultSp) { if (!LOCAL_ConsultSp) {
return false; return false;
@ -1503,18 +1504,18 @@ static Int
Term mod = Deref(ARG3); Term mod = Deref(ARG3);
if (IsVarTerm(t)) if (IsVarTerm(t))
return (FALSE); return false;
if (IsAtomTerm(t)) if (IsAtomTerm(t))
at = AtomOfTerm(t); at = AtomOfTerm(t);
else else
return (FALSE); return false;
t = Deref(ARG2); t = Deref(ARG2);
if (IsVarTerm(t)) if (IsVarTerm(t))
return (FALSE); return false;
if (IsIntTerm(t)) if (IsIntTerm(t))
arity = IntOfTerm(t); arity = IntOfTerm(t);
else else
return FALSE; return false;
if (arity == 0) if (arity == 0)
pe = RepPredProp(PredPropByAtom(at, mod)); pe = RepPredProp(PredPropByAtom(at, mod));
else else