/* -----------------------------------------------------------------------------
- * $Id: Updates.hc,v 1.7 1999/01/21 10:31:53 simonm 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
Exception Primitives
-------------------------------------------------------------------------- */
-FN_(catchZh_fast);
-FN_(raiseZh_fast);
+FN_(catchzh_fast);
+FN_(raisezh_fast);
#define CATCH_FRAME_ENTRY_TEMPLATE(label,ret) \
FN_(label); \
FB_
R2.cl = payloadCPtr(R1.cl,1); /* h */
R1.cl = payloadCPtr(R1.cl,0); /* x */
- JMP_(catchZh_fast);
+ JMP_(catchzh_fast);
FE_
}
-FN_(catchZh_fast)
+FN_(catchzh_fast)
{
StgCatchFrame *fp;
FB_
/* args: R1 = m, R2 = k */
- STK_CHK_GEN(sizeofW(StgCatchFrame), R1_PTR | R2_PTR, catchZh_fast, );
+ STK_CHK_GEN(sizeofW(StgCatchFrame), R1_PTR | R2_PTR, catchzh_fast, );
Sp -= sizeofW(StgCatchFrame);
fp = (StgCatchFrame *)Sp;
SET_HDR(fp,(StgInfoTable *)&catch_frame_info,CCCS);
*
* raise = {err} \n {} -> raise#{err}
*
- * It is used in raiseZh_fast to update thunks on the update list
+ * It is used in raisezh_fast to update thunks on the update list
* -------------------------------------------------------------------------- */
INFO_TABLE(raise_info,raise_entry,1,0,FUN,const,EF_,0,0);
{
FB_
R1.cl = R1.cl->payload[0];
- JMP_(raiseZh_fast);
+ JMP_(raisezh_fast);
FE_
}
-FN_(raiseZh_fast)
+FN_(raisezh_fast)
{
StgClosure *handler;
StgUpdateFrame *p;
break;
case STOP_FRAME:
- barf("raiseZh_fast: STOP_FRAME");
+ barf("uncaught exception");
default:
- barf("raiseZh_fast: weird activation record");
+ barf("raisezh_fast: weird activation record");
}
break;