Commit d40db603 authored by simonmar's avatar simonmar
Browse files

[project @ 2003-02-06 09:56:07 by simonmar]

rts_mkFunPtr and rts_getFunPtr were missing.  Thanks to Daan Leijen
for spotting and reporting the bug.

MERGE TO STABLE
parent 3e75e4ba
/* ----------------------------------------------------------------------------
* $Id: RtsAPI.h,v 1.33 2003/01/29 09:54:31 simonmar Exp $
* $Id: RtsAPI.h,v 1.34 2003/02/06 09:56:07 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -67,6 +67,7 @@ HaskellObj rts_mkWord16 ( HsWord16 w );
HaskellObj rts_mkWord32 ( HsWord32 w );
HaskellObj rts_mkWord64 ( HsWord64 w );
HaskellObj rts_mkPtr ( HsPtr a );
HaskellObj rts_mkFunPtr ( HsFunPtr a );
HaskellObj rts_mkFloat ( HsFloat f );
HaskellObj rts_mkDouble ( HsDouble f );
HaskellObj rts_mkStablePtr ( HsStablePtr s );
......@@ -90,6 +91,7 @@ HsWord16 rts_getWord16 ( HaskellObj );
HsWord32 rts_getWord32 ( HaskellObj );
HsWord64 rts_getWord64 ( HaskellObj );
HsPtr rts_getPtr ( HaskellObj );
HsFunPtr rts_getFunPtr ( HaskellObj );
HsFloat rts_getFloat ( HaskellObj );
HsDouble rts_getDouble ( HaskellObj );
HsStablePtr rts_getStablePtr ( HaskellObj );
......
/* -----------------------------------------------------------------------------
* $Id: Prelude.h,v 1.21 2002/07/15 08:41:46 simonmar Exp $
* $Id: Prelude.h,v 1.22 2003/02/06 09:56:10 simonmar Exp $
*
* (c) The GHC Team, 1998-2001
*
......@@ -34,6 +34,7 @@ extern DLL_IMPORT const StgInfoTable GHCziFloat_Fzh_static_info;
extern DLL_IMPORT const StgInfoTable GHCziFloat_Dzh_static_info;
extern DLL_IMPORT const StgInfoTable Addr_Azh_static_info;
extern DLL_IMPORT const StgInfoTable GHCziPtr_Ptr_static_info;
extern DLL_IMPORT const StgInfoTable GHCziPtr_FunPtr_static_info;
extern DLL_IMPORT const StgInfoTable GHCziInt_I8zh_static_info;
extern DLL_IMPORT const StgInfoTable GHCziInt_I16zh_static_info;
extern DLL_IMPORT const StgInfoTable GHCziInt_I32zh_static_info;
......@@ -48,6 +49,7 @@ extern DLL_IMPORT const StgInfoTable GHCziBase_Izh_con_info;
extern DLL_IMPORT const StgInfoTable GHCziFloat_Fzh_con_info;
extern DLL_IMPORT const StgInfoTable GHCziFloat_Dzh_con_info;
extern DLL_IMPORT const StgInfoTable GHCziPtr_Ptr_con_info;
extern DLL_IMPORT const StgInfoTable GHCziPtr_FunPtr_con_info;
extern DLL_IMPORT const StgInfoTable Addr_Azh_con_info;
extern DLL_IMPORT const StgInfoTable GHCziWord_Wzh_con_info;
extern DLL_IMPORT const StgInfoTable GHCziInt_I8zh_con_info;
......@@ -90,6 +92,7 @@ extern DLL_IMPORT const StgInfoTable GHCziStable_StablePtr_con_info;
#define W32zh_static_info (&GHCziWord_W32zh_static_info)
#define W64zh_static_info (&GHCziWord_W64zh_static_info)
#define Ptr_static_info (&GHCziPtr_Ptr_static_info)
#define FunPtr_static_info (&GHCziPtr_FunPtr_static_info)
#define Czh_con_info (&GHCziBase_Czh_con_info)
#define Izh_con_info (&GHCziBase_Izh_con_info)
#define Fzh_con_info (&GHCziFloat_Fzh_con_info)
......@@ -106,6 +109,7 @@ extern DLL_IMPORT const StgInfoTable GHCziStable_StablePtr_con_info;
#define I64zh_con_info (&GHCziInt_I64zh_con_info)
#define I64zh_con_info (&GHCziInt_I64zh_con_info)
#define Ptr_con_info (&GHCziPtr_Ptr_con_info)
#define FunPtr_con_info (&GHCziPtr_FunPtr_con_info)
#define StablePtr_static_info (&GHCziStable_StablePtr_static_info)
#define StablePtr_con_info (&GHCziStable_StablePtr_con_info)
......
/* ----------------------------------------------------------------------------
* $Id: RtsAPI.c,v 1.40 2003/01/27 11:08:16 wolfgang Exp $
* $Id: RtsAPI.c,v 1.41 2003/02/06 09:56:10 simonmar Exp $
*
* (c) The GHC Team, 1998-2001
*
......@@ -170,6 +170,15 @@ rts_mkPtr (HsPtr a)
return p;
}
HaskellObj
rts_mkFunPtr (HsFunPtr a)
{
StgClosure *p = (StgClosure *)allocate(sizeofW(StgHeader)+1);
SET_HDR(p, FunPtr_con_info, CCS_SYSTEM);
p->payload[0] = (StgClosure *)a;
return p;
}
#ifdef COMPILER /* GHC has em, Hugs doesn't */
HaskellObj
rts_mkBool (HsBool b)
......
......@@ -120,6 +120,7 @@ Package {
, "-u", "GHCziFloat_Fzh_con_info"
, "-u", "GHCziFloat_Dzh_con_info"
, "-u", "GHCziPtr_Ptr_con_info"
, "-u", "GHCziPtr_FunPtr_con_info"
, "-u", "GHCziStable_StablePtr_con_info"
, "-u", "GHCziBase_False_closure"
, "-u", "GHCziBase_True_closure"
......
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