From 230c812a76c8dd0d0980eba5cc0346ed8cfdfe85 Mon Sep 17 00:00:00 2001 From: vsc Date: Wed, 11 Oct 2006 15:08:03 +0000 Subject: [PATCH] fix bb entries comment development code for timestamp overflow. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1703 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/cdmgr.c | 10 +++++++++- C/compiler.c | 8 ++++++-- C/dbase.c | 6 ++++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/C/cdmgr.c b/C/cdmgr.c index 5ce967331..14fe009e6 100644 --- a/C/cdmgr.c +++ b/C/cdmgr.c @@ -11,8 +11,13 @@ * File: cdmgr.c * * comments: Code manager * * * -* Last rev: $Date: 2006-10-11 14:53:57 $,$Author: vsc $ * +* Last rev: $Date: 2006-10-11 15:08:03 $,$Author: vsc $ * * $Log: not supported by cvs2svn $ +* Revision 1.193 2006/10/11 14:53:57 vsc +* fix memory leak +* fix overflow handling +* VS: ---------------------------------------------------------------------- +* * Revision 1.192 2006/10/10 14:08:16 vsc * small fixes on threaded implementation. * @@ -5002,6 +5007,7 @@ p_continue_log_update_clause0(void) return fetch_next_lu_clause0(pe, ipc, Deref(ARG3), ARG4, B->cp_cp, FALSE); } +#if TIMESTAMP_OVERFLOW static void adjust_cl_timestamp(LogUpdClause *cl, UInt *arp, UInt NStamps) { @@ -5078,6 +5084,8 @@ Yap_update_timestamps(PredEntry *ap, UInt arity) goto restart; } +#endif + static Int fetch_next_static_clause(PredEntry *pe, yamop *i_code, Term th, Term tb, Term tr, yamop *cp_ptr, int first_time) { diff --git a/C/compiler.c b/C/compiler.c index 00ed58311..9c69d5ec5 100644 --- a/C/compiler.c +++ b/C/compiler.c @@ -11,8 +11,12 @@ * File: compiler.c * * comments: Clause compiler * * * -* Last rev: $Date: 2006-09-20 20:03:51 $,$Author: vsc $ * +* Last rev: $Date: 2006-10-11 15:08:03 $,$Author: vsc $ * * $Log: not supported by cvs2svn $ +* Revision 1.80 2006/09/20 20:03:51 vsc +* improve indexing on floats +* fix sending large lists to DB +* * Revision 1.79 2006/08/01 13:14:17 vsc * fix compilation of | * @@ -2110,7 +2114,7 @@ typedef struct { PInstr *pc; } bventry; -#define MAX_DISJUNCTIONS 32 +#define MAX_DISJUNCTIONS 128 static bventry *bvstack; static int bvindex = 0; diff --git a/C/dbase.c b/C/dbase.c index 38c6155da..b8b1b6fd9 100644 --- a/C/dbase.c +++ b/C/dbase.c @@ -1808,12 +1808,14 @@ new_lu_db_entry(Term t, PredEntry *pe) cl->ClPrev = cl->ClNext = NULL; cl->ClSize = ((CODEADDR)&(x->Contents)-(CODEADDR)cl)+x->NOfCells*sizeof(CELL); /* Support for timestamps */ - if (pe->LastCallOfPred != LUCALL_ASSERT) { + if (pe && pe->LastCallOfPred != LUCALL_ASSERT) { ++pe->TimeStampOfPred; /* fprintf(stderr,"+ %x--%d--%ul\n",pe,pe->TimeStampOfPred,pe->ArityOfPE);*/ pe->LastCallOfPred = LUCALL_ASSERT; + cl->ClTimeStart = pe->TimeStampOfPred; + } else { + cl->ClTimeStart = 0L; } - cl->ClTimeStart = pe->TimeStampOfPred; cl->ClTimeEnd = ~0L; #if defined(YAPOR) || defined(THREADS) INIT_LOCK(cl->ClLock);