avoid repeated discontiguous messages
This commit is contained in:
parent
87e13a9730
commit
9f2ba2d4fb
14
C/cdmgr.c
14
C/cdmgr.c
@ -1485,11 +1485,21 @@ bool Yap_discontiguous(PredEntry *ap, Term mode USES_REGS) {
|
||||
return false;
|
||||
}
|
||||
if (ap == LOCAL_LastAssertedPred)
|
||||
return FALSE;
|
||||
return false;
|
||||
if (ap->cs.p_code.NOfClauses) {
|
||||
Term repeat = AbsPair((CELL *)AbsPredProp(ap));
|
||||
for (fp = LOCAL_ConsultSp; fp < LOCAL_ConsultBase; ++fp)
|
||||
if (fp->p == AbsPredProp(ap))
|
||||
if (fp->p == AbsPredProp(ap)) {
|
||||
// detect repeated warnings
|
||||
if (LOCAL_ConsultSp == LOCAL_ConsultLow + 1) {
|
||||
expand_consult();
|
||||
}
|
||||
--LOCAL_ConsultSp;
|
||||
LOCAL_ConsultSp->r = repeat;
|
||||
return true;
|
||||
} else if (fp->r == repeat && ap->cs.p_code.NOfClauses > 4) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -156,7 +156,10 @@ debugger uses to write terms. If unbound, show the current options.
|
||||
|
||||
If `true` (default `true`) YAP checks for definitions of the same predicate that
|
||||
are separated by clauses for other predicates. This may indicate that different
|
||||
procedures have the sam*e name.
|
||||
procedures have the same name.
|
||||
|
||||
The declaration discontiguous/1 disables this warning for user-specified predicates.
|
||||
|
||||
*/
|
||||
YAP_FLAG(DOLLAR_AS_LOWER_CASE_FLAG, "dollar_as_lower_case", true, booleanFlag,
|
||||
"false", NULL), /**< `dollar_as_lower_case `
|
||||
|
@ -28,6 +28,7 @@ typedef union CONSULT_OBJ {
|
||||
int mode;
|
||||
Prop p;
|
||||
UInt c;
|
||||
Term r;
|
||||
} consult_obj;
|
||||
|
||||
/* Either we are assembling clauses or indexing code */
|
||||
|
Reference in New Issue
Block a user