projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2003-04-15 14:37:12 by simonmar]
[ghc-hetmet.git]
/
ghc
/
rts
/
Storage.h
diff --git
a/ghc/rts/Storage.h
b/ghc/rts/Storage.h
index
dc86e02
..
79fee9d
100644
(file)
--- a/
ghc/rts/Storage.h
+++ b/
ghc/rts/Storage.h
@@
-1,5
+1,5
@@
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: Storage.h,v 1.49 2003/03/24 14:46:57 simonmar Exp $
+ * $Id: Storage.h,v 1.51 2003/03/27 13:54:32 simonmar Exp $
*
* (c) The GHC Team, 1998-2002
*
*
* (c) The GHC Team, 1998-2002
*
@@
-78,14
+78,12
@@
doYouWantToGC( void )
-------------------------------------------------------------------------- */
#define ExtendNursery(hp,hplim) \
-------------------------------------------------------------------------- */
#define ExtendNursery(hp,hplim) \
- (CurrentNursery->free = (P_)(hp)+1, \
+ (CloseNursery(hp), \
CurrentNursery->link == NULL ? rtsFalse : \
(CurrentNursery = CurrentNursery->link, \
OpenNursery(hp,hplim), \
rtsTrue))
CurrentNursery->link == NULL ? rtsFalse : \
(CurrentNursery = CurrentNursery->link, \
OpenNursery(hp,hplim), \
rtsTrue))
-extern void PleaseStopAllocating(void);
-
/* -----------------------------------------------------------------------------
Performing Garbage Collection
/* -----------------------------------------------------------------------------
Performing Garbage Collection
@@
-165,15
+163,16
@@
recordOldToNewPtrs(StgMutClosure *p)
// We zero out the slop when PROFILING is on.
// #ifndef DEBUG
#if !defined(DEBUG) && !defined(PROFILING)
// We zero out the slop when PROFILING is on.
// #ifndef DEBUG
#if !defined(DEBUG) && !defined(PROFILING)
-#define updateWithIndirection(info, p1, p2) \
+#define updateWithIndirection(info, ind_info, p1, p2, and_then) \
{ \
bdescr *bd; \
\
bd = Bdescr((P_)p1); \
if (bd->gen_no == 0) { \
((StgInd *)p1)->indirectee = p2; \
{ \
bdescr *bd; \
\
bd = Bdescr((P_)p1); \
if (bd->gen_no == 0) { \
((StgInd *)p1)->indirectee = p2; \
- SET_INFO(p1,&stg_IND_info); \
+ SET_INFO(p1,ind_info); \
TICK_UPD_NEW_IND(); \
TICK_UPD_NEW_IND(); \
+ and_then; \
} else { \
((StgIndOldGen *)p1)->indirectee = p2; \
if (info != &stg_BLACKHOLE_BQ_info) { \
} else { \
((StgIndOldGen *)p1)->indirectee = p2; \
if (info != &stg_BLACKHOLE_BQ_info) { \
@@
-184,6
+183,7
@@
recordOldToNewPtrs(StgMutClosure *p)
} \
SET_INFO(p1,&stg_IND_OLDGEN_info); \
TICK_UPD_OLD_IND(); \
} \
SET_INFO(p1,&stg_IND_OLDGEN_info); \
TICK_UPD_OLD_IND(); \
+ and_then; \
} \
}
#elif defined(PROFILING)
} \
}
#elif defined(PROFILING)
@@
-197,7
+197,7
@@
recordOldToNewPtrs(StgMutClosure *p)
// the invariants that every closure keeps its creation time in the profiling
// field. So, we call LDV_recordCreate().
// the invariants that every closure keeps its creation time in the profiling
// field. So, we call LDV_recordCreate().
-#define updateWithIndirection(info, p1, p2) \
+#define updateWithIndirection(info, ind_info, p1, p2, and_then) \
{ \
bdescr *bd; \
\
{ \
bdescr *bd; \
\
@@
-205,9
+205,10
@@
recordOldToNewPtrs(StgMutClosure *p)
bd = Bdescr((P_)p1); \
if (bd->gen_no == 0) { \
((StgInd *)p1)->indirectee = p2; \
bd = Bdescr((P_)p1); \
if (bd->gen_no == 0) { \
((StgInd *)p1)->indirectee = p2; \
- SET_INFO(p1,&stg_IND_info); \
+ SET_INFO(p1,ind_info); \
LDV_recordCreate((p1)); \
TICK_UPD_NEW_IND(); \
LDV_recordCreate((p1)); \
TICK_UPD_NEW_IND(); \
+ and_then; \
} else { \
((StgIndOldGen *)p1)->indirectee = p2; \
if (info != &stg_BLACKHOLE_BQ_info) { \
} else { \
((StgIndOldGen *)p1)->indirectee = p2; \
if (info != &stg_BLACKHOLE_BQ_info) { \
@@
-218,6
+219,7
@@
recordOldToNewPtrs(StgMutClosure *p)
} \
SET_INFO(p1,&stg_IND_OLDGEN_info); \
LDV_recordCreate((p1)); \
} \
SET_INFO(p1,&stg_IND_OLDGEN_info); \
LDV_recordCreate((p1)); \
+ and_then; \
} \
}
} \
}
@@
-231,7
+233,7
@@
recordOldToNewPtrs(StgMutClosure *p)
* already have been updated (the mutable list will get messed up
* otherwise).
*/
* already have been updated (the mutable list will get messed up
* otherwise).
*/
-#define updateWithIndirection(info, p1, p2) \
+#define updateWithIndirection(info, ind_info, p1, p2, and_then) \
{ \
bdescr *bd; \
\
{ \
bdescr *bd; \
\
@@
-239,8
+241,9
@@
recordOldToNewPtrs(StgMutClosure *p)
bd = Bdescr((P_)p1); \
if (bd->gen_no == 0) { \
((StgInd *)p1)->indirectee = p2; \
bd = Bdescr((P_)p1); \
if (bd->gen_no == 0) { \
((StgInd *)p1)->indirectee = p2; \
- SET_INFO(p1,&stg_IND_info); \
+ SET_INFO(p1,ind_info); \
TICK_UPD_NEW_IND(); \
TICK_UPD_NEW_IND(); \
+ and_then; \
} else { \
if (info != &stg_BLACKHOLE_BQ_info) { \
{ \
} else { \
if (info != &stg_BLACKHOLE_BQ_info) { \
{ \
@@
-261,6
+264,7
@@
recordOldToNewPtrs(StgMutClosure *p)
((StgIndOldGen *)p1)->indirectee = p2; \
SET_INFO(p1,&stg_IND_OLDGEN_info); \
TICK_UPD_OLD_IND(); \
((StgIndOldGen *)p1)->indirectee = p2; \
SET_INFO(p1,&stg_IND_OLDGEN_info); \
TICK_UPD_OLD_IND(); \
+ and_then; \
} \
}
#endif
} \
}
#endif