fix stupid indesing of very long terms.

This commit is contained in:
Vítor Santos Costa 2012-06-05 08:04:22 +01:00
parent d1d01ddc2a
commit c4bd913e34
2 changed files with 5 additions and 2 deletions

View File

@ -2536,7 +2536,7 @@ several_tags(ClauseDef *min, ClauseDef *max)
CELL tag = min->Tag;
while (min < max) {
min++;
if (!IsAtomTerm(min->Tag) || min->Tag != tag)
if (!IsAtomOrIntTerm(min->Tag) || min->Tag != tag)
return TRUE;
}
return FALSE;
@ -2592,7 +2592,7 @@ do_compound_index(ClauseDef *min0, ClauseDef* max0, Term* sreg, struct intermedi
}
group = (GroupDef *)top;
ngroups = groups_in(min, max, group, cint);
if (ngroups == 1 && group->VarClauses == 0 && several_tags(min,max)) {
if (ngroups == 1 && group->VarClauses == 0 && (i < 8 || several_tags(min,max))) {
/* ok, we are doing a sub-argument */
/* process group */

View File

@ -145,6 +145,9 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)
LOCK(Yap_heap_regs->low_level_trace_lock);
sc = Yap_heap_regs;
vsc_count++;
if (vsc_count == 1719615) jmp_deb(1);
if (vsc_count < 1719600)
return;
#ifdef THREADS
LOCAL_ThreadHandle.thread_inst_count++;
#endif