1 /* -----------------------------------------------------------------------------
3 * (c) The GHC Team, 1998-2009
7 * Do not #include this file directly: #include "Rts.h" instead.
9 * To understand the structure of the RTS headers, see the wiki:
10 * http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes
12 * ---------------------------------------------------------------------------*/
17 EXTERN_INLINE StgPtr deRefStablePtr (StgStablePtr stable_ptr);
18 StgStablePtr getStablePtr (StgPtr p);
20 /* -----------------------------------------------------------------------------
22 -------------------------------------------------------------------------- */
25 StgPtr addr; /* Haskell object, free list, or NULL */
26 StgPtr old; /* old Haskell object, used during GC */
27 StgWord ref; /* used for reference counting */
28 StgClosure *sn_obj; /* the StableName object (or NULL) */
31 extern DLL_IMPORT_RTS snEntry *stable_ptr_table;
34 StgPtr deRefStablePtr(StgStablePtr sp)
36 ASSERT(stable_ptr_table[(StgWord)sp].ref > 0);
37 return stable_ptr_table[(StgWord)sp].addr;
40 #endif /* RTS_STABLE_H */