projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2004-08-22 15:50:39 by panne]
[ghc-hetmet.git]
/
ghc
/
rts
/
Stable.c
diff --git
a/ghc/rts/Stable.c
b/ghc/rts/Stable.c
index
c047469
..
815bac7
100644
(file)
--- a/
ghc/rts/Stable.c
+++ b/
ghc/rts/Stable.c
@@
-1,5
+1,5
@@
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: Stable.c,v 1.27 2003/11/12 17:49:11 sof Exp $
+ * $Id: Stable.c,v 1.29 2004/08/22 15:50:42 panne Exp $
*
* (c) The GHC Team, 1998-2002
*
*
* (c) The GHC Team, 1998-2002
*
@@
-13,7
+13,6
@@
#include "PosixSource.h"
#include "Rts.h"
#include "Hash.h"
#include "PosixSource.h"
#include "Rts.h"
#include "Hash.h"
-#include "StablePriv.h"
#include "RtsUtils.h"
#include "Storage.h"
#include "RtsAPI.h"
#include "RtsUtils.h"
#include "Storage.h"
#include "RtsAPI.h"
@@
-165,6
+164,7
@@
StgWord
lookupStableName(StgPtr p)
{
StgWord sn;
lookupStableName(StgPtr p)
{
StgWord sn;
+ void* sn_tmp;
if (stable_ptr_free == NULL) {
enlargeStablePtrTable();
if (stable_ptr_free == NULL) {
enlargeStablePtrTable();
@@
-175,7
+175,8
@@
lookupStableName(StgPtr p)
*/
p = (StgPtr)removeIndirections((StgClosure*)p);
*/
p = (StgPtr)removeIndirections((StgClosure*)p);
- (void *)sn = lookupHashTable(addrToStableHash,(W_)p);
+ sn_tmp = lookupHashTable(addrToStableHash,(W_)p);
+ sn = (StgWord)sn_tmp;
if (sn != 0) {
ASSERT(stable_ptr_table[sn].addr == p);
if (sn != 0) {
ASSERT(stable_ptr_table[sn].addr == p);
@@
-183,7
+184,7
@@
lookupStableName(StgPtr p)
return sn;
} else {
sn = stable_ptr_free - stable_ptr_table;
return sn;
} else {
sn = stable_ptr_free - stable_ptr_table;
- (P_)stable_ptr_free = stable_ptr_free->addr;
+ stable_ptr_free = (snEntry*)(stable_ptr_free->addr);
stable_ptr_table[sn].ref = 0;
stable_ptr_table[sn].addr = p;
stable_ptr_table[sn].sn_obj = NULL;
stable_ptr_table[sn].ref = 0;
stable_ptr_table[sn].addr = p;
stable_ptr_table[sn].sn_obj = NULL;
@@
-378,7
+379,7
@@
gcStablePtrTable( void )
continue;
} else {
continue;
} else {
- (StgClosure *)p->addr = isAlive((StgClosure *)p->addr);
+ p->addr = (StgPtr)isAlive((StgClosure *)p->addr);
IF_DEBUG(stable, fprintf(stderr,"Stable name %d still alive at %p, ref %d\n", p - stable_ptr_table, p->addr, p->ref));
}
}
IF_DEBUG(stable, fprintf(stderr,"Stable name %d still alive at %p, ref %d\n", p - stable_ptr_table, p->addr, p->ref));
}
}