A black hole.
\item[@ARR_K@]
An array.
- \item[@MP_K@]
- A Malloc Pointer.
+ \item[@ForeignObj_K@]
+ A Foreign object (non-Haskell heap resident).
\item[@SPT_K@]
The Stable Pointer table. (There should only be one of these but it
represents a form of weak space leak since it can't shrink to meet
(\tr{Rep.lc}) in which the rep tables are declared locally.
\begin{code}
-#if defined(COMPILING_REP_LC) || defined(COMPILING_GHC)
+#if defined(COMPILING_REP_LC) || defined(COMPILING_NCG)
# define MAYBE_DECLARE_RTBL(l,s,p)
#else
# define MAYBE_DECLARE_RTBL(l,s,p) EXTDATA_RO(MK_REP_REF(l,s,p));
info table and vice versa.
\begin{code}
-#ifdef PAR
+#if defined(PAR) || defined(GRAN)
# define RBH_INFO_OFFSET (GEN_INFO_OFFSET+GEN_INFO_WORDS)
# define INCLUDE_SPEC_PADDING \
EXTFUN(RBH_entry);
P_ convertToRBH PROTO((P_ closure));
+#if defined(GRAN)
+void convertFromRBH PROTO((P_ closure));
+#elif defined(PAR)
void convertToFetchMe PROTO((P_ closure, globalAddr *ga));
#endif
+
+#endif
\end{code}
%************************************************************************
#define INFO_BF_TYPE (MAKE_BASE_INFO_TYPE(21L) | _NS | _MU | _BH)
#define INFO_INTERNAL_TYPE (MAKE_BASE_INFO_TYPE(22L))
+/* S = single-entry thunk
+ U = updatable thunk
+ N = head normal form */
+
#define INFO_SPEC_N_TYPE (INFO_SPEC_TYPE | _NF | _NS)
#define INFO_SPEC_S_TYPE (INFO_SPEC_TYPE | _TH)
#define INFO_SPEC_U_TYPE (INFO_SPEC_TYPE | _UP | _TH)
# define INFO_MARKED_1S(infoptr) (((FP_)(INFO_RTBL(infoptr)))[COMPACTING_INFO_OFFSET+3])
# define INFO_MARKING_1S(infoptr) (((FP_)(INFO_RTBL(infoptr)))[COMPACTING_INFO_OFFSET+4])
-#ifndef COMPILING_GHC
+#ifndef COMPILING_NCG
extern F_ _Dummy_Static_entry(STG_NO_ARGS);
extern F_ _Dummy_Ind_entry(STG_NO_ARGS);
extern F_ _Dummy_Caf_entry(STG_NO_ARGS);
CAT2(_ScanMove_,size),CAT2(_PRIn_,ptrs)) \
}
-#ifdef PAR
+#if defined(PAR) || defined(GRAN)
# define SPEC_U_ITBL(infolbl,entry_code,upd_code,liveness,tag,size,ptrs,localness,entry_localness,kind,descr,type) \
entry_localness(CAT2(RBH_,entry_code)); \
localness W_ infolbl[]; \
\begin{code}
-#ifdef PAR
+#if defined(PAR) || defined(GRAN)
# define SELECT_ITBL(infolbl,entry_code,upd_code,liveness,tag,size,ptrs,localness,entry_localness,select_word_i,kind,descr,type) \
entry_localness(CAT2(RBH_,entry_code)); \
localness W_ infolbl[]; \
INCLUDE_COMPACTING_INFO(_ScanLink_S_N,_PRStart_N,_ScanMove_S,_PRIn_I) \
}
-#ifdef PAR
+#if defined(PAR) || defined(GRAN)
# define GEN_U_ITBL(infolbl,entry_code,upd_code,liveness,tag,size,ptrs,localness,entry_localness,kind,descr,type) \
entry_localness(CAT2(RBH_,entry_code)); \
localness W_ infolbl[]; \
}
/* Here is the decl for the only DATA info table used! */
-#ifndef COMPILING_GHC
+#ifndef COMPILING_NCG
EXTDATA_RO(ArrayOfData_info);
#endif
\end{code}
#endif
/* Here are the decls for the only MUTUPLE info tables used. */
-#ifndef COMPILING_GHC
+#ifndef COMPILING_NCG
EXTDATA_RO(ArrayOfPtrs_info);
EXTDATA_RO(ImMutArrayOfPtrs_info);
EXTDATA_RO(EmptySVar_info);
%************************************************************************
%* *
-\subsection[MallocPtr_ITBL]{@MallocPtr_TBL@: @MallocPtr@ info-table}
+\subsection[ForeignObj_ITBL]{@ForeignObj_TBL@: @ForeignObj@ info-table}
%* *
%************************************************************************
\begin{code}
#if !defined(PAR)
-# define MallocPtr_ITBL(infolbl,entry_code,upd_code,liveness,tag,size,ptrs,localness,entry_localness,kind,descr,type) /*size,ptrs unused*/ \
+# define ForeignObj_ITBL(infolbl,entry_code,upd_code,liveness,tag,size,ptrs,localness,entry_localness,kind,descr,type) /*size,ptrs unused*/ \
CAT_DECLARE(infolbl,kind,descr,type) \
entry_localness(entry_code); \
localness W_ infolbl[] = { \
(W_) entry_code \
,(W_) tag \
- ,(W_) MK_REP_REF(MallocPtr,,) \
+ ,(W_) MK_REP_REF(ForeignObj,,) \
INCLUDE_PROFILING_INFO(infolbl) \
}
-MAYBE_DECLARE_RTBL(MallocPtr,,)
+MAYBE_DECLARE_RTBL(ForeignObj,,)
-# define MallocPtr_RTBL() \
- const W_ MK_REP_LBL(MallocPtr,,)[] = { \
+# define ForeignObj_RTBL() \
+ const W_ MK_REP_LBL(ForeignObj,,)[] = { \
INCLUDE_TYPE_INFO(INTERNAL) \
- INCLUDE_SIZE_INFO(MallocPtr_SIZE, 0L) \
+ INCLUDE_SIZE_INFO(ForeignObj_SIZE, 0L) \
INCLUDE_PAR_INFO \
- INCLUDE_COPYING_INFO(_Evacuate_MallocPtr,_Scavenge_MallocPtr) \
- SPEC_COMPACTING_INFO(_ScanLink_MallocPtr,_PRStart_MallocPtr,_ScanMove_MallocPtr,_PRIn_0) \
+ INCLUDE_COPYING_INFO(_Evacuate_ForeignObj,_Scavenge_ForeignObj) \
+ SPEC_COMPACTING_INFO(_ScanLink_ForeignObj,_PRStart_ForeignObj,_ScanMove_ForeignObj,_PRIn_0) \
}
#endif /* !PAR */
}
/* Declare the phantom info table vectors (just Bool at the moment) */
-#ifndef COMPILING_GHC
-EXTDATA_RO(Bool_itblvtbl);
+#ifndef COMPILING_NCG
+#ifndef aix_TARGET_OS /* AIX gives link errors with this as a const (RO assembler section) */
+EXTDATA_RO(PrelBase_Bool_itblvtbl);
+#else
+extern W_ PrelBase_Bool_itblvtbl[];
+#endif
#endif
\end{code}