From c715e145efcaab646281cb74df78486fbdb4aa31 Mon Sep 17 00:00:00 2001 From: vsc Date: Thu, 17 Jun 2004 22:07:23 +0000 Subject: [PATCH] bad bug in indexing code. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1081 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/absmi.c | 7 +++++-- C/index.c | 10 +++++++--- C/tracer.c | 12 ++++-------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/C/absmi.c b/C/absmi.c index 9eb4419e8..f98b52e39 100644 --- a/C/absmi.c +++ b/C/absmi.c @@ -10,8 +10,11 @@ * * * File: absmi.c * * comments: Portable abstract machine interpreter * -* Last rev: $Date: 2004-06-09 03:32:02 $,$Author: vsc $ * +* Last rev: $Date: 2004-06-17 22:07:22 $,$Author: vsc $ * * $Log: not supported by cvs2svn $ +* Revision 1.135 2004/06/09 03:32:02 vsc +* fix bugs +* * Revision 1.134 2004/06/05 03:36:59 vsc * coroutining is now a part of attvars. * some more fixes. @@ -7049,7 +7052,7 @@ Yap_absmi(int inp) ENDD(d1); ENDBOp(); - BOp(switch_on_cons, ssl); + BOp(switch_on_cons, sssl); BEGD(d1); d1 = I_R; /* we use a very simple hash function to find elements in a diff --git a/C/index.c b/C/index.c index 5dd0d05eb..b0fd8f844 100644 --- a/C/index.c +++ b/C/index.c @@ -11,8 +11,11 @@ * File: index.c * * comments: Indexing a Prolog predicate * * * -* Last rev: $Date: 2004-04-29 03:44:04 $,$Author: vsc $ * +* Last rev: $Date: 2004-06-17 22:07:23 $,$Author: vsc $ * * $Log: not supported by cvs2svn $ +* Revision 1.90 2004/04/29 03:44:04 vsc +* fix bad suspended clause counter +* * Revision 1.89 2004/04/27 15:03:43 vsc * more fixes for expand_clauses * @@ -4972,11 +4975,12 @@ kill_block(path_stack_entry *sp, PredEntry *ap) } static path_stack_entry * -kill_clause(yamop *ipc, yamop *bg, yamop *lt, path_stack_entry *sp, PredEntry *ap) +kill_clause(yamop *ipc, yamop *bg, yamop *lt, path_stack_entry *sp0, PredEntry *ap) { LogUpdIndex *blk; yamop *start; op_numbers op0; + path_stack_entry *sp = sp0; while ((--sp)->flag != block_entry); blk = (LogUpdIndex *)(sp->u.cle.block); @@ -5041,7 +5045,7 @@ kill_clause(yamop *ipc, yamop *bg, yamop *lt, path_stack_entry *sp, PredEntry *a start->u.Ill.l1->u.ld.d = FAILCODE; } start->opc = Yap_opcode(_stale_lu_index); - return sp; + return sp0; } } diff --git a/C/tracer.c b/C/tracer.c index 4e82d6d3d..3c308efa4 100644 --- a/C/tracer.c +++ b/C/tracer.c @@ -110,6 +110,10 @@ int vsc_xstop = FALSE; CELL old_value = 0L, old_value2 = 0L; +/* +void jmp_deb(int i) {if (i) printf("Here we go\n"); else jmp_deb(0);} +*/ + void low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args) { @@ -118,14 +122,6 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args) Int arity; /* extern int gc_calls; */ -#if THREADS - LOCK(heap_regs->low_level_trace_lock); - if (thread_trace && - worker_id +1 != thread_trace) { - UNLOCK(heap_regs->low_level_trace_lock); - return; - } -#endif vsc_count++; #ifdef COMMENTED // if (vsc_count == 218280)