From e74b412591ba568c81955bf0ca2ccc9f2fa2ece5 Mon Sep 17 00:00:00 2001 From: vsc Date: Thu, 14 Feb 2002 04:32:09 +0000 Subject: [PATCH] fix bad compilation of arithmetic in disjunctions git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@361 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/compiler.c | 2 +- C/tracer.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/C/compiler.c b/C/compiler.c index 3ada97bab..b48cfa63d 100644 --- a/C/compiler.c +++ b/C/compiler.c @@ -1041,7 +1041,7 @@ c_bifun(Int Op, Term t1, Term t2, Term t3, int mod) save_machine_regs(); longjmp(CompilerBotch,1); } - } else if (IsNewVar(t3) /* && cur_branch == 0 */) { + } else if (IsNewVar(t3) && cur_branch == 0 /* otherwise you may have trouble with z(X) :- ( Z is X*2 ; write(Z)) */) { c_var(t3,f_flag,(unsigned int)Op); if (Op == _functor) { emit(empty_call_op, Zero, Zero); diff --git a/C/tracer.c b/C/tracer.c index 08d53fede..01b87f36d 100644 --- a/C/tracer.c +++ b/C/tracer.c @@ -112,11 +112,15 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args) /* extern int gc_calls; */ vsc_count++; - /* if (vsc_count < 49036000) return; */ + if (vsc_count < 6000) return; + /* if (vsc_count == 6469) { + printf("Here I go\n"); + } + */ /* if (vsc_count > 500000) exit(0); */ /* if (gc_calls < 1) return;*/ #if defined(__GNUC__) - YP_fprintf(YP_stderr,"%llu (%p %p) ", vsc_count, P, CP); + YP_fprintf(YP_stderr,"%llu (%p,%p: %x %x %x) ", vsc_count, H, ENV, *(CELL *)0x910e088, *(CELL *)0x910e024, *(CELL *)0x910d658); #endif /* check_trail_consistency(); */ if (pred == NULL) {