/* -----------------------------------------------------------------------------
- * $Id: Updates.hc,v 1.8 1999/01/27 14:51:23 simonpj Exp $
+ * $Id: Updates.hc,v 1.11 1999/03/22 11:26:03 simonm Exp $
+ *
+ * (c) The GHC Team, 1998-1999
*
* Code to perform updates.
*
* either the new PAP or Node.
*/
- Updatee = Su->updatee;
- UPD_IND(Updatee,PapClosure);
-
+ Updatee = Su->updatee;
+
+#if defined(PROFILING)
if (Words != 0) {
+ UPD_IND(Updatee,PapClosure);
TICK_UPD_PAP_IN_NEW(Words+1);
-
} else {
- TICK_UPD_PAP_IN_PLACE();
-
-#if defined(PROFILING)
- /*
- * Lexical scoping requires a *permanent* indirection, and we
+ /* Lexical scoping requires a *permanent* indirection, and we
* also have to set the cost centre for the indirection.
*/
- SET_INFO(Updatee, &IND_PERM_info);
+ UPD_PERM_IND(Updatee,PapClosure);
+ TICK_UPD_PAP_IN_PLACE();
Updatee->header.prof.ccs = CCS_pap;
-#endif /* PROFILING */
}
-
+#else
+ UPD_IND(Updatee,PapClosure);
+ if (Words != 0) {
+ TICK_UPD_PAP_IN_NEW(Words+1);
+ } else {
+ TICK_UPD_PAP_IN_PLACE();
+ }
+#endif
+
#if defined(PROFILING)
/*
* Restore the Cost Centre too (if required); again see Sansom
break;
case STOP_FRAME:
- barf("raisezh_fast: STOP_FRAME");
+ barf("uncaught exception");
default:
barf("raisezh_fast: weird activation record");