[project @ 2000-01-14 13:17:15 by hwloidl]
authorhwloidl <unknown>
Fri, 14 Jan 2000 13:17:16 +0000 (13:17 +0000)
committerhwloidl <unknown>
Fri, 14 Jan 2000 13:17:16 +0000 (13:17 +0000)
Minor cleanup to get rid of warnings.

ghc/rts/GC.c
ghc/rts/Main.c
ghc/rts/RtsStartup.c
ghc/rts/Schedule.c

index 3665034..22e3a9c 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: GC.c,v 1.69 2000/01/13 14:34:02 hwloidl Exp $
+ * $Id: GC.c,v 1.70 2000/01/14 13:17:15 hwloidl Exp $
  *
  * (c) The GHC Team 1998-1999
  *
@@ -937,15 +937,6 @@ MarkRoot(StgClosure *root)
   return evacuate(root);
 }
 
-//@cindex MarkRootHWL
-StgClosure *
-MarkRootHWL(StgClosure *root)
-{
-  StgClosure *new = evacuate(root);
-  upd_evacuee(root, new);
-  return new;
-}
-
 //@cindex addBlock
 static void addBlock(step *step)
 {
@@ -1189,9 +1180,6 @@ evacuate(StgClosure *q)
   step *step;
   const StgInfoTable *info;
 
-  nat size, ptrs, nonptrs, vhs;
-  char str[80];
-
 loop:
   if (HEAP_ALLOCED(q)) {
     bd = Bdescr((P_)q);
@@ -2724,17 +2712,15 @@ scavenge_stack(StgPtr p, StgPtr stack_end)
     case CATCH_FRAME:
     case SEQ_FRAME:
       {
-       StgPtr old_p = p; // debugging only -- HWL
+       // StgPtr old_p = p; // debugging only -- HWL
       /* stack frames like these are ordinary closures and therefore may 
         contain setup-specific fixed-header words (as in GranSim!);
         therefore, these cases should not use p++ but &(p->payload) -- HWL */
-      IF_DEBUG(gran, IF_DEBUG(sanity, printObj(p)));
+      // IF_DEBUG(gran, IF_DEBUG(sanity, printObj(p)));
       bitmap = info->layout.bitmap;
 
       p = (StgPtr)&(((StgClosure *)p)->payload);
-      IF_DEBUG(sanity, 
-                belch("HWL: scavenge_stack: (STOP|CATCH|SEQ)_FRAME adjusting p from %p to %p (instead of %p)",
-                      old_p, p, old_p+1));
+      // IF_DEBUG(sanity, belch("HWL: scavenge_stack: (STOP|CATCH|SEQ)_FRAME adjusting p from %p to %p (instead of %p)",                      old_p, p, old_p+1));
       goto small_bitmap;
       }
     case RET_BCO:
@@ -3148,7 +3134,7 @@ threadSqueezeStack(StgTSO *tso)
     frame = prev_frame;
 #if DEBUG
     IF_DEBUG(sanity,
-            if (!(frame>=top_frame && frame<=bottom)) {
+            if (!(frame>=top_frame && frame<=(StgUpdateFrame *)bottom)) {
               printObj((StgClosure *)prev_frame);
               barf("threadSqueezeStack: current frame is rubbish %p; previous was %p\n", 
                    frame, prev_frame);
@@ -3356,7 +3342,6 @@ threadPaused(StgTSO *tso)
 void
 printMutOnceList(generation *gen)
 {
-  const StgInfoTable *info;
   StgMutClosure *p, *next, *new_list;
 
   p = gen->mut_once_list;
@@ -3378,7 +3363,6 @@ printMutOnceList(generation *gen)
 void
 printMutableList(generation *gen)
 {
-  const StgInfoTable *info;
   StgMutClosure *p, *next;
 
   p = gen->saved_mut_list;
index 1c721b7..8dc044a 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Main.c,v 1.14 2000/01/13 14:34:03 hwloidl Exp $
+ * $Id: Main.c,v 1.15 2000/01/14 13:17:16 hwloidl Exp $
  *
  * (c) The GHC Team 1998-1999
  *
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
     { /* a wait loop to allow attachment of gdb to UNIX threads */
       nat i, j, s;
 
-      for (i=0, s=0; i<RtsFlags.ParFlags.wait; i++)
+      for (i=0, s=0; i<(nat)RtsFlags.ParFlags.wait; i++)
        for (j=0; j<1000000; j++) 
          s += j % 65536;
     }
index a589b18..a1a2995 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: RtsStartup.c,v 1.26 2000/01/13 14:34:04 hwloidl Exp $
+ * $Id: RtsStartup.c,v 1.27 2000/01/14 13:17:15 hwloidl Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -20,7 +20,7 @@
 #include "Weak.h"
 #include "Ticky.h"
 
-#if defined(PROFILING)
+#if defined(PROFILING) || defined(DEBUG)
 # include "ProfRts.h"
 # include "ProfHeap.h"
 #endif
index 9b7cdf4..9fa7f6a 100644 (file)
@@ -1,5 +1,5 @@
 /* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.42 2000/01/14 11:45:21 hwloidl Exp $
+ * $Id: Schedule.c,v 1.43 2000/01/14 13:17:16 hwloidl Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -1545,9 +1545,10 @@ run_queue_len(void)
 static void GetRoots(void)
 {
   StgMainThread *m;
-  nat i;
 
 #if defined(GRAN)
+  nat i;
+
   for (i=0; i<=RtsFlags.GranFlags.proc; i++) {
     if ((run_queue_hds[i] != END_TSO_QUEUE) && ((run_queue_hds[i] != NULL)))
       run_queue_hds[i]    = (StgTSO *)MarkRoot((StgClosure *)run_queue_hds[i]);
@@ -2798,7 +2799,7 @@ print_bq (StgClosure *node)
        tso=tso->link) {
     ASSERT(tso!=(StgTSO*)NULL && tso!=END_TSO_QUEUE);   // sanity check
     ASSERT(get_itbl(tso)->type == TSO);  // guess what, sanity check
-    fprintf(stderr," TSO %d (%x),", tso->id, tso);
+    fprintf(stderr," TSO %d (%p),", tso->id, tso);
   }
   fputc('\n', stderr);
 }
@@ -2807,17 +2808,6 @@ print_bq (StgClosure *node)
 /* A debugging function used all over the place in GranSim and GUM.
    Dummy function in other setups.
 */
-# if !defined(GRAN) && !defined(PAR)
-char *
-info_type(StgClosure *closure){ 
-  return "petaQ";
-}
-
-char *
-info_type_by_ip(StgInfoTable *ip){ 
-  return "petaQ";
-}
-#endif
 
 static void
 sched_belch(char *s, ...)