From bca74cd190876f894bfc5aa44925424eb5acdfa1 Mon Sep 17 00:00:00 2001 From: vsc Date: Fri, 14 Feb 2003 12:20:57 +0000 Subject: [PATCH] fixes for int =\= long git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@782 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/agc.c | 2 +- C/heapgc.c | 8 ++++---- H/Regs.h | 11 +++++++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/C/agc.c b/C/agc.c index 546e3ac8a..4c03ecde2 100644 --- a/C/agc.c +++ b/C/agc.c @@ -33,7 +33,7 @@ STATIC_PROTO(void ConvDBList, (Term, char *,CELL)); static int agc_calls; -static Int agc_collected; +static unsigned long int agc_collected; static Int tot_agc_time = 0; /* total time spent in GC */ diff --git a/C/heapgc.c b/C/heapgc.c index 2e6d793d3..ca6826059 100644 --- a/C/heapgc.c +++ b/C/heapgc.c @@ -41,7 +41,7 @@ static Int tot_gc_time = 0; /* total time spent in GC */ static Int tot_gc_recovered = 0; /* number of heap objects in all garbage collections */ /* in a single gc */ -static Int total_marked; /* number of heap objects marked */ +static unsigned long int total_marked; /* number of heap objects marked */ struct gc_ma_h_entry *live_list; @@ -1480,9 +1480,9 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose) case _count_retry: { Atom at; - UInt arity; + unsigned long int arity; SMALLUNSGN mod; - if (Yap_PredForCode(gc_B->cp_ap, &at, &arity, &mod)) { + if (Yap_PredForCode(gc_B->cp_ap, &at, (UInt *)(&arity), &mod)) { if (arity) fprintf(Yap_stderr,"[GC] %s/%ld marked %ld (%s)\n", RepAtom(at)->StrOfAE, arity, total_marked, op_names[opnum]); else @@ -2962,7 +2962,7 @@ compaction_phase(tr_fr_ptr old_TR, CELL *current_env, yamop *curp, CELL *max) #ifdef HYBRID_SCHEME #ifdef DEBUG if (total_marked != iptop-(CELL_PTR *)H && iptop < (CELL_PTR *)ASP -1024) - fprintf(Yap_stderr,"[GC] Oops on iptop-H (%ld) vs %ld\n", iptop-(CELL_PTR *)H, total_marked); + fprintf(Yap_stderr,"[GC] Oops on iptop-H (%ld) vs %ld\n", (unsigned long int)(iptop-(CELL_PTR *)H), total_marked); #endif if (iptop < (CELL_PTR *)ASP && 10*total_marked < H-H0) { #ifdef INSTRUMENT_GC diff --git a/H/Regs.h b/H/Regs.h index 315fdd258..863af5b6e 100644 --- a/H/Regs.h +++ b/H/Regs.h @@ -10,7 +10,7 @@ * File: Regs.h * * mods: * * comments: YAP abstract machine registers * -* version: $Id: Regs.h,v 1.19 2003-02-14 12:06:18 vsc Exp $ * +* version: $Id: Regs.h,v 1.20 2003-02-14 12:20:57 vsc Exp $ * *************************************************************************/ @@ -56,9 +56,6 @@ EXTERN void restore_H(void); EXTERN void save_H(void); EXTERN void restore_B(void); EXTERN void save_B(void); -EXTERN void restore_TR(void); -EXTERN void save_TR(void); - typedef struct { @@ -333,6 +330,9 @@ EXTERN inline void restore_B(void) { #define RECOVER_B() save_B(); B = BK_B +EXTERN void restore_TR(void); +EXTERN void save_TR(void); + EXTERN inline void save_TR(void) { Yap_REGS.TR_ = TR; } @@ -485,6 +485,9 @@ EXTERN inline void restore_B(void) { #define RECOVER_B() save_B(); B = BK_B +EXTERN void restore_TR(void); +EXTERN void save_TR(void); + EXTERN inline void save_TR(void) { Yap_REGS.TR_ = TR; }