X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FSMInfoTables.lh;h=5798becb9b8b1f379f8d988bb33f8d32c200a76b;hb=d43f68525f13fff93bed18e9f63ee1c5f962a861;hp=5cbbf0687e3a28e949a7e2b9f80667e7909294ca;hpb=10521d8418fd3a1cf32882718b5bd28992db36fd;p=ghc-hetmet.git diff --git a/ghc/includes/SMInfoTables.lh b/ghc/includes/SMInfoTables.lh index 5cbbf06..5798bec 100644 --- a/ghc/includes/SMInfoTables.lh +++ b/ghc/includes/SMInfoTables.lh @@ -96,8 +96,8 @@ It can have the following values (defined in CostCentre.lh): 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 @@ -197,7 +197,7 @@ use extern declarations almost everywhere except for the single module (\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)); @@ -336,7 +336,7 @@ Otherwise, we add the RBH info table pointer to the end of the normal 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 \ @@ -363,8 +363,13 @@ info table and vice versa. 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} %************************************************************************ @@ -471,6 +476,10 @@ to identify the closure type. #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) @@ -604,7 +613,7 @@ specialised marking code. # 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); @@ -711,7 +720,7 @@ MAYBE_DECLARE_RTBL(Spec_S,12,12) 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[]; \ @@ -873,7 +882,7 @@ Compacting: only the PRStart (marking) routine needs to be special. \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[]; \ @@ -1000,7 +1009,7 @@ MAYBE_DECLARE_RTBL(Gen_S,,) 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[]; \ @@ -1156,7 +1165,7 @@ MAYBE_DECLARE_RTBL(Data,,) } /* Here is the decl for the only DATA info table used! */ -#ifndef COMPILING_GHC +#ifndef COMPILING_NCG EXTDATA_RO(ArrayOfData_info); #endif \end{code} @@ -1228,7 +1237,7 @@ MAYBE_DECLARE_RTBL(ImmuTuple,,) #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); @@ -1274,7 +1283,7 @@ MAYBE_DECLARE_RTBL(Static,,) %************************************************************************ %* * -\subsection[MallocPtr_ITBL]{@MallocPtr_TBL@: @MallocPtr@ info-table} +\subsection[ForeignObj_ITBL]{@ForeignObj_TBL@: @ForeignObj@ info-table} %* * %************************************************************************ @@ -1287,25 +1296,25 @@ I'm assuming @SPEC_N@, so that we don't need to pad out the info table. (JSM) \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 */ @@ -1736,8 +1745,12 @@ during a return. } /* 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}