From c1024caa53a0160b99d1cc275c37cd50bd0348eb Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 21 Jul 2009 00:11:44 -0500 Subject: [PATCH] Unify emptylist of variables if one reads EOF. --- C/iopreds.c | 3 ++- C/tracer.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/C/iopreds.c b/C/iopreds.c index 7a319580e..87a424d28 100644 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -3977,7 +3977,8 @@ static Int Yap_clean_tokenizer(tokstart, Yap_VarTable, Yap_AnonVarTable); return Yap_unify(tpos,ARG5) && - Yap_unify_constant(ARG2, MkAtomTerm (AtomEof)); + Yap_unify_constant(ARG2, MkAtomTerm (AtomEof)) + && Yap_unify_constant(ARG4, TermNil); } } } diff --git a/C/tracer.c b/C/tracer.c index 4b91937ed..0ebba4ee4 100644 --- a/C/tracer.c +++ b/C/tracer.c @@ -172,6 +172,8 @@ 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 < 3630000LL) + return; #ifdef THREADS Yap_heap_regs->thread_handle[worker_id].thread_inst_count++; #endif