[project @ 1999-01-14 14:35:04 by simonm]
[ghc-hetmet.git] / ghc / rts / Updates.hc
index e4359d2..0fcd446 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Updates.hc,v 1.2 1998/12/02 13:29:00 simonm Exp $
+ * $Id: Updates.hc,v 1.4 1999/01/14 14:35:04 simonm Exp $
  *
  * Code to perform updates.
  *
@@ -8,6 +8,7 @@
 #include "Rts.h"
 #include "RtsUtils.h"
 #include "HeapStackCheck.h"
+#include "Storage.h"
 
 /*
   The update frame return address must be *polymorphic*, that means
@@ -51,7 +52,7 @@
          TICK_UPD_EXISTING();                                          \
                                                                        \
           updatee = ((StgUpdateFrame *)Sp)->updatee;                   \
-                                                                       \
+                                               \
          /* update the updatee with an indirection to the return value */\
          UPD_IND(updatee,R1.p);                                        \
                                                                        \
@@ -75,7 +76,6 @@ UPD_FRAME_ENTRY_TEMPLATE(Upd_frame_5_entry,RET_VEC(Sp[0],5));
 UPD_FRAME_ENTRY_TEMPLATE(Upd_frame_6_entry,RET_VEC(Sp[0],6));
 UPD_FRAME_ENTRY_TEMPLATE(Upd_frame_7_entry,RET_VEC(Sp[0],7));
 
-
 /*
   Make sure this table is big enough to handle the maximum vectored
   return size!
@@ -173,7 +173,7 @@ STGFUN(PAP_entry)
   /* 
    * Check for stack overflow.
    */
-  STK_CHK(Words,PAP_entry,R2.p,1,);
+  STK_CHK(Words,PAP_entry,R1.p,1,);
   Sp -= Words;
 
   TICK_ENT_PAP(pap);