Commit ae131923 authored by simonmar's avatar simonmar
Browse files

[project @ 2002-12-19 14:25:04 by simonmar]

Include a static version of deRefStablePtr in case the code that uses
it was compiled without optimisation (and therefore doesn't get the
inlined version).
parent af09c6af
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: Stable.h,v 1.13 2002/08/16 13:29:05 simonmar Exp $ * $Id: Stable.h,v 1.14 2002/12/19 14:25:04 simonmar Exp $
* *
* (c) The GHC Team, 1998-2000 * (c) The GHC Team, 1998-2000
* *
...@@ -41,8 +41,10 @@ extern DLL_IMPORT_RTS snEntry *stable_ptr_table; ...@@ -41,8 +41,10 @@ extern DLL_IMPORT_RTS snEntry *stable_ptr_table;
extern void freeStablePtr(StgStablePtr sp); extern void freeStablePtr(StgStablePtr sp);
extern inline StgPtr #ifndef RTS_STABLE_C
deRefStablePtr(StgStablePtr sp) extern inline
#endif
StgPtr deRefStablePtr(StgStablePtr sp)
{ {
ASSERT(stable_ptr_table[(StgWord)sp].ref > 0); ASSERT(stable_ptr_table[(StgWord)sp].ref > 0);
return stable_ptr_table[(StgWord)sp].addr; return stable_ptr_table[(StgWord)sp].addr;
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: Stable.c,v 1.22 2002/08/16 13:29:07 simonmar Exp $ * $Id: Stable.c,v 1.23 2002/12/19 14:25:05 simonmar Exp $
* *
* (c) The GHC Team, 1998-1999 * (c) The GHC Team, 1998-2002
* *
* Stable names and stable pointers. * Stable names and stable pointers.
* *
* ---------------------------------------------------------------------------*/ * ---------------------------------------------------------------------------*/
// Make static versions of inline functions in Stable.h:
#define RTS_STABLE_C
#include "PosixSource.h" #include "PosixSource.h"
#include "Rts.h" #include "Rts.h"
#include "Hash.h" #include "Hash.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment