From ae1319236ce2f672dede0a92f0ed2df318060702 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 19 Dec 2002 14:25:05 +0000 Subject: [PATCH] [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). --- ghc/includes/Stable.h | 8 +++++--- ghc/rts/Stable.c | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ghc/includes/Stable.h b/ghc/includes/Stable.h index 386087e..c4c2077 100644 --- a/ghc/includes/Stable.h +++ b/ghc/includes/Stable.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $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 * @@ -41,8 +41,10 @@ extern DLL_IMPORT_RTS snEntry *stable_ptr_table; extern void freeStablePtr(StgStablePtr sp); -extern inline StgPtr -deRefStablePtr(StgStablePtr sp) +#ifndef RTS_STABLE_C +extern inline +#endif +StgPtr deRefStablePtr(StgStablePtr sp) { ASSERT(stable_ptr_table[(StgWord)sp].ref > 0); return stable_ptr_table[(StgWord)sp].addr; diff --git a/ghc/rts/Stable.c b/ghc/rts/Stable.c index 7bfd15e..d8fe377 100644 --- a/ghc/rts/Stable.c +++ b/ghc/rts/Stable.c @@ -1,12 +1,15 @@ /* ----------------------------------------------------------------------------- - * $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. * * ---------------------------------------------------------------------------*/ +// Make static versions of inline functions in Stable.h: +#define RTS_STABLE_C + #include "PosixSource.h" #include "Rts.h" #include "Hash.h" -- 1.7.10.4