[project @ 1999-05-11 16:47:39 by keithw]
[ghc-hetmet.git] / ghc / rts / Schedule.c
index 165b61f..afd73f8 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.19 1999/03/20 17:33:07 sof Exp $
+ * $Id: Schedule.c,v 1.21 1999/05/11 16:47:57 keithw Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -520,8 +520,13 @@ threadStackOverflow(StgTSO *tso)
     printStackChunk(tso->sp, stg_min(tso->stack+tso->stack_size, 
                                     tso->sp+64));
 #endif
+#ifdef INTERPRETER
+    fprintf(stderr, "fatal: stack overflow in Hugs; aborting\n" );
+    exit(1);
+#else
     /* Send this thread the StackOverflow exception */
     raiseAsync(tso, (StgClosure *)&stackOverflow_closure);
+#endif
     return tso;
   }
 
@@ -750,7 +755,7 @@ raiseAsync(StgTSO *tso, StgClosure *exception)
        * handler in this frame.
        */
       ap = (StgAP_UPD *)allocate(sizeofW(StgPAP) + 1);
-      TICK_ALLOC_THK(2,0);
+      TICK_ALLOC_UPD_PAP(2,0);
       SET_HDR(ap,&PAP_info,cf->header.prof.ccs);
              
       ap->n_args = 1;
@@ -774,7 +779,7 @@ raiseAsync(StgTSO *tso, StgClosure *exception)
      * fun field.
      */
     ap = (StgAP_UPD *)allocate(AP_sizeW(words));
-    TICK_ALLOC_THK(words+1,0);
+    TICK_ALLOC_UP_THK(words+1,0);
     
     ASSERT(words >= 0);
     
@@ -821,7 +826,7 @@ raiseAsync(StgTSO *tso, StgClosure *exception)
        
        /* now build o = FUN(catch,ap,handler) */
        o = (StgClosure *)allocate(sizeofW(StgClosure)+2);
-       TICK_ALLOC_THK(2,0);
+       TICK_ALLOC_SE_THK(2,0);
        SET_HDR(o,&catch_info,su->header.prof.ccs /* ToDo */);
        o->payload[0] = (StgClosure *)ap;
        o->payload[1] = cf->handler;
@@ -847,7 +852,7 @@ raiseAsync(StgTSO *tso, StgClosure *exception)
        
        /* now build o = FUN(seq,ap) */
        o = (StgClosure *)allocate(sizeofW(StgClosure)+1);
-       TICK_ALLOC_THK(1,0);
+       TICK_ALLOC_SE_THK(1,0);
        SET_HDR(o,&seq_info,su->header.prof.ccs /* ToDo */);
        payloadCPtr(o,0) = (StgClosure *)ap;