<commit_before>/* -----------------------------------------------------------------------------
 *
 * (c) The GHC Team, 1998-2004
 *
 * Stable Pointers: A stable pointer is represented as an index into
 * the stable pointer table in the low BITS_PER_WORD-8 bits with a
 * weight in the upper 8 bits.
 *
 * SUP: StgStablePtr used to be a synonym for StgWord, but stable pointers
 * are guaranteed to be void* on the C-side, so we have to do some occasional
 * casting. Size is not a matter, because StgWord is always the same size as
 * a void*.
 *
 * ---------------------------------------------------------------------------*/

#ifndef STABLE_H
#define STABLE_H

/* -----------------------------------------------------------------------------
   External C Interface
   -------------------------------------------------------------------------- */

EXTERN_INLINE StgPtr  deRefStablePtr(StgStablePtr stable_ptr);
extern void           freeStablePtr(StgStablePtr sp);
extern StgStablePtr   splitStablePtr(StgStablePtr sp);
extern StgStablePtr   getStablePtr(StgPtr p);

/* -----------------------------------------------------------------------------
   PRIVATE from here.
   -------------------------------------------------------------------------- */

typedef struct { 
  StgPtr  addr;			/* Haskell object, free list, or NULL */
  StgPtr  old;			/* old Haskell object, used during GC */
  StgWord ref;			/* used for reference counting */
  StgClosure *sn_obj;		/* the StableName object (or NULL) */
} snEntry;

extern DLL_IMPORT_RTS snEntry *stable_ptr_table;

extern void freeStablePtr(StgStablePtr sp);

EXTERN_INLINE
StgPtr deRefStablePtr(StgStablePtr sp)
{
    ASSERT(stable_ptr_table[(StgWord)sp].ref > 0);
    return stable_ptr_table[(StgWord)sp].addr;
}

extern void    initStablePtrTable    ( void );
extern void    exitStablePtrTable    ( void );
extern void    enlargeStablePtrTable ( void );
extern StgWord lookupStableName      ( StgPtr p );

extern void    markStablePtrTable    ( evac_fn evac, void *user );
extern void    threadStablePtrTable  ( evac_fn evac, void *user );
extern void    gcStablePtrTable      ( void );
extern void    updateStablePtrTable  ( rtsBool full );

extern void    exitHashTable         ( void );

#endif<commit_msg>remove a prototype that shouldn't be here<commit_after>/* -----------------------------------------------------------------------------
 *
 * (c) The GHC Team, 1998-2004
 *
 * Stable Pointers: A stable pointer is represented as an index into
 * the stable pointer table in the low BITS_PER_WORD-8 bits with a
 * weight in the upper 8 bits.
 *
 * SUP: StgStablePtr used to be a synonym for StgWord, but stable pointers
 * are guaranteed to be void* on the C-side, so we have to do some occasional
 * casting. Size is not a matter, because StgWord is always the same size as
 * a void*.
 *
 * ---------------------------------------------------------------------------*/

#ifndef STABLE_H
#define STABLE_H

/* -----------------------------------------------------------------------------
   External C Interface
   -------------------------------------------------------------------------- */

EXTERN_INLINE StgPtr  deRefStablePtr(StgStablePtr stable_ptr);
extern void           freeStablePtr(StgStablePtr sp);
extern StgStablePtr   splitStablePtr(StgStablePtr sp);
extern StgStablePtr   getStablePtr(StgPtr p);

/* -----------------------------------------------------------------------------
   PRIVATE from here.
   -------------------------------------------------------------------------- */

typedef struct { 
  StgPtr  addr;			/* Haskell object, free list, or NULL */
  StgPtr  old;			/* old Haskell object, used during GC */
  StgWord ref;			/* used for reference counting */
  StgClosure *sn_obj;		/* the StableName object (or NULL) */
} snEntry;

extern DLL_IMPORT_RTS snEntry *stable_ptr_table;

extern void freeStablePtr(StgStablePtr sp);

EXTERN_INLINE
StgPtr deRefStablePtr(StgStablePtr sp)
{
    ASSERT(stable_ptr_table[(StgWord)sp].ref > 0);
    return stable_ptr_table[(StgWord)sp].addr;
}

extern void    initStablePtrTable    ( void );
extern void    exitStablePtrTable    ( void );
extern void    enlargeStablePtrTable ( void );
extern StgWord lookupStableName      ( StgPtr p );

extern void    markStablePtrTable    ( evac_fn evac, void *user );
extern void    threadStablePtrTable  ( evac_fn evac, void *user );
extern void    gcStablePtrTable      ( void );
extern void    updateStablePtrTable  ( rtsBool full );

#endif
{'fraction_non_alphanumeric': 0.2650976909413854, 'fraction_numerical': 0.004884547069271759, 'mean_word_length': 1.645331767469172, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3990317', 'n_tokens_mistral': 1282, 'n_tokens_neox': 1197, 'n_words': 393}