-extern inline void
-freeStablePtr(StgStablePtr sp)
-{
- StgWord sn = stgCast(StgWord,sp) & ~STABLEPTR_WEIGHT_MASK;
-
- ASSERT(sn < SPT_size
- && stable_ptr_table[sn].addr != NULL
- && stable_ptr_table[sn].weight > 0);
-
- stable_ptr_table[sn].weight +=
- 1 << ((((StgWord)sp & STABLEPTR_WEIGHT_MASK) >> STABLEPTR_WEIGHT_SHIFT) - 1);
-}
-
-extern inline StgStablePtr
-splitStablePtr(StgStablePtr sp)
-{
- /* doesn't need access to the stable pointer table */
- StgWord weight = (stgCast(StgWord,sp) & STABLEPTR_WEIGHT_MASK) / 2;
- return stgCast(StgStablePtr,(stgCast(StgWord,sp) & ~STABLEPTR_WEIGHT_MASK) + weight);
-}
-
-/* No deRefStableName, because the existence of a stable name doesn't
- * guarantee the existence of the object itself.
- */