fix bad compilation of arithmetic in disjunctions

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@361 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-02-14 04:32:09 +00:00
parent 84b445d4db
commit e74b412591
2 changed files with 7 additions and 3 deletions

View File

@ -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);

View File

@ -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) {