From 34a98f40dea6d31ced5213b7810dc39b4989c395 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 13 Nov 2000 14:40:38 +0000 Subject: [PATCH] [project @ 2000-11-13 14:40:36 by simonmar] Change the names of several RTS symbols so they don't potentially clash with user code. All the symbols that may clash now have an "stg_" prefix. --- ghc/compiler/absCSyn/CLabel.lhs | 30 ++-- ghc/includes/Assembler.h | 4 +- ghc/includes/ClosureMacros.h | 14 +- ghc/includes/PrimOps.h | 14 +- ghc/includes/SchedAPI.h | 4 +- ghc/includes/StgMacros.h | 16 +- ghc/includes/StgMiscClosures.h | 322 +++++++++++++++++++-------------------- ghc/includes/Updates.h | 28 ++-- ghc/rts/Exception.h | 8 +- ghc/rts/Exception.hc | 48 +++--- ghc/rts/GC.c | 46 +++--- ghc/rts/Linker.c | 60 ++++---- ghc/rts/PrimOps.hc | 80 +++++----- ghc/rts/ProfHeap.c | 4 +- ghc/rts/RtsAPI.c | 4 +- ghc/rts/Sanity.c | 3 +- ghc/rts/Schedule.c | 38 ++--- ghc/rts/Schedule.h | 12 +- ghc/rts/StgCRun.c | 8 +- ghc/rts/StgMiscClosures.hc | 184 +++++++++++----------- ghc/rts/Storage.c | 4 +- ghc/rts/Storage.h | 16 +- ghc/rts/StoragePriv.h | 4 +- ghc/rts/Updates.hc | 40 ++--- ghc/rts/Weak.c | 16 +- 25 files changed, 503 insertions(+), 504 deletions(-) diff --git a/ghc/compiler/absCSyn/CLabel.lhs b/ghc/compiler/absCSyn/CLabel.lhs index a40f559..ab21f74 100644 --- a/ghc/compiler/absCSyn/CLabel.lhs +++ b/ghc/compiler/absCSyn/CLabel.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CLabel.lhs,v 1.41 2000/11/06 08:15:20 simonpj Exp $ +% $Id: CLabel.lhs,v 1.42 2000/11/13 14:40:38 simonmar Exp $ % \section[CLabel]{@CLabel@: Information to make C Labels} @@ -246,19 +246,19 @@ mkStgUpdatePAPLabel = RtsLabel (Rts_Code "stg_update_PAP") mkSplitMarkerLabel = RtsLabel (Rts_Code "__stg_split_marker") mkUpdInfoLabel = RtsLabel RtsUpdInfo mkSeqInfoLabel = RtsLabel RtsSeqInfo -mkIndInfoLabel = RtsLabel (Rts_Info "IND_info") -mkIndStaticInfoLabel = RtsLabel (Rts_Info "IND_STATIC_info") +mkIndInfoLabel = RtsLabel (Rts_Info "stg_IND_info") +mkIndStaticInfoLabel = RtsLabel (Rts_Info "stg_IND_STATIC_info") mkRtsGCEntryLabel str = RtsLabel (RtsGCEntryLabel str) mkMainRegTableLabel = RtsLabel RtsMainRegTable -mkCharlikeClosureLabel = RtsLabel (Rts_Closure "CHARLIKE_closure") -mkIntlikeClosureLabel = RtsLabel (Rts_Closure "INTLIKE_closure") -mkMAP_FROZEN_infoLabel = RtsLabel (Rts_Info "MUT_ARR_PTRS_FROZEN_info") +mkCharlikeClosureLabel = RtsLabel (Rts_Closure "stg_CHARLIKE_closure") +mkIntlikeClosureLabel = RtsLabel (Rts_Closure "stg_INTLIKE_closure") +mkMAP_FROZEN_infoLabel = RtsLabel (Rts_Info "stg_MUT_ARR_PTRS_FROZEN_info") mkTopTickyCtrLabel = RtsLabel RtsTopTickyCtr -mkBlackHoleInfoTableLabel = RtsLabel (RtsBlackHoleInfoTbl SLIT("BLACKHOLE_info")) -mkCAFBlackHoleInfoTableLabel = RtsLabel (RtsBlackHoleInfoTbl SLIT("CAF_BLACKHOLE_info")) +mkBlackHoleInfoTableLabel = RtsLabel (RtsBlackHoleInfoTbl SLIT("stg_BLACKHOLE_info")) +mkCAFBlackHoleInfoTableLabel = RtsLabel (RtsBlackHoleInfoTbl SLIT("stg_CAF_BLACKHOLE_info")) mkSECAFBlackHoleInfoTableLabel = if opt_DoTickyProfiling then - RtsLabel (RtsBlackHoleInfoTbl SLIT("SE_CAF_BLACKHOLE_info")) + RtsLabel (RtsBlackHoleInfoTbl SLIT("stg_SE_CAF_BLACKHOLE_info")) else -- RTS won't have info table unless -ticky is on panic "mkSECAFBlackHoleInfoTableLabel requires -ticky" mkRtsPrimOpLabel primop = RtsLabel (RtsPrimOp primop) @@ -467,8 +467,8 @@ pprCLbl (RtsLabel RtsShouldNeverHappenCode) = ptext SLIT("NULL") -- used to be stg_error_entry but Windows can't have DLL entry points as static -- initialisers, and besides, this ShouldNeverHappen, right? -pprCLbl (RtsLabel RtsUpdInfo) = ptext SLIT("upd_frame_info") -pprCLbl (RtsLabel RtsSeqInfo) = ptext SLIT("seq_frame_info") +pprCLbl (RtsLabel RtsUpdInfo) = ptext SLIT("stg_upd_frame_info") +pprCLbl (RtsLabel RtsSeqInfo) = ptext SLIT("stg_seq_frame_info") pprCLbl (RtsLabel RtsMainRegTable) = ptext SLIT("MainRegTable") pprCLbl (RtsLabel (RtsGCEntryLabel str)) = text str pprCLbl (RtsLabel (Rts_Closure str)) = text str @@ -480,28 +480,28 @@ pprCLbl (RtsLabel RtsTopTickyCtr) = ptext SLIT("top_ct") pprCLbl (RtsLabel (RtsBlackHoleInfoTbl info)) = ptext info pprCLbl (RtsLabel (RtsSelectorInfoTbl upd_reqd offset)) - = hcat [ptext SLIT("__sel_"), text (show offset), + = hcat [ptext SLIT("stg_sel_"), text (show offset), ptext (if upd_reqd then SLIT("_upd_info") else SLIT("_noupd_info")) ] pprCLbl (RtsLabel (RtsSelectorEntry upd_reqd offset)) - = hcat [ptext SLIT("__sel_"), text (show offset), + = hcat [ptext SLIT("stg_sel_"), text (show offset), ptext (if upd_reqd then SLIT("_upd_entry") else SLIT("_noupd_entry")) ] pprCLbl (RtsLabel (RtsApInfoTbl upd_reqd arity)) - = hcat [ptext SLIT("__ap_"), text (show arity), + = hcat [ptext SLIT("stg_ap_"), text (show arity), ptext (if upd_reqd then SLIT("_upd_info") else SLIT("_noupd_info")) ] pprCLbl (RtsLabel (RtsApEntry upd_reqd arity)) - = hcat [ptext SLIT("__ap_"), text (show arity), + = hcat [ptext SLIT("stg_ap_"), text (show arity), ptext (if upd_reqd then SLIT("_upd_entry") else SLIT("_noupd_entry")) diff --git a/ghc/includes/Assembler.h b/ghc/includes/Assembler.h index a1e6050..270a6ee 100644 --- a/ghc/includes/Assembler.h +++ b/ghc/includes/Assembler.h @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------------- - * $Id: Assembler.h,v 1.18 2000/10/09 11:21:41 daan Exp $ + * $Id: Assembler.h,v 1.19 2000/11/13 14:40:36 simonmar Exp $ * * (c) The GHC Team 1994-1998. * @@ -29,7 +29,7 @@ extern void DEBUG_LoadSymbols( char *name ); typedef unsigned char AsmNat8; typedef unsigned int AsmNat; typedef signed int AsmInt; -typedef HsInt64_ AsmInt64; +typedef HsInt64 AsmInt64; typedef unsigned int AsmWord; typedef void* AsmAddr; typedef unsigned char AsmChar; diff --git a/ghc/includes/ClosureMacros.h b/ghc/includes/ClosureMacros.h index e4bddab..30e3dc4 100644 --- a/ghc/includes/ClosureMacros.h +++ b/ghc/includes/ClosureMacros.h @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: ClosureMacros.h,v 1.27 2000/11/07 10:42:56 simonmar Exp $ + * $Id: ClosureMacros.h,v 1.28 2000/11/13 14:40:36 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -153,12 +153,12 @@ extern int is_heap_alloced(const void* x); /* Tiresome predicates needed to check for pointers into the closure tables */ #define IS_CHARLIKE_CLOSURE(p) \ - ( (P_)(p) >= (P_)CHARLIKE_closure && \ - (char*)(p) <= ((char*)CHARLIKE_closure + \ + ( (P_)(p) >= (P_)stg_CHARLIKE_closure && \ + (char*)(p) <= ((char*)stg_CHARLIKE_closure + \ (MAX_CHARLIKE-MIN_CHARLIKE) * sizeof(StgIntCharlikeClosure)) ) #define IS_INTLIKE_CLOSURE(p) \ - ( (P_)(p) >= (P_)INTLIKE_closure && \ - (char*)(p) <= ((char*)INTLIKE_closure + \ + ( (P_)(p) >= (P_)stg_INTLIKE_closure && \ + (char*)(p) <= ((char*)stg_INTLIKE_closure + \ (MAX_INTLIKE-MIN_INTLIKE) * sizeof(StgIntCharlikeClosure)) ) #define LOOKS_LIKE_STATIC_CLOSURE(r) (((*(((unsigned long *)(r))-1)) == 0) || IS_CHARLIKE_CLOSURE(r) || IS_INTLIKE_CLOSURE(r)) @@ -348,8 +348,8 @@ static __inline__ StgWord tso_sizeW ( StgTSO *tso ) INTLIKE and CHARLIKE closures. -------------------------------------------------------------------------- */ -#define CHARLIKE_CLOSURE(n) ((P_)&CHARLIKE_closure[(n)-MIN_CHARLIKE]) -#define INTLIKE_CLOSURE(n) ((P_)&INTLIKE_closure[(n)-MIN_INTLIKE]) +#define CHARLIKE_CLOSURE(n) ((P_)&stg_CHARLIKE_closure[(n)-MIN_CHARLIKE]) +#define INTLIKE_CLOSURE(n) ((P_)&stg_INTLIKE_closure[(n)-MIN_INTLIKE]) /* ----------------------------------------------------------------------------- Closure Tables (for enumerated data types) diff --git a/ghc/includes/PrimOps.h b/ghc/includes/PrimOps.h index a43b185..cf467a4 100644 --- a/ghc/includes/PrimOps.h +++ b/ghc/includes/PrimOps.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: PrimOps.h,v 1.66 2000/11/07 13:30:40 simonmar Exp $ + * $Id: PrimOps.h,v 1.67 2000/11/13 14:40:36 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -547,11 +547,11 @@ LI_ stg_word64ToInt64 (StgWord64); #ifdef DEBUG #define BYTE_ARR_CTS(a) \ - ({ ASSERT(GET_INFO((StgArrWords *)(a)) == &ARR_WORDS_info); \ + ({ ASSERT(GET_INFO((StgArrWords *)(a)) == &stg_ARR_WORDS_info); \ REAL_BYTE_ARR_CTS(a); }) #define PTRS_ARR_CTS(a) \ - ({ ASSERT((GET_INFO((StgMutArrPtrs *)(a)) == &MUT_ARR_PTRS_FROZEN_info) \ - || (GET_INFO((StgMutArrPtrs *)(a)) == &MUT_ARR_PTRS_info)); \ + ({ ASSERT((GET_INFO((StgMutArrPtrs *)(a)) == &stg_MUT_ARR_PTRS_FROZEN_info) \ + || (GET_INFO((StgMutArrPtrs *)(a)) == &stg_MUT_ARR_PTRS_info)); \ REAL_PTRS_ARR_CTS(a); }) #else #define BYTE_ARR_CTS(a) REAL_BYTE_ARR_CTS(a) @@ -619,7 +619,7 @@ extern I_ resetGenSymZh(void); #define unsafeFreezzeArrayzh(r,a) \ { \ - SET_INFO((StgClosure *)a,&MUT_ARR_PTRS_FROZEN_info); \ + SET_INFO((StgClosure *)a,&stg_MUT_ARR_PTRS_FROZEN_info); \ r = a; \ } @@ -691,7 +691,7 @@ EXTFUN_RTS(newMutVarzh_fast); #define sameMVarzh(r,a,b) r=(I_)((a)==(b)) /* Assume external decl of EMPTY_MVAR_info is in scope by now */ -#define isEmptyMVarzh(r,a) r=(I_)((GET_INFO((StgMVar*)(a))) == &EMPTY_MVAR_info ) +#define isEmptyMVarzh(r,a) r=(I_)((GET_INFO((StgMVar*)(a))) == &stg_EMPTY_MVAR_info ) EXTFUN_RTS(newMVarzh_fast); EXTFUN_RTS(takeMVarzh_fast); EXTFUN_RTS(tryTakeMVarzh_fast); @@ -870,7 +870,7 @@ EXTFUN_RTS(mkWeakzh_fast); EXTFUN_RTS(finalizzeWeakzh_fast); #define deRefWeakzh(code,val,w) \ - if (((StgWeak *)w)->header.info == &WEAK_info) { \ + if (((StgWeak *)w)->header.info == &stg_WEAK_info) { \ code = 1; \ val = (P_)((StgWeak *)w)->value; \ } else { \ diff --git a/ghc/includes/SchedAPI.h b/ghc/includes/SchedAPI.h index 05d3ca8..6757a5e 100644 --- a/ghc/includes/SchedAPI.h +++ b/ghc/includes/SchedAPI.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: SchedAPI.h,v 1.10 2000/04/14 15:18:05 sewardj Exp $ + * $Id: SchedAPI.h,v 1.11 2000/11/13 14:40:36 simonmar Exp $ * * (c) The GHC Team 1998 * @@ -82,7 +82,7 @@ createStrictIOThread(nat stack_size, StgClosure *closure) { t = createThread(stack_size); #endif pushClosure(t,closure); - pushClosure(t,(StgClosure*)&forceIO_closure); + pushClosure(t,(StgClosure*)&stg_forceIO_closure); return t; } diff --git a/ghc/includes/StgMacros.h b/ghc/includes/StgMacros.h index a8b3faa..698e7d7 100644 --- a/ghc/includes/StgMacros.h +++ b/ghc/includes/StgMacros.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgMacros.h,v 1.35 2000/11/07 10:42:56 simonmar Exp $ + * $Id: StgMacros.h,v 1.36 2000/11/13 14:40:36 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -422,7 +422,7 @@ EXTINFO_RTS(stg_gen_chk_info); } \ } \ } \ - SET_INFO(R1.cl,&BLACKHOLE_info) + SET_INFO(R1.cl,&stg_BLACKHOLE_info) # define UPD_BH_SINGLE_ENTRY(info) \ TICK_UPD_BH_SINGLE_ENTRY(); \ { \ @@ -436,14 +436,14 @@ EXTINFO_RTS(stg_gen_chk_info); } \ } \ } \ - SET_INFO(R1.cl,&BLACKHOLE_info) + SET_INFO(R1.cl,&stg_BLACKHOLE_info) # else # define UPD_BH_UPDATABLE(info) \ TICK_UPD_BH_UPDATABLE(); \ - SET_INFO(R1.cl,&BLACKHOLE_info) + SET_INFO(R1.cl,&stg_BLACKHOLE_info) # define UPD_BH_SINGLE_ENTRY(info) \ TICK_UPD_BH_SINGLE_ENTRY(); \ - SET_INFO(R1.cl,&SE_BLACKHOLE_info) + SET_INFO(R1.cl,&stg_SE_BLACKHOLE_info) # endif #else /* !EAGER_BLACKHOLING */ # define UPD_BH_UPDATABLE(thunk) /* nothing */ @@ -617,7 +617,7 @@ static inline StgInt64 PK_Int64(W_ p_src[]) Catch frames -------------------------------------------------------------------------- */ -extern DLL_IMPORT_RTS const StgPolyInfoTable catch_frame_info; +extern DLL_IMPORT_RTS const StgPolyInfoTable stg_catch_frame_info; /* ----------------------------------------------------------------------------- Seq frames @@ -626,14 +626,14 @@ extern DLL_IMPORT_RTS const StgPolyInfoTable catch_frame_info; an update... -------------------------------------------------------------------------- */ -extern DLL_IMPORT_RTS const StgPolyInfoTable seq_frame_info; +extern DLL_IMPORT_RTS const StgPolyInfoTable stg_seq_frame_info; #define PUSH_SEQ_FRAME(sp) \ { \ StgSeqFrame *__frame; \ TICK_SEQF_PUSHED(); \ __frame = (StgSeqFrame *)(sp); \ - SET_HDR_(__frame,&seq_frame_info,CCCS); \ + SET_HDR_(__frame,&stg_seq_frame_info,CCCS); \ __frame->link = Su; \ Su = (StgUpdateFrame *)__frame; \ } diff --git a/ghc/includes/StgMiscClosures.h b/ghc/includes/StgMiscClosures.h index 1161d16..1037838 100644 --- a/ghc/includes/StgMiscClosures.h +++ b/ghc/includes/StgMiscClosures.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgMiscClosures.h,v 1.21 2000/11/07 10:42:56 simonmar Exp $ + * $Id: StgMiscClosures.h,v 1.22 2000/11/13 14:40:36 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -14,60 +14,58 @@ /* entry code */ -STGFUN(IND_entry); -STGFUN(IND_STATIC_entry); -STGFUN(IND_PERM_entry); -STGFUN(IND_OLDGEN_entry); -STGFUN(IND_OLDGEN_PERM_entry); -STGFUN(CAF_UNENTERED_entry); -STGFUN(CAF_ENTERED_entry); -STGFUN(CAF_BLACKHOLE_entry); -STGFUN(BLACKHOLE_entry); -STGFUN(BLACKHOLE_BQ_entry); +STGFUN(stg_IND_entry); +STGFUN(stg_IND_STATIC_entry); +STGFUN(stg_IND_PERM_entry); +STGFUN(stg_IND_OLDGEN_entry); +STGFUN(stg_IND_OLDGEN_PERM_entry); +STGFUN(stg_CAF_UNENTERED_entry); +STGFUN(stg_CAF_ENTERED_entry); +STGFUN(stg_CAF_BLACKHOLE_entry); +STGFUN(stg_BLACKHOLE_entry); +STGFUN(stg_BLACKHOLE_BQ_entry); #ifdef SMP -STGFUN(WHITEHOLE_entry); +STGFUN(stg_WHITEHOLE_entry); #endif #ifdef TICKY_TICKY -STGFUN(SE_BLACKHOLE_entry); -STGFUN(SE_CAF_BLACKHOLE_entry); +STGFUN(stg_SE_BLACKHOLE_entry); +STGFUN(stg_SE_CAF_BLACKHOLE_entry); #endif #if defined(PAR) || defined(GRAN) -STGFUN(RBH_entry); +STGFUN(stg_RBH_entry); #endif -STGFUN(BCO_entry); -STGFUN(EVACUATED_entry); -STGFUN(FOREIGN_entry); -STGFUN(WEAK_entry); -STGFUN(NO_FINALIZER_entry); -STGFUN(DEAD_WEAK_entry); -STGFUN(STABLE_NAME_entry); -STGFUN(TSO_entry); -STGFUN(FULL_MVAR_entry); -STGFUN(EMPTY_MVAR_entry); -STGFUN(ARR_WORDS_entry); -STGFUN(MUT_ARR_PTRS_entry); -STGFUN(MUT_ARR_PTRS_FROZEN_entry); -STGFUN(MUT_VAR_entry); -STGFUN(END_TSO_QUEUE_entry); -STGFUN(MUT_CONS_entry); -STGFUN(END_MUT_LIST_entry); -STGFUN(dummy_ret_entry); +STGFUN(stg_BCO_entry); +STGFUN(stg_EVACUATED_entry); +STGFUN(stg_FOREIGN_entry); +STGFUN(stg_WEAK_entry); +STGFUN(stg_NO_FINALIZER_entry); +STGFUN(stg_DEAD_WEAK_entry); +STGFUN(stg_STABLE_NAME_entry); +STGFUN(stg_TSO_entry); +STGFUN(stg_FULL_MVAR_entry); +STGFUN(stg_EMPTY_MVAR_entry); +STGFUN(stg_ARR_WORDS_entry); +STGFUN(stg_MUT_ARR_PTRS_entry); +STGFUN(stg_MUT_ARR_PTRS_FROZEN_entry); +STGFUN(stg_MUT_VAR_entry); +STGFUN(stg_END_TSO_QUEUE_entry); +STGFUN(stg_MUT_CONS_entry); +STGFUN(stg_END_MUT_LIST_entry); +STGFUN(stg_dummy_ret_entry); #ifdef GHCI /* entry code for constructors created by the metacircular interpreter */ -STGFUN(mci_constr_entry); -STGFUN(mci_constr1_entry); -STGFUN(mci_constr2_entry); -STGFUN(mci_constr3_entry); -STGFUN(mci_constr4_entry); -STGFUN(mci_constr5_entry); -STGFUN(mci_constr6_entry); -STGFUN(mci_constr7_entry); -STGFUN(mci_constr8_entry); +STGFUN(stg_mci_constr_entry); +STGFUN(stg_mci_constr1_entry); +STGFUN(stg_mci_constr2_entry); +STGFUN(stg_mci_constr3_entry); +STGFUN(stg_mci_constr4_entry); +STGFUN(stg_mci_constr5_entry); +STGFUN(stg_mci_constr6_entry); +STGFUN(stg_mci_constr7_entry); +STGFUN(stg_mci_constr8_entry); #endif -/* this is the NIL ptr for a TSO queue (e.g. runnable queue) */ -#define END_TSO_QUEUE ((StgTSO *)(void*)&END_TSO_QUEUE_closure) #if defined(PAR) || defined(GRAN) /* this is the NIL ptr for a blocking queue */ # define END_BQ_QUEUE ((StgBlockingQueueElement *)(void*)&END_TSO_QUEUE_closure) @@ -77,65 +75,65 @@ STGFUN(mci_constr8_entry); /* info tables */ -extern DLL_IMPORT_RTS const StgInfoTable IND_info; -extern DLL_IMPORT_RTS const StgInfoTable IND_STATIC_info; -extern DLL_IMPORT_RTS const StgInfoTable IND_PERM_info; -extern DLL_IMPORT_RTS const StgInfoTable IND_OLDGEN_info; -extern DLL_IMPORT_RTS const StgInfoTable IND_OLDGEN_PERM_info; -extern DLL_IMPORT_RTS const StgInfoTable CAF_UNENTERED_info; -extern DLL_IMPORT_RTS const StgInfoTable CAF_ENTERED_info; -extern DLL_IMPORT_RTS const StgInfoTable CAF_BLACKHOLE_info; -extern DLL_IMPORT_RTS const StgInfoTable BLACKHOLE_info; -extern DLL_IMPORT_RTS const StgInfoTable BLACKHOLE_BQ_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_IND_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_IND_STATIC_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_IND_PERM_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_IND_OLDGEN_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_IND_OLDGEN_PERM_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_CAF_UNENTERED_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_CAF_ENTERED_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_CAF_BLACKHOLE_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_BLACKHOLE_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_BLACKHOLE_BQ_info; #ifdef SMP -extern DLL_IMPORT_RTS const StgInfoTable WHITEHOLE_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_WHITEHOLE_info; #endif #ifdef TICKY_TICKY -extern DLL_IMPORT_RTS const StgInfoTable SE_BLACKHOLE_info; -extern DLL_IMPORT_RTS const StgInfoTable SE_CAF_BLACKHOLE_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_SE_BLACKHOLE_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_SE_CAF_BLACKHOLE_info; #endif #if defined(PAR) || defined(GRAN) -extern DLL_IMPORT_RTS const StgInfoTable RBH_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_RBH_info; #endif -extern DLL_IMPORT_RTS const StgInfoTable BCO_info; -extern DLL_IMPORT_RTS const StgInfoTable EVACUATED_info; -extern DLL_IMPORT_RTS const StgInfoTable FOREIGN_info; -extern DLL_IMPORT_RTS const StgInfoTable WEAK_info; -extern DLL_IMPORT_RTS const StgInfoTable DEAD_WEAK_info; -extern DLL_IMPORT_RTS const StgInfoTable STABLE_NAME_info; -extern DLL_IMPORT_RTS const StgInfoTable FULL_MVAR_info; -extern DLL_IMPORT_RTS const StgInfoTable EMPTY_MVAR_info; -extern DLL_IMPORT_RTS const StgInfoTable TSO_info; -extern DLL_IMPORT_RTS const StgInfoTable ARR_WORDS_info; -extern DLL_IMPORT_RTS const StgInfoTable MUT_ARR_WORDS_info; -extern DLL_IMPORT_RTS const StgInfoTable MUT_ARR_PTRS_info; -extern DLL_IMPORT_RTS const StgInfoTable MUT_ARR_PTRS_FROZEN_info; -extern DLL_IMPORT_RTS const StgInfoTable MUT_VAR_info; -extern DLL_IMPORT_RTS const StgInfoTable END_TSO_QUEUE_info; -extern DLL_IMPORT_RTS const StgInfoTable MUT_CONS_info; -extern DLL_IMPORT_RTS const StgInfoTable END_MUT_LIST_info; -extern DLL_IMPORT_RTS const StgInfoTable catch_info; -extern DLL_IMPORT_RTS const StgInfoTable seq_info; -extern DLL_IMPORT_RTS const StgInfoTable dummy_ret_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_BCO_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_EVACUATED_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_FOREIGN_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_WEAK_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_DEAD_WEAK_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_STABLE_NAME_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_FULL_MVAR_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_EMPTY_MVAR_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_TSO_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_ARR_WORDS_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_ARR_WORDS_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_ARR_PTRS_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_ARR_PTRS_FROZEN_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_VAR_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_END_TSO_QUEUE_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_CONS_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_END_MUT_LIST_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_catch_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_seq_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_dummy_ret_info; #ifdef INTERPRETER EXTFUN(Hugs_CONSTR_entry); -extern const vec_info_8 ret_bco_info; +extern const vec_info_8 stg_ret_bco_info; #endif /* INTERPRETER */ /* closures */ -extern DLL_IMPORT_RTS StgClosure END_TSO_QUEUE_closure; -extern DLL_IMPORT_RTS StgClosure END_MUT_LIST_closure; -extern DLL_IMPORT_RTS StgClosure NO_FINALIZER_closure; -extern DLL_IMPORT_RTS StgClosure dummy_ret_closure; -extern DLL_IMPORT_RTS StgClosure forceIO_closure; +extern DLL_IMPORT_RTS StgClosure stg_END_TSO_QUEUE_closure; +extern DLL_IMPORT_RTS StgClosure stg_END_MUT_LIST_closure; +extern DLL_IMPORT_RTS StgClosure stg_NO_FINALIZER_closure; +extern DLL_IMPORT_RTS StgClosure stg_dummy_ret_closure; +extern DLL_IMPORT_RTS StgClosure stg_forceIO_closure; -extern DLL_IMPORT_RTS StgIntCharlikeClosure CHARLIKE_closure[]; -extern DLL_IMPORT_RTS StgIntCharlikeClosure INTLIKE_closure[]; +extern DLL_IMPORT_RTS StgIntCharlikeClosure stg_CHARLIKE_closure[]; +extern DLL_IMPORT_RTS StgIntCharlikeClosure stg_INTLIKE_closure[]; /* standard entry points */ @@ -145,86 +143,86 @@ extern DLL_IMPORT_RTS StgIntCharlikeClosure INTLIKE_closure[]; /* standard selector thunks */ -EXTINFO_RTS __sel_0_upd_info; -EXTINFO_RTS __sel_1_upd_info; -EXTINFO_RTS __sel_2_upd_info; -EXTINFO_RTS __sel_3_upd_info; -EXTINFO_RTS __sel_4_upd_info; -EXTINFO_RTS __sel_5_upd_info; -EXTINFO_RTS __sel_6_upd_info; -EXTINFO_RTS __sel_7_upd_info; -EXTINFO_RTS __sel_8_upd_info; -EXTINFO_RTS __sel_8_upd_info; -EXTINFO_RTS __sel_9_upd_info; -EXTINFO_RTS __sel_10_upd_info; -EXTINFO_RTS __sel_11_upd_info; -EXTINFO_RTS __sel_12_upd_info; -EXTINFO_RTS __sel_13_upd_info; -EXTINFO_RTS __sel_14_upd_info; -EXTINFO_RTS __sel_15_upd_info; - -EXTINFO_RTS __sel_0_noupd_info; -EXTINFO_RTS __sel_1_noupd_info; -EXTINFO_RTS __sel_2_noupd_info; -EXTINFO_RTS __sel_3_noupd_info; -EXTINFO_RTS __sel_4_noupd_info; -EXTINFO_RTS __sel_5_noupd_info; -EXTINFO_RTS __sel_6_noupd_info; -EXTINFO_RTS __sel_7_noupd_info; -EXTINFO_RTS __sel_8_noupd_info; -EXTINFO_RTS __sel_9_noupd_info; -EXTINFO_RTS __sel_10_noupd_info; -EXTINFO_RTS __sel_11_noupd_info; -EXTINFO_RTS __sel_12_noupd_info; -EXTINFO_RTS __sel_13_noupd_info; -EXTINFO_RTS __sel_14_noupd_info; -EXTINFO_RTS __sel_15_noupd_info; +EXTINFO_RTS stg_sel_0_upd_info; +EXTINFO_RTS stg_sel_1_upd_info; +EXTINFO_RTS stg_sel_2_upd_info; +EXTINFO_RTS stg_sel_3_upd_info; +EXTINFO_RTS stg_sel_4_upd_info; +EXTINFO_RTS stg_sel_5_upd_info; +EXTINFO_RTS stg_sel_6_upd_info; +EXTINFO_RTS stg_sel_7_upd_info; +EXTINFO_RTS stg_sel_8_upd_info; +EXTINFO_RTS stg_sel_8_upd_info; +EXTINFO_RTS stg_sel_9_upd_info; +EXTINFO_RTS stg_sel_10_upd_info; +EXTINFO_RTS stg_sel_11_upd_info; +EXTINFO_RTS stg_sel_12_upd_info; +EXTINFO_RTS stg_sel_13_upd_info; +EXTINFO_RTS stg_sel_14_upd_info; +EXTINFO_RTS stg_sel_15_upd_info; + +EXTINFO_RTS stg_sel_0_noupd_info; +EXTINFO_RTS stg_sel_1_noupd_info; +EXTINFO_RTS stg_sel_2_noupd_info; +EXTINFO_RTS stg_sel_3_noupd_info; +EXTINFO_RTS stg_sel_4_noupd_info; +EXTINFO_RTS stg_sel_5_noupd_info; +EXTINFO_RTS stg_sel_6_noupd_info; +EXTINFO_RTS stg_sel_7_noupd_info; +EXTINFO_RTS stg_sel_8_noupd_info; +EXTINFO_RTS stg_sel_9_noupd_info; +EXTINFO_RTS stg_sel_10_noupd_info; +EXTINFO_RTS stg_sel_11_noupd_info; +EXTINFO_RTS stg_sel_12_noupd_info; +EXTINFO_RTS stg_sel_13_noupd_info; +EXTINFO_RTS stg_sel_14_noupd_info; +EXTINFO_RTS stg_sel_15_noupd_info; /* and their standard entry points -- KSW 1998-12 */ -EXTFUN_RTS(__sel_0_upd_entry); -EXTFUN_RTS(__sel_1_upd_entry); -EXTFUN_RTS(__sel_2_upd_entry); -EXTFUN_RTS(__sel_3_upd_entry); -EXTFUN_RTS(__sel_4_upd_entry); -EXTFUN_RTS(__sel_5_upd_entry); -EXTFUN_RTS(__sel_6_upd_entry); -EXTFUN_RTS(__sel_7_upd_entry); -EXTFUN_RTS(__sel_8_upd_entry); -EXTFUN_RTS(__sel_8_upd_entry); -EXTFUN_RTS(__sel_9_upd_entry); -EXTFUN_RTS(__sel_10_upd_entry); -EXTFUN_RTS(__sel_11_upd_entry); -EXTFUN_RTS(__sel_12_upd_entry); -EXTFUN_RTS(__sel_13_upd_entry); -EXTFUN_RTS(__sel_14_upd_entry); -EXTFUN_RTS(__sel_15_upd_entry); - -EXTFUN_RTS(__sel_0_noupd_entry); -EXTFUN_RTS(__sel_1_noupd_entry); -EXTFUN_RTS(__sel_2_noupd_entry); -EXTFUN_RTS(__sel_3_noupd_entry); -EXTFUN_RTS(__sel_4_noupd_entry); -EXTFUN_RTS(__sel_5_noupd_entry); -EXTFUN_RTS(__sel_6_noupd_entry); -EXTFUN_RTS(__sel_7_noupd_entry); -EXTFUN_RTS(__sel_8_noupd_entry); -EXTFUN_RTS(__sel_9_noupd_entry); -EXTFUN_RTS(__sel_10_noupd_entry); -EXTFUN_RTS(__sel_11_noupd_entry); -EXTFUN_RTS(__sel_12_noupd_entry); -EXTFUN_RTS(__sel_13_noupd_entry); -EXTFUN_RTS(__sel_14_noupd_entry); -EXTFUN_RTS(__sel_15_noupd_entry); +EXTFUN_RTS(stg_sel_0_upd_entry); +EXTFUN_RTS(stg_sel_1_upd_entry); +EXTFUN_RTS(stg_sel_2_upd_entry); +EXTFUN_RTS(stg_sel_3_upd_entry); +EXTFUN_RTS(stg_sel_4_upd_entry); +EXTFUN_RTS(stg_sel_5_upd_entry); +EXTFUN_RTS(stg_sel_6_upd_entry); +EXTFUN_RTS(stg_sel_7_upd_entry); +EXTFUN_RTS(stg_sel_8_upd_entry); +EXTFUN_RTS(stg_sel_8_upd_entry); +EXTFUN_RTS(stg_sel_9_upd_entry); +EXTFUN_RTS(stg_sel_10_upd_entry); +EXTFUN_RTS(stg_sel_11_upd_entry); +EXTFUN_RTS(stg_sel_12_upd_entry); +EXTFUN_RTS(stg_sel_13_upd_entry); +EXTFUN_RTS(stg_sel_14_upd_entry); +EXTFUN_RTS(stg_sel_15_upd_entry); + +EXTFUN_RTS(stg_sel_0_noupd_entry); +EXTFUN_RTS(stg_sel_1_noupd_entry); +EXTFUN_RTS(stg_sel_2_noupd_entry); +EXTFUN_RTS(stg_sel_3_noupd_entry); +EXTFUN_RTS(stg_sel_4_noupd_entry); +EXTFUN_RTS(stg_sel_5_noupd_entry); +EXTFUN_RTS(stg_sel_6_noupd_entry); +EXTFUN_RTS(stg_sel_7_noupd_entry); +EXTFUN_RTS(stg_sel_8_noupd_entry); +EXTFUN_RTS(stg_sel_9_noupd_entry); +EXTFUN_RTS(stg_sel_10_noupd_entry); +EXTFUN_RTS(stg_sel_11_noupd_entry); +EXTFUN_RTS(stg_sel_12_noupd_entry); +EXTFUN_RTS(stg_sel_13_noupd_entry); +EXTFUN_RTS(stg_sel_14_noupd_entry); +EXTFUN_RTS(stg_sel_15_noupd_entry); /* standard ap thunks */ -EXTINFO_RTS __ap_1_upd_info; -EXTINFO_RTS __ap_2_upd_info; -EXTINFO_RTS __ap_3_upd_info; -EXTINFO_RTS __ap_4_upd_info; -EXTINFO_RTS __ap_5_upd_info; -EXTINFO_RTS __ap_6_upd_info; -EXTINFO_RTS __ap_7_upd_info; -EXTINFO_RTS __ap_8_upd_info; +EXTINFO_RTS stg_ap_1_upd_info; +EXTINFO_RTS stg_ap_2_upd_info; +EXTINFO_RTS stg_ap_3_upd_info; +EXTINFO_RTS stg_ap_4_upd_info; +EXTINFO_RTS stg_ap_5_upd_info; +EXTINFO_RTS stg_ap_6_upd_info; +EXTINFO_RTS stg_ap_7_upd_info; +EXTINFO_RTS stg_ap_8_upd_info; diff --git a/ghc/includes/Updates.h b/ghc/includes/Updates.h index 3c7633a..8b5ff8e 100644 --- a/ghc/includes/Updates.h +++ b/ghc/includes/Updates.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Updates.h,v 1.19 2000/11/07 10:42:56 simonmar Exp $ + * $Id: Updates.h,v 1.20 2000/11/13 14:40:36 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -123,8 +123,8 @@ extern void awakenBlockedQueue(StgBlockingQueueElement *q, StgClosure *node); #define DO_AWAKEN_BQ(bqe, node) STGCALL2(awakenBlockedQueue, bqe, node); #define AWAKEN_BQ(info,closure) \ - if (info == &BLACKHOLE_BQ_info || \ - info == &FETCH_ME_BQ_info || \ + if (info == &stg_BLACKHOLE_BQ_info || \ + info == &stg_FETCH_ME_BQ_info || \ get_itbl(closure)->type == RBH) { \ StgBlockingQueueElement *bqe = ((StgBlockingQueue *)closure)->blocking_queue;\ ASSERT(bqe!=END_BQ_QUEUE); \ @@ -140,7 +140,7 @@ extern void awakenBlockedQueue(StgBlockingQueueElement *q, StgClosure *node); not checked. The rest of the code is the same as for GUM. */ #define AWAKEN_BQ(info,closure) \ - if (info == &BLACKHOLE_BQ_info || \ + if (info == &stg_BLACKHOLE_BQ_info || \ get_itbl(closure)->type == RBH) { \ StgBlockingQueueElement *bqe = ((StgBlockingQueue *)closure)->blocking_queue;\ ASSERT(bqe!=END_BQ_QUEUE); \ @@ -156,7 +156,7 @@ extern void awakenBlockedQueue(StgTSO *q); ((StgBlockingQueue *)closure)->blocking_queue); #define AWAKEN_BQ(info,closure) \ - if (info == &BLACKHOLE_BQ_info) { \ + if (info == &stg_BLACKHOLE_BQ_info) { \ DO_AWAKEN_BQ(closure); \ } @@ -172,14 +172,14 @@ extern void awakenBlockedQueue(StgTSO *q); #define PUSH_STD_CCCS(frame) #endif -extern DLL_IMPORT_RTS const StgPolyInfoTable upd_frame_info; +extern DLL_IMPORT_RTS const StgPolyInfoTable stg_upd_frame_info; #define PUSH_UPD_FRAME(target, Sp_offset) \ { \ StgUpdateFrame *__frame; \ TICK_UPDF_PUSHED(target, GET_INFO((StgClosure*)target)); \ __frame = (StgUpdateFrame *)(Sp + (Sp_offset)) - 1; \ - SET_INFO(__frame, (StgInfoTable *)&upd_frame_info); \ + SET_INFO(__frame, (StgInfoTable *)&stg_upd_frame_info); \ __frame->link = Su; \ __frame->updatee = (StgClosure *)(target); \ PUSH_STD_CCCS(__frame); \ @@ -221,7 +221,7 @@ extern void newCAF(StgClosure*); LOCK_CLOSURE(cafptr); \ STGCALL1(newCAF,(StgClosure *)cafptr); \ ((StgInd *)cafptr)->indirectee = (StgClosure *)(bhptr); \ - SET_INFO((StgInd *)cafptr,(const StgInfoTable*)&IND_STATIC_info); \ + SET_INFO((StgInd *)cafptr,(const StgInfoTable*)&stg_IND_STATIC_info);\ } #ifdef INTERPRETER @@ -232,16 +232,16 @@ extern void newCAF_made_by_Hugs(StgCAF*); Update-related prototypes -------------------------------------------------------------------------- */ -DLL_IMPORT_RTS extern STGFUN(upd_frame_entry); +DLL_IMPORT_RTS extern STGFUN(stg_upd_frame_entry); -extern DLL_IMPORT_RTS const StgInfoTable PAP_info; -DLL_IMPORT_RTS STGFUN(PAP_entry); +extern DLL_IMPORT_RTS const StgInfoTable stg_PAP_info; +DLL_IMPORT_RTS STGFUN(stg_PAP_entry); EXTFUN_RTS(stg_update_PAP); -extern DLL_IMPORT_RTS const StgInfoTable AP_UPD_info; -DLL_IMPORT_RTS STGFUN(AP_UPD_entry); +extern DLL_IMPORT_RTS const StgInfoTable stg_AP_UPD_info; +DLL_IMPORT_RTS STGFUN(stg_AP_UPD_entry); -extern DLL_IMPORT_RTS const StgInfoTable raise_info; +extern DLL_IMPORT_RTS const StgInfoTable stg_raise_info; #endif /* UPDATES_H */ diff --git a/ghc/rts/Exception.h b/ghc/rts/Exception.h index 251a957..3e150f9 100644 --- a/ghc/rts/Exception.h +++ b/ghc/rts/Exception.h @@ -1,14 +1,14 @@ /* ----------------------------------------------------------------------------- - * $Id: Exception.h,v 1.2 2000/03/17 10:24:44 simonmar Exp $ + * $Id: Exception.h,v 1.3 2000/11/13 14:40:37 simonmar Exp $ * - * (c) The GHC Team, 1998-1999 + * (c) The GHC Team, 1998-2000 * * Exception support * * ---------------------------------------------------------------------------*/ -extern const StgInfoTable blockAsyncExceptionszh_ret_info; -extern const StgInfoTable unblockAsyncExceptionszh_ret_info; +extern const StgInfoTable stg_blockAsyncExceptionszh_ret_info; +extern const StgInfoTable stg_unblockAsyncExceptionszh_ret_info; /* Determine whether a thread is interruptible (ie. blocked * indefinitely). Interruptible threads can be sent an exception with diff --git a/ghc/rts/Exception.hc b/ghc/rts/Exception.hc index e11304a..d3605bd 100644 --- a/ghc/rts/Exception.hc +++ b/ghc/rts/Exception.hc @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- - * $Id: Exception.hc,v 1.14 2000/05/25 09:16:56 simonmar Exp $ + * $Id: Exception.hc,v 1.15 2000/11/13 14:40:37 simonmar Exp $ * - * (c) The GHC Team, 1998-1999 + * (c) The GHC Team, 1998-2000 * * Exception support * @@ -55,11 +55,11 @@ FN_(blockAsyncExceptionszh_fast) if (CurrentTSO->blocked_exceptions == NULL) { CurrentTSO->blocked_exceptions = END_TSO_QUEUE; /* avoid growing the stack unnecessarily */ - if (Sp[0] == (W_)&blockAsyncExceptionszh_ret_info) { + if (Sp[0] == (W_)&stg_blockAsyncExceptionszh_ret_info) { Sp++; } else { Sp--; - Sp[0] = (W_)&unblockAsyncExceptionszh_ret_info; + Sp[0] = (W_)&stg_unblockAsyncExceptionszh_ret_info; } } Sp--; @@ -68,8 +68,8 @@ FN_(blockAsyncExceptionszh_fast) FE_ } -INFO_TABLE_SRT_BITMAP(unblockAsyncExceptionszh_ret_info, unblockAsyncExceptionszh_ret_entry, 0, 0, 0, 0, RET_SMALL, , EF_, 0, 0); -FN_(unblockAsyncExceptionszh_ret_entry) +INFO_TABLE_SRT_BITMAP(stg_unblockAsyncExceptionszh_ret_info, stg_unblockAsyncExceptionszh_ret_entry, 0, 0, 0, 0, RET_SMALL, , EF_, 0, 0); +FN_(stg_unblockAsyncExceptionszh_ret_entry) { FB_ ASSERT(CurrentTSO->blocked_exceptions != NULL); @@ -117,11 +117,11 @@ FN_(unblockAsyncExceptionszh_fast) CurrentTSO->blocked_exceptions = NULL; /* avoid growing the stack unnecessarily */ - if (Sp[0] == (W_)&unblockAsyncExceptionszh_ret_info) { + if (Sp[0] == (W_)&stg_unblockAsyncExceptionszh_ret_info) { Sp++; } else { Sp--; - Sp[0] = (W_)&blockAsyncExceptionszh_ret_info; + Sp[0] = (W_)&stg_blockAsyncExceptionszh_ret_info; } } Sp--; @@ -130,8 +130,8 @@ FN_(unblockAsyncExceptionszh_fast) FE_ } -INFO_TABLE_SRT_BITMAP(blockAsyncExceptionszh_ret_info, blockAsyncExceptionszh_ret_entry, 0, 0, 0, 0, RET_SMALL, , EF_, 0, 0); -FN_(blockAsyncExceptionszh_ret_entry) +INFO_TABLE_SRT_BITMAP(stg_blockAsyncExceptionszh_ret_info, stg_blockAsyncExceptionszh_ret_entry, 0, 0, 0, 0, RET_SMALL, , EF_, 0, 0); +FN_(stg_blockAsyncExceptionszh_ret_entry) { FB_ ASSERT(CurrentTSO->blocked_exceptions == NULL); @@ -249,15 +249,15 @@ FN_(killThreadzh_fast) #define SP_OFF 1 #endif -CATCH_FRAME_ENTRY_TEMPLATE(catch_frame_entry,ENTRY_CODE(Sp[SP_OFF])); -CATCH_FRAME_ENTRY_TEMPLATE(catch_frame_0_entry,RET_VEC(Sp[SP_OFF],0)); -CATCH_FRAME_ENTRY_TEMPLATE(catch_frame_1_entry,RET_VEC(Sp[SP_OFF],1)); -CATCH_FRAME_ENTRY_TEMPLATE(catch_frame_2_entry,RET_VEC(Sp[SP_OFF],2)); -CATCH_FRAME_ENTRY_TEMPLATE(catch_frame_3_entry,RET_VEC(Sp[SP_OFF],3)); -CATCH_FRAME_ENTRY_TEMPLATE(catch_frame_4_entry,RET_VEC(Sp[SP_OFF],4)); -CATCH_FRAME_ENTRY_TEMPLATE(catch_frame_5_entry,RET_VEC(Sp[SP_OFF],5)); -CATCH_FRAME_ENTRY_TEMPLATE(catch_frame_6_entry,RET_VEC(Sp[SP_OFF],6)); -CATCH_FRAME_ENTRY_TEMPLATE(catch_frame_7_entry,RET_VEC(Sp[SP_OFF],7)); +CATCH_FRAME_ENTRY_TEMPLATE(stg_catch_frame_entry,ENTRY_CODE(Sp[SP_OFF])); +CATCH_FRAME_ENTRY_TEMPLATE(stg_catch_frame_0_entry,RET_VEC(Sp[SP_OFF],0)); +CATCH_FRAME_ENTRY_TEMPLATE(stg_catch_frame_1_entry,RET_VEC(Sp[SP_OFF],1)); +CATCH_FRAME_ENTRY_TEMPLATE(stg_catch_frame_2_entry,RET_VEC(Sp[SP_OFF],2)); +CATCH_FRAME_ENTRY_TEMPLATE(stg_catch_frame_3_entry,RET_VEC(Sp[SP_OFF],3)); +CATCH_FRAME_ENTRY_TEMPLATE(stg_catch_frame_4_entry,RET_VEC(Sp[SP_OFF],4)); +CATCH_FRAME_ENTRY_TEMPLATE(stg_catch_frame_5_entry,RET_VEC(Sp[SP_OFF],5)); +CATCH_FRAME_ENTRY_TEMPLATE(stg_catch_frame_6_entry,RET_VEC(Sp[SP_OFF],6)); +CATCH_FRAME_ENTRY_TEMPLATE(stg_catch_frame_7_entry,RET_VEC(Sp[SP_OFF],7)); #ifdef PROFILING #define CATCH_FRAME_BITMAP 7 @@ -270,7 +270,7 @@ CATCH_FRAME_ENTRY_TEMPLATE(catch_frame_7_entry,RET_VEC(Sp[SP_OFF],7)); * kind of return to the activation record underneath us on the stack. */ -VEC_POLY_INFO_TABLE(catch_frame, CATCH_FRAME_BITMAP, NULL/*srt*/, 0/*srt_off*/, 0/*srt_len*/, CATCH_FRAME,, EF_); +VEC_POLY_INFO_TABLE(stg_catch_frame, CATCH_FRAME_BITMAP, NULL/*srt*/, 0/*srt_off*/, 0/*srt_len*/, CATCH_FRAME,, EF_); /* ----------------------------------------------------------------------------- * The catch infotable @@ -303,7 +303,7 @@ FN_(catchzh_fast) /* Set up the catch frame */ Sp -= sizeofW(StgCatchFrame); fp = (StgCatchFrame *)Sp; - SET_HDR(fp,(StgInfoTable *)&catch_frame_info,CCCS); + SET_HDR(fp,(StgInfoTable *)&stg_catch_frame_info,CCCS); fp -> handler = R2.cl; fp -> exceptions_blocked = (CurrentTSO->blocked_exceptions != NULL); fp -> link = Su; @@ -329,7 +329,7 @@ FN_(catchzh_fast) * It is used in raisezh_fast to update thunks on the update list * -------------------------------------------------------------------------- */ -INFO_TABLE(raise_info,raise_entry,1,0,THUNK,,EF_,0,0); +INFO_TABLE(stg_raise_info,raise_entry,1,0,THUNK,,EF_,0,0); STGFUN(raise_entry) { FB_ @@ -368,7 +368,7 @@ FN_(raisezh_fast) */ raise_closure = (StgClosure *)RET_STGCALL1(P_,allocate, sizeofW(StgClosure)+1); - raise_closure->header.info = &raise_info; + raise_closure->header.info = &stg_raise_info; raise_closure->payload[0] = R1.cl; while (1) { @@ -422,7 +422,7 @@ FN_(raisezh_fast) * unblockAsyncExceptions_ret stack frame. */ if (! ((StgCatchFrame *)p)->exceptions_blocked) { - *(--Sp) = (W_)&unblockAsyncExceptionszh_ret_info; + *(--Sp) = (W_)&stg_unblockAsyncExceptionszh_ret_info; } /* Ensure that async excpetions are blocked when running the handler. diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 7578d1c..7d41331 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.86 2000/11/01 11:41:47 simonmar Exp $ + * $Id: GC.c,v 1.87 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team 1998-1999 * @@ -834,7 +834,7 @@ traverse_weak_ptr_list(void) /* There might be a DEAD_WEAK on the list if finalizeWeak# was * called on a live weak pointer object. Just remove it. */ - if (w->header.info == &DEAD_WEAK_info) { + if (w->header.info == &stg_DEAD_WEAK_info) { next_w = ((StgDeadWeak *)w)->link; *last_w = next_w; continue; @@ -1089,7 +1089,7 @@ static void addBlock(step *step) static __inline__ void upd_evacuee(StgClosure *p, StgClosure *dest) { - p->header.info = &EVACUATED_info; + p->header.info = &stg_EVACUATED_info; ((StgEvacuated *)p)->evacuee = dest; } @@ -1264,7 +1264,7 @@ mkMutCons(StgClosure *ptr, generation *gen) q = (StgMutVar *)step->hp; step->hp += sizeofW(StgMutVar); - SET_HDR(q,&MUT_CONS_info,CCS_GC); + SET_HDR(q,&stg_MUT_CONS_info,CCS_GC); q->var = ptr; recordOldToNewPtrs((StgMutClosure *)q); @@ -1356,7 +1356,7 @@ loop: } case MUT_VAR: - ASSERT(q->header.info != &MUT_CONS_info); + ASSERT(q->header.info != &stg_MUT_CONS_info); case MVAR: to = copy(q,sizeW_fromITBL(info),step); recordMutable((StgMutClosure *)to); @@ -1978,7 +1978,7 @@ scavenge(step *step) case IND_PERM: if (step->gen->no != 0) { - SET_INFO(((StgClosure *)p), &IND_OLDGEN_PERM_info); + SET_INFO(((StgClosure *)p), &stg_IND_OLDGEN_PERM_info); } /* fall through */ case IND_OLDGEN_PERM: @@ -2024,7 +2024,7 @@ scavenge(step *step) case MUT_VAR: /* ignore MUT_CONSs */ - if (((StgMutVar *)p)->header.info != &MUT_CONS_info) { + if (((StgMutVar *)p)->header.info != &stg_MUT_CONS_info) { evac_gen = 0; ((StgMutVar *)p)->var = evacuate(((StgMutVar *)p)->var); evac_gen = saved_evac_gen; @@ -2436,7 +2436,7 @@ scavenge_mut_once_list(generation *gen) * it from the mutable list if possible by promoting whatever it * points to. */ - ASSERT(p->header.info == &MUT_CONS_info); + ASSERT(p->header.info == &stg_MUT_CONS_info); if (scavenge_one(((StgMutVar *)p)->var) == rtsTrue) { /* didn't manage to promote everything, so put the * MUT_CONS back on the list. @@ -2552,7 +2552,7 @@ scavenge_mutable_list(generation *gen) * it from the mutable list if possible by promoting whatever it * points to. */ - ASSERT(p->header.info != &MUT_CONS_info); + ASSERT(p->header.info != &stg_MUT_CONS_info); ((StgMutVar *)p)->var = evacuate(((StgMutVar *)p)->var); p->mut_link = gen->mut_list; gen->mut_list = p; @@ -3168,7 +3168,7 @@ gcCAFs(void) if (STATIC_LINK(info,p) == NULL) { IF_DEBUG(gccafs, fprintf(stderr, "CAF gc'd at 0x%04x\n", (int)p)); /* black hole it */ - SET_INFO(p,&BLACKHOLE_info); + SET_INFO(p,&stg_BLACKHOLE_info); p = STATIC_LINK2(info,p); *pp = p; } @@ -3223,16 +3223,16 @@ threadLazyBlackHole(StgTSO *tso) * The blackhole made for a CAF is a CAF_BLACKHOLE, so they * don't interfere with this optimisation. */ - if (bh->header.info == &BLACKHOLE_info) { + if (bh->header.info == &stg_BLACKHOLE_info) { return; } - if (bh->header.info != &BLACKHOLE_BQ_info && - bh->header.info != &CAF_BLACKHOLE_info) { + if (bh->header.info != &stg_BLACKHOLE_BQ_info && + bh->header.info != &stg_CAF_BLACKHOLE_info) { #if (!defined(LAZY_BLACKHOLING)) && defined(DEBUG) fprintf(stderr,"Unexpected lazy BHing required at 0x%04x\n",(int)bh); #endif - SET_INFO(bh,&BLACKHOLE_info); + SET_INFO(bh,&stg_BLACKHOLE_info); } update_frame = update_frame->link; @@ -3313,7 +3313,7 @@ threadSqueezeStack(StgTSO *tso) }) switch (get_itbl(frame)->type) { case UPDATE_FRAME: upd_frames++; - if (frame->updatee->header.info == &BLACKHOLE_info) + if (frame->updatee->header.info == &stg_BLACKHOLE_info) bhs++; break; case STOP_FRAME: stop_frames++; @@ -3329,7 +3329,7 @@ threadSqueezeStack(StgTSO *tso) } #endif if (get_itbl(frame)->type == UPDATE_FRAME - && frame->updatee->header.info == &BLACKHOLE_info) { + && frame->updatee->header.info == &stg_BLACKHOLE_info) { break; } } @@ -3395,11 +3395,11 @@ threadSqueezeStack(StgTSO *tso) # if (!defined(LAZY_BLACKHOLING)) && defined(DEBUG) # error Unimplemented lazy BH warning. (KSW 1999-01) # endif - if (GET_INFO(updatee_bypass) == BLACKHOLE_BQ_info - || GET_INFO(updatee_bypass) == CAF_BLACKHOLE_info + if (GET_INFO(updatee_bypass) == stg_BLACKHOLE_BQ_info + || GET_INFO(updatee_bypass) == stg_CAF_BLACKHOLE_info ) { /* Sigh. It has one. Don't lose those threads! */ - if (GET_INFO(updatee_keep) == BLACKHOLE_BQ_info) { + if (GET_INFO(updatee_keep) == stg_BLACKHOLE_BQ_info) { /* Urgh. Two queues. Merge them. */ P_ keep_tso = ((StgBlockingQueue *)updatee_keep)->blocking_queue; @@ -3439,13 +3439,13 @@ threadSqueezeStack(StgTSO *tso) */ if (is_update_frame) { StgBlockingQueue *bh = (StgBlockingQueue *)frame->updatee; - if (bh->header.info != &BLACKHOLE_info && - bh->header.info != &BLACKHOLE_BQ_info && - bh->header.info != &CAF_BLACKHOLE_info) { + if (bh->header.info != &stg_BLACKHOLE_info && + bh->header.info != &stg_BLACKHOLE_BQ_info && + bh->header.info != &stg_CAF_BLACKHOLE_info) { #if (!defined(LAZY_BLACKHOLING)) && defined(DEBUG) fprintf(stderr,"Unexpected lazy BHing required at 0x%04x\n",(int)bh); #endif - SET_INFO(bh,&BLACKHOLE_info); + SET_INFO(bh,&stg_BLACKHOLE_info); } } diff --git a/ghc/rts/Linker.c b/ghc/rts/Linker.c index cbe069d..0d721a8 100644 --- a/ghc/rts/Linker.c +++ b/ghc/rts/Linker.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Linker.c,v 1.1 2000/10/06 15:33:27 simonmar Exp $ + * $Id: Linker.c,v 1.2 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team, 2000 * @@ -105,32 +105,35 @@ static int ocResolve_PEi386 ( ObjectCode* oc ); Sym(stg_gen_chk) \ SymX(stg_exit) \ SymX(stg_update_PAP) \ - SymX(__ap_2_upd_info) \ - SymX(__ap_3_upd_info) \ - SymX(__ap_4_upd_info) \ - SymX(__ap_5_upd_info) \ - SymX(__ap_6_upd_info) \ - SymX(__ap_7_upd_info) \ - SymX(__ap_8_upd_info) \ - SymX(__sel_0_upd_info) \ - SymX(__sel_1_upd_info) \ - SymX(__sel_2_upd_info) \ - SymX(__sel_3_upd_info) \ - SymX(__sel_4_upd_info) \ - SymX(__sel_5_upd_info) \ - SymX(__sel_6_upd_info) \ - SymX(__sel_7_upd_info) \ - SymX(__sel_8_upd_info) \ - SymX(__sel_9_upd_info) \ - SymX(__sel_10_upd_info) \ - SymX(__sel_11_upd_info) \ - SymX(__sel_12_upd_info) \ - SymX(upd_frame_info) \ - SymX(seq_frame_info) \ - SymX(CAF_BLACKHOLE_info) \ - SymX(IND_STATIC_info) \ - SymX(EMPTY_MVAR_info) \ - SymX(MUT_ARR_PTRS_FROZEN_info) \ + SymX(stg_ap_2_upd_info) \ + SymX(stg_ap_3_upd_info) \ + SymX(stg_ap_4_upd_info) \ + SymX(stg_ap_5_upd_info) \ + SymX(stg_ap_6_upd_info) \ + SymX(stg_ap_7_upd_info) \ + SymX(stg_ap_8_upd_info) \ + SymX(stg_sel_0_upd_info) \ + SymX(stg_sel_1_upd_info) \ + SymX(stg_sel_2_upd_info) \ + SymX(stg_sel_3_upd_info) \ + SymX(stg_sel_4_upd_info) \ + SymX(stg_sel_5_upd_info) \ + SymX(stg_sel_6_upd_info) \ + SymX(stg_sel_7_upd_info) \ + SymX(stg_sel_8_upd_info) \ + SymX(stg_sel_9_upd_info) \ + SymX(stg_sel_10_upd_info) \ + SymX(stg_sel_11_upd_info) \ + SymX(stg_sel_12_upd_info) \ + SymX(stg_upd_frame_info) \ + SymX(stg_seq_frame_info) \ + SymX(stg_CAF_BLACKHOLE_info) \ + SymX(stg_IND_STATIC_info) \ + SymX(stg_EMPTY_MVAR_info) \ + SymX(stg_MUT_ARR_PTRS_FROZEN_info) \ + SymX(stg_CHARLIKE_closure) \ + SymX(stg_INTLIKE_closure) \ + SymX(stg_CAF_UNENTERED_entry) \ SymX(newCAF) \ SymX(putMVarzh_fast) \ SymX(newMVarzh_fast) \ @@ -143,8 +146,6 @@ static int ocResolve_PEi386 ( ObjectCode* oc ); SymX(killThreadzh_fast) \ SymX(waitReadzh_fast) \ SymX(waitWritezh_fast) \ - SymX(CHARLIKE_closure) \ - SymX(INTLIKE_closure) \ SymX(suspendThread) \ SymX(resumeThread) \ SymX(stackOverflow) \ @@ -194,7 +195,6 @@ static int ocResolve_PEi386 ( ObjectCode* oc ); SymX(stable_ptr_table) \ SymX(shutdownHaskellAndExit) \ Sym(stg_enterStackTop) \ - SymX(CAF_UNENTERED_entry) \ Sym(stg_yield_to_Hugs) \ Sym(StgReturn) \ Sym(init_stack) \ diff --git a/ghc/rts/PrimOps.hc b/ghc/rts/PrimOps.hc index 137807a..acc4754 100644 --- a/ghc/rts/PrimOps.hc +++ b/ghc/rts/PrimOps.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: PrimOps.hc,v 1.57 2000/11/07 13:30:41 simonmar Exp $ + * $Id: PrimOps.hc,v 1.58 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -256,7 +256,7 @@ W_ GHC_ZCCReturnable_static_info[0]; size = sizeofW(StgArrWords)+ stuff_size; \ p = (StgArrWords *)RET_STGCALL1(P_,allocate,size); \ TICK_ALLOC_PRIM(sizeofW(StgArrWords),stuff_size,0); \ - SET_HDR(p, &ARR_WORDS_info, CCCS); \ + SET_HDR(p, &stg_ARR_WORDS_info, CCCS); \ p->words = stuff_size; \ TICK_RET_UNBOXED_TUP(1) \ RET_P(p); \ @@ -286,7 +286,7 @@ FN_(newArrayzh_fast) arr = (StgMutArrPtrs *)RET_STGCALL1(P_, allocate, size); TICK_ALLOC_PRIM(sizeofW(StgMutArrPtrs), n, 0); - SET_HDR(arr,&MUT_ARR_PTRS_info,CCCS); + SET_HDR(arr,&stg_MUT_ARR_PTRS_info,CCCS); arr->ptrs = n; init = R2.w; @@ -311,7 +311,7 @@ FN_(newMutVarzh_fast) CCS_ALLOC(CCCS,sizeofW(StgMutVar)); mv = (StgMutVar *)(Hp-sizeofW(StgMutVar)+1); - SET_HDR(mv,&MUT_VAR_info,CCCS); + SET_HDR(mv,&stg_MUT_VAR_info,CCCS); mv->var = R1.cl; TICK_RET_UNBOXED_TUP(1); @@ -338,7 +338,7 @@ FN_(mkForeignObjzh_fast) CCS_ALLOC(CCCS,sizeofW(StgForeignObj)); /* ccs prof */ result = (StgForeignObj *) (Hp + 1 - sizeofW(StgForeignObj)); - SET_HDR(result,&FOREIGN_info,CCCS); + SET_HDR(result,&stg_FOREIGN_info,CCCS); result->data = R1.p; /* returns (# s#, ForeignObj# #) */ @@ -352,7 +352,7 @@ FN_(mkForeignObjzh_fast) FN_(unsafeThawArrayzh_fast) { FB_ - SET_INFO((StgClosure *)R1.cl,&MUT_ARR_PTRS_info); + SET_INFO((StgClosure *)R1.cl,&stg_MUT_ARR_PTRS_info); recordMutable((StgMutClosure*)R1.cl); TICK_RET_UNBOXED_TUP(1); @@ -376,7 +376,7 @@ FN_(mkWeakzh_fast) FB_ if (R3.cl == NULL) { - R3.cl = &NO_FINALIZER_closure; + R3.cl = &stg_NO_FINALIZER_closure; } HP_CHK_GEN_TICKY(sizeofW(StgWeak),R1_PTR|R2_PTR|R3_PTR, mkWeakzh_fast,); @@ -385,7 +385,7 @@ FN_(mkWeakzh_fast) CCS_ALLOC(CCCS,sizeofW(StgWeak)); /* ccs prof */ w = (StgWeak *) (Hp + 1 - sizeofW(StgWeak)); - SET_HDR(w, &WEAK_info, CCCS); + SET_HDR(w, &stg_WEAK_info, CCCS); w->key = R1.cl; w->value = R2.cl; @@ -411,18 +411,18 @@ FN_(finalizzeWeakzh_fast) w = (StgDeadWeak *)R1.p; /* already dead? */ - if (w->header.info == &DEAD_WEAK_info) { - RET_NP(0,&NO_FINALIZER_closure); + if (w->header.info == &stg_DEAD_WEAK_info) { + RET_NP(0,&stg_NO_FINALIZER_closure); } /* kill it */ - w->header.info = &DEAD_WEAK_info; + w->header.info = &stg_DEAD_WEAK_info; f = ((StgWeak *)w)->finalizer; w->link = ((StgWeak *)w)->link; /* return the finalizer */ - if (f == &NO_FINALIZER_closure) { - RET_NP(0,&NO_FINALIZER_closure); + if (f == &stg_NO_FINALIZER_closure) { + RET_NP(0,&stg_NO_FINALIZER_closure); } else { RET_NP(1,f); } @@ -449,7 +449,7 @@ FN_(int2Integerzh_fast) CCS_ALLOC(CCCS,sizeofW(StgArrWords)+1); /* ccs prof */ p = (StgArrWords *)Hp - 1; - SET_ARR_HDR(p, &ARR_WORDS_info, CCCS, 1); + SET_ARR_HDR(p, &stg_ARR_WORDS_info, CCCS, 1); /* mpz_set_si is inlined here, makes things simpler */ if (val < 0) { @@ -486,7 +486,7 @@ FN_(word2Integerzh_fast) CCS_ALLOC(CCCS,sizeofW(StgArrWords)+1); /* ccs prof */ p = (StgArrWords *)Hp - 1; - SET_ARR_HDR(p, &ARR_WORDS_info, CCCS, 1); + SET_ARR_HDR(p, &stg_ARR_WORDS_info, CCCS, 1); if (val != 0) { s = 1; @@ -535,7 +535,7 @@ FN_(int64ToIntegerzh_fast) CCS_ALLOC(CCCS,sizeofW(StgArrWords)+words_needed); /* ccs prof */ p = (StgArrWords *)(Hp-words_needed+1) - 1; - SET_ARR_HDR(p, &ARR_WORDS_info, CCCS, words_needed); + SET_ARR_HDR(p, &stg_ARR_WORDS_info, CCCS, words_needed); if ( val < 0LL ) { neg = 1; @@ -586,7 +586,7 @@ FN_(word64ToIntegerzh_fast) CCS_ALLOC(CCCS,sizeofW(StgArrWords)+words_needed); /* ccs prof */ p = (StgArrWords *)(Hp-words_needed+1) - 1; - SET_ARR_HDR(p, &ARR_WORDS_info, CCCS, words_needed); + SET_ARR_HDR(p, &stg_ARR_WORDS_info, CCCS, words_needed); hi = (W_)((LW_)val / 0x100000000ULL); if ( val >= 0x100000000ULL ) { @@ -749,7 +749,7 @@ FN_(decodeFloatzh_fast) /* Be prepared to tell Lennart-coded __decodeFloat */ /* where mantissa._mp_d can be put (it does not care about the rest) */ p = (StgArrWords *)Hp - 1; - SET_ARR_HDR(p,&ARR_WORDS_info,CCCS,1) + SET_ARR_HDR(p,&stg_ARR_WORDS_info,CCCS,1) mantissa._mp_d = (void *)BYTE_ARR_CTS(p); /* Perform the operation */ @@ -781,7 +781,7 @@ FN_(decodeDoublezh_fast) /* Be prepared to tell Lennart-coded __decodeDouble */ /* where mantissa.d can be put (it does not care about the rest) */ p = (StgArrWords *)(Hp-ARR_SIZE+1); - SET_ARR_HDR(p, &ARR_WORDS_info, CCCS, DOUBLE_MANTISSA_SIZE); + SET_ARR_HDR(p, &stg_ARR_WORDS_info, CCCS, DOUBLE_MANTISSA_SIZE); mantissa._mp_d = (void *)BYTE_ARR_CTS(p); /* Perform the operation */ @@ -836,9 +836,9 @@ FN_(newMVarzh_fast) CCS_ALLOC(CCCS,sizeofW(StgMVar)); /* ccs prof */ mvar = (StgMVar *) (Hp - sizeofW(StgMVar) + 1); - SET_HDR(mvar,&EMPTY_MVAR_info,CCCS); - mvar->head = mvar->tail = (StgTSO *)&END_TSO_QUEUE_closure; - mvar->value = (StgClosure *)&END_TSO_QUEUE_closure; + SET_HDR(mvar,&stg_EMPTY_MVAR_info,CCCS); + mvar->head = mvar->tail = (StgTSO *)&stg_END_TSO_QUEUE_closure; + mvar->value = (StgClosure *)&stg_END_TSO_QUEUE_closure; TICK_RET_UNBOXED_TUP(1); RET_P(mvar); @@ -865,31 +865,31 @@ FN_(takeMVarzh_fast) /* If the MVar is empty, put ourselves on its blocking queue, * and wait until we're woken up. */ - if (info == &EMPTY_MVAR_info) { - if (mvar->head == (StgTSO *)&END_TSO_QUEUE_closure) { + if (info == &stg_EMPTY_MVAR_info) { + if (mvar->head == (StgTSO *)&stg_END_TSO_QUEUE_closure) { mvar->head = CurrentTSO; } else { mvar->tail->link = CurrentTSO; } - CurrentTSO->link = (StgTSO *)&END_TSO_QUEUE_closure; + CurrentTSO->link = (StgTSO *)&stg_END_TSO_QUEUE_closure; CurrentTSO->why_blocked = BlockedOnMVar; CurrentTSO->block_info.closure = (StgClosure *)mvar; mvar->tail = CurrentTSO; #ifdef SMP /* unlock the MVar */ - mvar->header.info = &EMPTY_MVAR_info; + mvar->header.info = &stg_EMPTY_MVAR_info; #endif BLOCK(R1_PTR, takeMVarzh_fast); } val = mvar->value; - mvar->value = (StgClosure *)&END_TSO_QUEUE_closure; + mvar->value = (StgClosure *)&stg_END_TSO_QUEUE_closure; /* do this last... we might have locked the MVar in the SMP case, * and writing the info pointer will unlock it. */ - SET_INFO(mvar,&EMPTY_MVAR_info); + SET_INFO(mvar,&stg_EMPTY_MVAR_info); TICK_RET_UNBOXED_TUP(1); RET_P(val); @@ -913,24 +913,24 @@ FN_(tryTakeMVarzh_fast) info = GET_INFO(mvar); #endif - if (info == &EMPTY_MVAR_info) { + if (info == &stg_EMPTY_MVAR_info) { #ifdef SMP /* unlock the MVar */ - mvar->header.info = &EMPTY_MVAR_info; + mvar->header.info = &stg_EMPTY_MVAR_info; #endif /* HACK: we need a pointer to pass back, so we abuse NO_FINALIZER_closure */ - RET_NP(0, &NO_FINALIZER_closure); + RET_NP(0, &stg_NO_FINALIZER_closure); } val = mvar->value; - mvar->value = (StgClosure *)&END_TSO_QUEUE_closure; + mvar->value = (StgClosure *)&stg_END_TSO_QUEUE_closure; /* do this last... we might have locked the MVar in the SMP case, * and writing the info pointer will unlock it. */ - SET_INFO(mvar,&EMPTY_MVAR_info); + SET_INFO(mvar,&stg_EMPTY_MVAR_info); TICK_RET_UNBOXED_TUP(1); RET_NP(1,val); @@ -953,7 +953,7 @@ FN_(putMVarzh_fast) info = GET_INFO(mvar); #endif - if (info == &FULL_MVAR_info) { + if (info == &stg_FULL_MVAR_info) { #ifdef INTERPRETER fprintf(stderr, "fatal: put on a full MVar in Hugs; aborting\n" ); exit(1); @@ -968,7 +968,7 @@ FN_(putMVarzh_fast) /* wake up the first thread on the queue, it will continue with the * takeMVar operation and mark the MVar empty again. */ - if (mvar->head != (StgTSO *)&END_TSO_QUEUE_closure) { + if (mvar->head != (StgTSO *)&stg_END_TSO_QUEUE_closure) { ASSERT(mvar->head->why_blocked == BlockedOnMVar); #if defined(GRAN) mvar->head = RET_STGCALL2(StgTSO *,unblockOne,mvar->head,mvar); @@ -978,19 +978,19 @@ FN_(putMVarzh_fast) #else mvar->head = RET_STGCALL1(StgTSO *,unblockOne,mvar->head); #endif - if (mvar->head == (StgTSO *)&END_TSO_QUEUE_closure) { - mvar->tail = (StgTSO *)&END_TSO_QUEUE_closure; + if (mvar->head == (StgTSO *)&stg_END_TSO_QUEUE_closure) { + mvar->tail = (StgTSO *)&stg_END_TSO_QUEUE_closure; } /* unlocks the MVar in the SMP case */ - SET_INFO(mvar,&FULL_MVAR_info); + SET_INFO(mvar,&stg_FULL_MVAR_info); /* yield, to give the newly woken thread a chance to take the MVar */ JMP_(stg_yield_noregs); } /* unlocks the MVar in the SMP case */ - SET_INFO(mvar,&FULL_MVAR_info); + SET_INFO(mvar,&stg_FULL_MVAR_info); JMP_(ENTRY_CODE(Sp[0])); FE_ @@ -1016,7 +1016,7 @@ FN_(makeStableNamezh_fast) /* Is there already a StableName for this heap object? */ if (stable_ptr_table[index].sn_obj == NULL) { sn_obj = (StgStableName *) (Hp - sizeofW(StgStableName) + 1); - sn_obj->header.info = &STABLE_NAME_info; + sn_obj->header.info = &stg_STABLE_NAME_info; sn_obj->sn = index; stable_ptr_table[index].sn_obj = (StgClosure *)sn_obj; } else { diff --git a/ghc/rts/ProfHeap.c b/ghc/rts/ProfHeap.c index d69ac4b..6792a11 100644 --- a/ghc/rts/ProfHeap.c +++ b/ghc/rts/ProfHeap.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: ProfHeap.c,v 1.17 2000/11/07 18:00:26 simonmar Exp $ + * $Id: ProfHeap.c,v 1.18 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -496,7 +496,7 @@ heapCensus(void) break; case CONSTR: - if (((StgClosure *)p)->header.info == &DEAD_WEAK_info + if (((StgClosure *)p)->header.info == &stg_DEAD_WEAK_info && !(LOOKS_LIKE_GHC_INFO(*(p + sizeW_fromITBL(info))))) { size = sizeofW(StgWeak); break; diff --git a/ghc/rts/RtsAPI.c b/ghc/rts/RtsAPI.c index 4dc80ca..765ace9 100644 --- a/ghc/rts/RtsAPI.c +++ b/ghc/rts/RtsAPI.c @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: RtsAPI.c,v 1.21 2000/11/07 17:05:47 simonmar Exp $ + * $Id: RtsAPI.c,v 1.22 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -196,7 +196,7 @@ HaskellObj rts_apply (HaskellObj f, HaskellObj arg) { StgAP_UPD *ap = (StgAP_UPD *)allocate(AP_sizeW(1)); - SET_HDR(ap, &AP_UPD_info, CCS_SYSTEM); + SET_HDR(ap, &stg_AP_UPD_info, CCS_SYSTEM); ap->n_args = 1; ap->fun = f; ap->payload[0] = arg; diff --git a/ghc/rts/Sanity.c b/ghc/rts/Sanity.c index a80efb2..f147694 100644 --- a/ghc/rts/Sanity.c +++ b/ghc/rts/Sanity.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Sanity.c,v 1.21 2000/04/14 15:18:06 sewardj Exp $ + * $Id: Sanity.c,v 1.22 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -35,6 +35,7 @@ #include "RtsUtils.h" #include "BlockAlloc.h" #include "Sanity.h" +#include "Schedule.h" #include "StoragePriv.h" // for END_OF_STATIC_LIST //@node Macros, Stack sanity, Includes diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 89d9799..380228f 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.80 2000/11/07 10:42:57 simonmar Exp $ + * $Id: Schedule.c,v 1.81 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -1358,7 +1358,7 @@ createThread_(nat size, rtsBool have_lock) tso = (StgTSO *)allocate(size); TICK_ALLOC_TSO(size-TSO_STRUCT_SIZEW, 0); - SET_HDR(tso, &TSO_info, CCS_SYSTEM); + SET_HDR(tso, &stg_TSO_info, CCS_SYSTEM); #if defined(GRAN) SET_GRAN_HDR(tso, ThisPE); #endif @@ -2257,9 +2257,9 @@ unblockOneLocked(StgBlockingQueueElement *bqe, StgClosure *node) see comments on RBHSave closures above */ case CONSTR: /* check that the closure is an RBHSave closure */ - ASSERT(get_itbl((StgClosure *)bqe) == &RBH_Save_0_info || - get_itbl((StgClosure *)bqe) == &RBH_Save_1_info || - get_itbl((StgClosure *)bqe) == &RBH_Save_2_info); + ASSERT(get_itbl((StgClosure *)bqe) == &stg_RBH_Save_0_info || + get_itbl((StgClosure *)bqe) == &stg_RBH_Save_1_info || + get_itbl((StgClosure *)bqe) == &stg_RBH_Save_2_info); break; default: @@ -2757,7 +2757,7 @@ raiseAsync(StgTSO *tso, StgClosure *exception) * returns to the next return address on the stack. */ if ( LOOKS_LIKE_GHC_INFO((void*)*sp) ) { - *(--sp) = (W_)&dummy_ret_closure; + *(--sp) = (W_)&stg_dummy_ret_closure; } while (1) { @@ -2776,7 +2776,7 @@ raiseAsync(StgTSO *tso, StgClosure *exception) */ ap = (StgAP_UPD *)allocate(sizeofW(StgPAP) + 2); TICK_ALLOC_UPD_PAP(3,0); - SET_HDR(ap,&PAP_info,cf->header.prof.ccs); + SET_HDR(ap,&stg_PAP_info,cf->header.prof.ccs); ap->n_args = 2; ap->fun = cf->handler; /* :: Exception -> IO a */ @@ -2797,7 +2797,7 @@ raiseAsync(StgTSO *tso, StgClosure *exception) * unblockAsyncExceptions_ret stack frame. */ if (!cf->exceptions_blocked) { - *(sp--) = (W_)&unblockAsyncExceptionszh_ret_info; + *(sp--) = (W_)&stg_unblockAsyncExceptionszh_ret_info; } /* Ensure that async exceptions are blocked when running the handler. @@ -2835,7 +2835,7 @@ raiseAsync(StgTSO *tso, StgClosure *exception) case UPDATE_FRAME: { - SET_HDR(ap,&AP_UPD_info,su->header.prof.ccs /* ToDo */); + SET_HDR(ap,&stg_AP_UPD_info,su->header.prof.ccs /* ToDo */); TICK_ALLOC_UP_THK(words+1,0); IF_DEBUG(scheduler, @@ -2864,13 +2864,13 @@ raiseAsync(StgTSO *tso, StgClosure *exception) /* We want a PAP, not an AP_UPD. Fortunately, the * layout's the same. */ - SET_HDR(ap,&PAP_info,su->header.prof.ccs /* ToDo */); + SET_HDR(ap,&stg_PAP_info,su->header.prof.ccs /* ToDo */); TICK_ALLOC_UPD_PAP(words+1,0); /* now build o = FUN(catch,ap,handler) */ o = (StgClosure *)allocate(sizeofW(StgClosure)+2); TICK_ALLOC_FUN(2,0); - SET_HDR(o,&catch_info,su->header.prof.ccs /* ToDo */); + SET_HDR(o,&stg_catch_info,su->header.prof.ccs /* ToDo */); o->payload[0] = (StgClosure *)ap; o->payload[1] = cf->handler; @@ -2891,13 +2891,13 @@ raiseAsync(StgTSO *tso, StgClosure *exception) StgSeqFrame *sf = (StgSeqFrame *)su; StgClosure* o; - SET_HDR(ap,&PAP_info,su->header.prof.ccs /* ToDo */); + SET_HDR(ap,&stg_PAP_info,su->header.prof.ccs /* ToDo */); TICK_ALLOC_UPD_PAP(words+1,0); /* now build o = FUN(seq,ap) */ o = (StgClosure *)allocate(sizeofW(StgClosure)+1); TICK_ALLOC_SE_THK(1,0); - SET_HDR(o,&seq_info,su->header.prof.ccs /* ToDo */); + SET_HDR(o,&stg_seq_info,su->header.prof.ccs /* ToDo */); o->payload[0] = (StgClosure *)ap; IF_DEBUG(scheduler, @@ -3151,9 +3151,9 @@ print_bq (StgClosure *node) break; case CONSTR: fprintf(stderr," %s (IP %p),", - (get_itbl(bqe) == &RBH_Save_0_info ? "RBH_Save_0" : - get_itbl(bqe) == &RBH_Save_1_info ? "RBH_Save_1" : - get_itbl(bqe) == &RBH_Save_2_info ? "RBH_Save_2" : + (get_itbl(bqe) == &stg_RBH_Save_0_info ? "RBH_Save_0" : + get_itbl(bqe) == &stg_RBH_Save_1_info ? "RBH_Save_1" : + get_itbl(bqe) == &stg_RBH_Save_2_info ? "RBH_Save_2" : "RBH_Save_?"), get_itbl(bqe)); break; default: @@ -3205,9 +3205,9 @@ print_bq (StgClosure *node) break; case CONSTR: fprintf(stderr," %s (IP %p),", - (get_itbl(bqe) == &RBH_Save_0_info ? "RBH_Save_0" : - get_itbl(bqe) == &RBH_Save_1_info ? "RBH_Save_1" : - get_itbl(bqe) == &RBH_Save_2_info ? "RBH_Save_2" : + (get_itbl(bqe) == &stg_RBH_Save_0_info ? "RBH_Save_0" : + get_itbl(bqe) == &stg_RBH_Save_1_info ? "RBH_Save_1" : + get_itbl(bqe) == &stg_RBH_Save_2_info ? "RBH_Save_2" : "RBH_Save_?"), get_itbl(bqe)); break; default: diff --git a/ghc/rts/Schedule.h b/ghc/rts/Schedule.h index c2627e9..ffcc04c 100644 --- a/ghc/rts/Schedule.h +++ b/ghc/rts/Schedule.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Schedule.h,v 1.19 2000/08/25 13:12:07 simonmar Exp $ + * $Id: Schedule.h,v 1.20 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team 1998-1999 * @@ -204,15 +204,9 @@ void print_bq (StgClosure *node); */ /* this is the NIL ptr for a TSO queue (e.g. runnable queue) */ -#define END_TSO_QUEUE ((StgTSO *)(void*)&END_TSO_QUEUE_closure) +#define END_TSO_QUEUE ((StgTSO *)(void*)&stg_END_TSO_QUEUE_closure) /* this is the NIL ptr for a list CAFs */ -#define END_ECAF_LIST ((StgCAF *)(void*)&END_TSO_QUEUE_closure) -#if defined(PAR) || defined(GRAN) -/* this is the NIL ptr for a blocking queue */ -# define END_BQ_QUEUE ((StgBlockingQueueElement *)(void*)&END_TSO_QUEUE_closure) -/* this is the NIL ptr for a blocked fetch queue (as in PendingFetches in GUM) */ -# define END_BF_QUEUE ((StgBlockedFetch *)(void*)&END_TSO_QUEUE_closure) -#endif +#define END_ECAF_LIST ((StgCAF *)(void*)&stg_END_TSO_QUEUE_closure) //@cindex APPEND_TO_RUN_QUEUE /* Add a thread to the end of the run queue. diff --git a/ghc/rts/StgCRun.c b/ghc/rts/StgCRun.c index 23a2e13..d50bd67 100644 --- a/ghc/rts/StgCRun.c +++ b/ghc/rts/StgCRun.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgCRun.c,v 1.20 2000/08/15 14:18:43 simonmar Exp $ + * $Id: StgCRun.c,v 1.21 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -321,9 +321,11 @@ StgRun(StgFunPtr f, StgRegTable *basereg) { StgThreadReturnCode StgRun(StgFunPtr f, StgRegTable *basereg) { - unsigned char space[RESERVED_C_STACK_BYTES+sizeof(void *)]; + unsigned char space[RESERVED_C_STACK_BYTES]; +#if 0 register void *i7 __asm__("%i7"); ((void **)(space))[100] = i7; +#endif f(); __asm__ volatile ( ".align 4\n" @@ -340,8 +342,10 @@ StgRun(StgFunPtr f, StgRegTable *basereg) { * terrible. We could do much better by coding it directly in * assembler. */ +#if 0 __asm__ volatile ("ld %1,%0" : "=r" (i7) : "m" (((void **)(space))[100])); +#endif return (StgThreadReturnCode)R1.i; } diff --git a/ghc/rts/StgMiscClosures.hc b/ghc/rts/StgMiscClosures.hc index 609eba3..a2de22c 100644 --- a/ghc/rts/StgMiscClosures.hc +++ b/ghc/rts/StgMiscClosures.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgMiscClosures.hc,v 1.49 2000/10/09 11:41:43 simonmar Exp $ + * $Id: StgMiscClosures.hc,v 1.50 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -16,6 +16,7 @@ #include "StoragePriv.h" #include "Profiling.h" #include "Prelude.h" +#include "Schedule.h" #include "SMP.h" #if defined(GRAN) || defined(PAR) # include "GranSimRts.h" /* for DumpRawGranEvent */ @@ -36,7 +37,7 @@ */ #define NON_ENTERABLE_ENTRY_CODE(type) \ -STGFUN(type##_entry) \ +STGFUN(stg_##type##_entry) \ { \ FB_ \ DUMP_ERRMSG(#type " object entered!\n"); \ @@ -53,7 +54,7 @@ STGFUN(type##_entry) \ #ifdef GHCI /* 9 bits of return code for constructors created by mci_make_constr. */ -FN_(mci_constr_entry) +FN_(stg_mci_constr_entry) { /* R1 points at the constructor */ FB_ @@ -64,28 +65,29 @@ FN_(mci_constr_entry) FE_ } -FN_(mci_constr1_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),0)); FE_ } -FN_(mci_constr2_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),1)); FE_ } -FN_(mci_constr3_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),2)); FE_ } -FN_(mci_constr4_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),3)); FE_ } -FN_(mci_constr5_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),4)); FE_ } -FN_(mci_constr6_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),5)); FE_ } -FN_(mci_constr7_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),6)); FE_ } -FN_(mci_constr8_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),7)); FE_ } +FN_(stg_mci_constr1_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),0)); FE_ } +FN_(stg_mci_constr2_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),1)); FE_ } +FN_(stg_mci_constr3_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),2)); FE_ } +FN_(stg_mci_constr4_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),3)); FE_ } +FN_(stg_mci_constr5_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),4)); FE_ } +FN_(stg_mci_constr6_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),5)); FE_ } +FN_(stg_mci_constr7_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),6)); FE_ } +FN_(stg_mci_constr8_entry) { FB_ JMP_(RET_VEC((P_)(*Sp),7)); FE_ } /* Since this stuff is ostensibly in some other module, we need to supply an __init_ function. */ +EF_(__init_MCIzumakezuconstr); START_MOD_INIT(__init_MCIzumakezuconstr) END_MOD_INIT() -INFO_TABLE(mci_make_constr_info, mci_make_constr_entry, 0,0,FUN_STATIC,,EF_,0,0); -INFO_TABLE(mci_make_constrI_info, mci_make_constrI_entry, 0,0,FUN_STATIC,,EF_,0,0); -INFO_TABLE(mci_make_constrP_info, mci_make_constrP_entry, 0,0,FUN_STATIC,,EF_,0,0); -INFO_TABLE(mci_make_constrPP_info, mci_make_constrPP_entry, 0,0,FUN_STATIC,,EF_,0,0); -INFO_TABLE(mci_make_constrPPP_info,mci_make_constrPPP_entry,0,0,FUN_STATIC,,EF_,0,0); +INFO_TABLE(mci_make_constr_info, mci_make_constr_entry, 0,0,FUN_STATIC,static,EF_,0,0); +INFO_TABLE(mci_make_constrI_info, mci_make_constrI_entry, 0,0,FUN_STATIC,static,EF_,0,0); +INFO_TABLE(mci_make_constrP_info, mci_make_constrP_entry, 0,0,FUN_STATIC,static,EF_,0,0); +INFO_TABLE(mci_make_constrPP_info, mci_make_constrPP_entry, 0,0,FUN_STATIC,static,EF_,0,0); +INFO_TABLE(mci_make_constrPPP_info,mci_make_constrPPP_entry,0,0,FUN_STATIC,static,EF_,0,0); SET_STATIC_HDR(MCIzumakezuconstr_mcizumakezuconstr_closure, mci_make_constr_info,0,,EI_) @@ -301,8 +303,8 @@ STGCALL3(fprintf,stderr,"mmc: sp+4 = %d\n", ((W_*)Sp)[4] ); Entry code for an indirection. -------------------------------------------------------------------------- */ -INFO_TABLE(IND_info,IND_entry,1,0,IND,,EF_,0,0); -STGFUN(IND_entry) +INFO_TABLE(stg_IND_info,stg_IND_entry,1,0,IND,,EF_,0,0); +STGFUN(stg_IND_entry) { FB_ TICK_ENT_IND(Node); /* tick */ @@ -313,8 +315,8 @@ STGFUN(IND_entry) FE_ } -INFO_TABLE(IND_STATIC_info,IND_STATIC_entry,1,0,IND_STATIC,,EF_,0,0); -STGFUN(IND_STATIC_entry) +INFO_TABLE(stg_IND_STATIC_info,stg_IND_STATIC_entry,1,0,IND_STATIC,,EF_,0,0); +STGFUN(stg_IND_STATIC_entry) { FB_ TICK_ENT_IND(Node); /* tick */ @@ -324,8 +326,8 @@ STGFUN(IND_STATIC_entry) FE_ } -INFO_TABLE(IND_PERM_info,IND_PERM_entry,1,1,IND_PERM,,EF_,"IND_PERM","IND_PERM"); -STGFUN(IND_PERM_entry) +INFO_TABLE(stg_IND_PERM_info,stg_IND_PERM_entry,1,1,IND_PERM,,EF_,"IND_PERM","IND_PERM"); +STGFUN(stg_IND_PERM_entry) { FB_ /* Don't add INDs to granularity cost */ @@ -366,8 +368,8 @@ STGFUN(IND_PERM_entry) FE_ } -INFO_TABLE(IND_OLDGEN_info,IND_OLDGEN_entry,1,1,IND_OLDGEN,,EF_,0,0); -STGFUN(IND_OLDGEN_entry) +INFO_TABLE(stg_IND_OLDGEN_info,stg_IND_OLDGEN_entry,1,1,IND_OLDGEN,,EF_,0,0); +STGFUN(stg_IND_OLDGEN_entry) { FB_ TICK_ENT_IND(Node); /* tick */ @@ -378,8 +380,8 @@ STGFUN(IND_OLDGEN_entry) FE_ } -INFO_TABLE(IND_OLDGEN_PERM_info,IND_OLDGEN_PERM_entry,1,1,IND_OLDGEN_PERM,,EF_,0,0); -STGFUN(IND_OLDGEN_PERM_entry) +INFO_TABLE(stg_IND_OLDGEN_PERM_info,stg_IND_OLDGEN_PERM_entry,1,1,IND_OLDGEN_PERM,,EF_,0,0); +STGFUN(stg_IND_OLDGEN_PERM_entry) { FB_ /* Dont: TICK_ENT_IND(Node); for ticky-ticky; this ind is here only to help profiling */ @@ -412,8 +414,8 @@ STGFUN(IND_OLDGEN_PERM_entry) This code assumes R1 is in a register for now. -------------------------------------------------------------------------- */ -INFO_TABLE(CAF_UNENTERED_info,CAF_UNENTERED_entry,1,3,CAF_UNENTERED,,EF_,0,0); -STGFUN(CAF_UNENTERED_entry) +INFO_TABLE(stg_CAF_UNENTERED_info,stg_CAF_UNENTERED_entry,1,3,CAF_UNENTERED,,EF_,0,0); +STGFUN(stg_CAF_UNENTERED_entry) { FB_ /* ToDo: implement directly in GHC */ @@ -424,8 +426,8 @@ STGFUN(CAF_UNENTERED_entry) } /* 0,4 is entirely bogus; _do not_ rely on this info */ -INFO_TABLE(CAF_ENTERED_info,CAF_ENTERED_entry,0,4,CAF_ENTERED,,EF_,0,0); -STGFUN(CAF_ENTERED_entry) +INFO_TABLE(stg_CAF_ENTERED_info,stg_CAF_ENTERED_entry,0,4,CAF_ENTERED,,EF_,0,0); +STGFUN(stg_CAF_ENTERED_entry) { FB_ R1.p = (P_) ((StgCAF*)R1.p)->value; /* just a fancy indirection */ @@ -450,8 +452,8 @@ STGFUN(CAF_ENTERED_entry) * old-generation indirection. */ -INFO_TABLE(BLACKHOLE_info, BLACKHOLE_entry,0,2,BLACKHOLE,,EF_,"BLACKHOLE","BLACKHOLE"); -STGFUN(BLACKHOLE_entry) +INFO_TABLE(stg_BLACKHOLE_info, stg_BLACKHOLE_entry,0,2,BLACKHOLE,,EF_,"BLACKHOLE","BLACKHOLE"); +STGFUN(stg_BLACKHOLE_entry) { FB_ #if defined(GRAN) @@ -489,7 +491,7 @@ STGFUN(BLACKHOLE_entry) /* closure is mutable since something has just been added to its BQ */ recordMutable((StgMutClosure *)R1.cl); /* Change the BLACKHOLE into a BLACKHOLE_BQ */ - ((StgBlockingQueue *)R1.p)->header.info = &BLACKHOLE_BQ_info; + ((StgBlockingQueue *)R1.p)->header.info = &stg_BLACKHOLE_BQ_info; /* PAR: dumping of event now done in blockThread -- HWL */ @@ -499,8 +501,8 @@ STGFUN(BLACKHOLE_entry) FE_ } -INFO_TABLE(BLACKHOLE_BQ_info, BLACKHOLE_BQ_entry,1,1,BLACKHOLE_BQ,,EF_,"BLACKHOLE","BLACKHOLE"); -STGFUN(BLACKHOLE_BQ_entry) +INFO_TABLE(stg_BLACKHOLE_BQ_info, stg_BLACKHOLE_BQ_entry,1,1,BLACKHOLE_BQ,,EF_,"BLACKHOLE","BLACKHOLE"); +STGFUN(stg_BLACKHOLE_BQ_entry) { FB_ #if defined(GRAN) @@ -531,7 +533,7 @@ STGFUN(BLACKHOLE_BQ_entry) CurrentTSO->why_blocked = BlockedOnBlackHole; CurrentTSO->block_info.closure = R1.cl; #ifdef SMP - ((StgBlockingQueue *)R1.p)->header.info = &BLACKHOLE_BQ_info; + ((StgBlockingQueue *)R1.p)->header.info = &stg_BLACKHOLE_BQ_info; #endif /* PAR: dumping of event now done in blockThread -- HWL */ @@ -555,8 +557,8 @@ STGFUN(BLACKHOLE_BQ_entry) #if defined(PAR) || defined(GRAN) -INFO_TABLE(RBH_info, RBH_entry,1,1,RBH,,EF_,0,0); -STGFUN(RBH_entry) +INFO_TABLE(stg_RBH_info, stg_RBH_entry,1,1,RBH,,EF_,0,0); +STGFUN(stg_RBH_entry) { FB_ # if defined(GRAN) @@ -591,7 +593,7 @@ NON_ENTERABLE_ENTRY_CODE(RBH_Save_2); /* identical to BLACKHOLEs except for the infotag */ INFO_TABLE(CAF_BLACKHOLE_info, CAF_BLACKHOLE_entry,0,2,CAF_BLACKHOLE,,EF_,"CAF_BLACKHOLE","CAF_BLACKHOLE"); -STGFUN(CAF_BLACKHOLE_entry) +STGFUN(stg_CAF_BLACKHOLE_entry) { FB_ #if defined(GRAN) @@ -630,7 +632,7 @@ STGFUN(CAF_BLACKHOLE_entry) /* closure is mutable since something has just been added to its BQ */ recordMutable((StgMutClosure *)R1.cl); /* Change the CAF_BLACKHOLE into a BLACKHOLE_BQ */ - ((StgBlockingQueue *)R1.p)->header.info = &BLACKHOLE_BQ_info; + ((StgBlockingQueue *)R1.p)->header.info = &stg_BLACKHOLE_BQ_info; /* PAR: dumping of event now done in blockThread -- HWL */ @@ -640,8 +642,8 @@ STGFUN(CAF_BLACKHOLE_entry) } #ifdef TICKY_TICKY -INFO_TABLE(SE_BLACKHOLE_info, SE_BLACKHOLE_entry,0,2,SE_BLACKHOLE,,EF_,0,0); -STGFUN(SE_BLACKHOLE_entry) +INFO_TABLE(stg_SE_BLACKHOLE_info, stg_SE_BLACKHOLE_entry,0,2,SE_BLACKHOLE,,EF_,0,0); +STGFUN(stg_SE_BLACKHOLE_entry) { FB_ STGCALL3(fprintf,stderr,"SE_BLACKHOLE at %p entered!\n",R1.p); @@ -650,7 +652,7 @@ STGFUN(SE_BLACKHOLE_entry) } INFO_TABLE(SE_CAF_BLACKHOLE_info, SE_CAF_BLACKHOLE_entry,0,2,SE_CAF_BLACKHOLE,,EF_,0,0); -STGFUN(SE_CAF_BLACKHOLE_entry) +STGFUN(stg_SE_CAF_BLACKHOLE_entry) { FB_ STGCALL3(fprintf,stderr,"SE_CAF_BLACKHOLE at %p entered!\n",R1.p); @@ -660,8 +662,8 @@ STGFUN(SE_CAF_BLACKHOLE_entry) #endif #ifdef SMP -INFO_TABLE(WHITEHOLE_info, WHITEHOLE_entry,0,2,CONSTR_NOCAF_STATIC,,EF_,0,0); -STGFUN(WHITEHOLE_entry) +INFO_TABLE(stg_WHITEHOLE_info, stg_WHITEHOLE_entry,0,2,CONSTR_NOCAF_STATIC,,EF_,0,0); +STGFUN(stg_WHITEHOLE_entry) { FB_ JMP_(GET_ENTRY(R1.cl)); @@ -672,8 +674,8 @@ STGFUN(WHITEHOLE_entry) /* ----------------------------------------------------------------------------- The code for a BCO returns to the scheduler -------------------------------------------------------------------------- */ -INFO_TABLE(BCO_info,BCO_entry,0,0,BCO,,EF_,"BCO","BCO"); -EF_(BCO_entry) { +INFO_TABLE(stg_BCO_info,stg_BCO_entry,0,0,BCO,,EF_,"BCO","BCO"); +STGFUN(stg_BCO_entry) { FB_ Sp -= 1; Sp[0] = R1.w; @@ -687,7 +689,7 @@ EF_(BCO_entry) { NON_ENTERABLE_ENTRY_CODE now defined at the beginning of the file -------------------------------------------------------------------------- */ -INFO_TABLE(TSO_info, TSO_entry, 0,0,TSO,,EF_,"TSO","TSO"); +INFO_TABLE(stg_TSO_info, stg_TSO_entry, 0,0,TSO,,EF_,"TSO","TSO"); NON_ENTERABLE_ENTRY_CODE(TSO); /* ----------------------------------------------------------------------------- @@ -695,7 +697,7 @@ NON_ENTERABLE_ENTRY_CODE(TSO); one is a real bug. -------------------------------------------------------------------------- */ -INFO_TABLE(EVACUATED_info,EVACUATED_entry,1,0,EVACUATED,,EF_,0,0); +INFO_TABLE(stg_EVACUATED_info,stg_EVACUATED_entry,1,0,EVACUATED,,EF_,0,0); NON_ENTERABLE_ENTRY_CODE(EVACUATED); /* ----------------------------------------------------------------------------- @@ -706,10 +708,10 @@ NON_ENTERABLE_ENTRY_CODE(EVACUATED); live weak pointers with dead ones). -------------------------------------------------------------------------- */ -INFO_TABLE(WEAK_info,WEAK_entry,0,4,WEAK,,EF_,"WEAK","WEAK"); +INFO_TABLE(stg_WEAK_info,stg_WEAK_entry,0,4,WEAK,,EF_,"WEAK","WEAK"); NON_ENTERABLE_ENTRY_CODE(WEAK); -INFO_TABLE_CONSTR(DEAD_WEAK_info,DEAD_WEAK_entry,0,1,0,CONSTR,,EF_,"DEAD_WEAK","DEAD_WEAK"); +INFO_TABLE_CONSTR(stg_DEAD_WEAK_info,stg_DEAD_WEAK_entry,0,1,0,CONSTR,,EF_,"DEAD_WEAK","DEAD_WEAK"); NON_ENTERABLE_ENTRY_CODE(DEAD_WEAK); /* ----------------------------------------------------------------------------- @@ -719,24 +721,24 @@ NON_ENTERABLE_ENTRY_CODE(DEAD_WEAK); finalizer in a weak pointer object. -------------------------------------------------------------------------- */ -INFO_TABLE_CONSTR(NO_FINALIZER_info,NO_FINALIZER_entry,0,0,0,CONSTR_NOCAF_STATIC,,EF_,0,0); +INFO_TABLE_CONSTR(stg_NO_FINALIZER_info,stg_NO_FINALIZER_entry,0,0,0,CONSTR_NOCAF_STATIC,,EF_,0,0); NON_ENTERABLE_ENTRY_CODE(NO_FINALIZER); -SET_STATIC_HDR(NO_FINALIZER_closure,NO_FINALIZER_info,0/*CC*/,,EI_) +SET_STATIC_HDR(stg_NO_FINALIZER_closure,NO_FINALIZER_info,0/*CC*/,,EI_) , /*payload*/{} }; /* ----------------------------------------------------------------------------- Foreign Objects are unlifted and therefore never entered. -------------------------------------------------------------------------- */ -INFO_TABLE(FOREIGN_info,FOREIGN_entry,0,1,FOREIGN,,EF_,"FOREIGN","FOREIGN"); +INFO_TABLE(stg_FOREIGN_info,stg_FOREIGN_entry,0,1,FOREIGN,,EF_,"FOREIGN","FOREIGN"); NON_ENTERABLE_ENTRY_CODE(FOREIGN); /* ----------------------------------------------------------------------------- Stable Names are unlifted too. -------------------------------------------------------------------------- */ -INFO_TABLE(STABLE_NAME_info,STABLE_NAME_entry,0,1,STABLE_NAME,,EF_,"STABLE_NAME","STABLE_NAME"); +INFO_TABLE(stg_STABLE_NAME_info,stg_STABLE_NAME_entry,0,1,STABLE_NAME,,EF_,"STABLE_NAME","STABLE_NAME"); NON_ENTERABLE_ENTRY_CODE(STABLE_NAME); /* ----------------------------------------------------------------------------- @@ -746,10 +748,10 @@ NON_ENTERABLE_ENTRY_CODE(STABLE_NAME); and entry code for each type. -------------------------------------------------------------------------- */ -INFO_TABLE(FULL_MVAR_info,FULL_MVAR_entry,4,0,MVAR,,EF_,"MVAR","MVAR"); +INFO_TABLE(stg_FULL_MVAR_info,stg_FULL_MVAR_entry,4,0,MVAR,,EF_,"MVAR","MVAR"); NON_ENTERABLE_ENTRY_CODE(FULL_MVAR); -INFO_TABLE(EMPTY_MVAR_info,EMPTY_MVAR_entry,4,0,MVAR,,EF_,"MVAR","MVAR"); +INFO_TABLE(stg_EMPTY_MVAR_info,stg_EMPTY_MVAR_entry,4,0,MVAR,,EF_,"MVAR","MVAR"); NON_ENTERABLE_ENTRY_CODE(EMPTY_MVAR); /* ----------------------------------------------------------------------------- @@ -759,10 +761,10 @@ NON_ENTERABLE_ENTRY_CODE(EMPTY_MVAR); end of a linked TSO queue. -------------------------------------------------------------------------- */ -INFO_TABLE_CONSTR(END_TSO_QUEUE_info,END_TSO_QUEUE_entry,0,0,0,CONSTR_NOCAF_STATIC,,EF_,0,0); +INFO_TABLE_CONSTR(stg_END_TSO_QUEUE_info,stg_END_TSO_QUEUE_entry,0,0,0,CONSTR_NOCAF_STATIC,,EF_,0,0); NON_ENTERABLE_ENTRY_CODE(END_TSO_QUEUE); -SET_STATIC_HDR(END_TSO_QUEUE_closure,END_TSO_QUEUE_info,0/*CC*/,,EI_) +SET_STATIC_HDR(stg_END_TSO_QUEUE_closure,stg_END_TSO_QUEUE_info,0/*CC*/,,EI_) , /*payload*/{} }; /* ----------------------------------------------------------------------------- @@ -773,26 +775,26 @@ SET_STATIC_HDR(END_TSO_QUEUE_closure,END_TSO_QUEUE_info,0/*CC*/,,EI_) an END_MUT_LIST closure. -------------------------------------------------------------------------- */ -INFO_TABLE_CONSTR(END_MUT_LIST_info,END_MUT_LIST_entry,0,0,0,CONSTR_NOCAF_STATIC,,EF_,0,0); +INFO_TABLE_CONSTR(stg_END_MUT_LIST_info,stg_END_MUT_LIST_entry,0,0,0,CONSTR_NOCAF_STATIC,,EF_,0,0); NON_ENTERABLE_ENTRY_CODE(END_MUT_LIST); -SET_STATIC_HDR(END_MUT_LIST_closure,END_MUT_LIST_info,0/*CC*/,,EI_) +SET_STATIC_HDR(stg_END_MUT_LIST_closure,stg_END_MUT_LIST_info,0/*CC*/,,EI_) , /*payload*/{} }; -INFO_TABLE(MUT_CONS_info, MUT_CONS_entry, 1, 1, MUT_VAR, , EF_, 0, 0); +INFO_TABLE(stg_MUT_CONS_info, stg_MUT_CONS_entry, 1, 1, MUT_VAR, , EF_, 0, 0); NON_ENTERABLE_ENTRY_CODE(MUT_CONS); /* ----------------------------------------------------------------------------- Exception lists -------------------------------------------------------------------------- */ -INFO_TABLE_CONSTR(END_EXCEPTION_LIST_info,END_EXCEPTION_LIST_entry,0,0,0,CONSTR_NOCAF_STATIC,,EF_,0,0); +INFO_TABLE_CONSTR(stg_END_EXCEPTION_LIST_info,stg_END_EXCEPTION_LIST_entry,0,0,0,CONSTR_NOCAF_STATIC,,EF_,0,0); NON_ENTERABLE_ENTRY_CODE(END_EXCEPTION_LIST); -SET_STATIC_HDR(END_EXCEPTION_LIST_closure,END_EXCEPTION_LIST_info,0/*CC*/,,EI_) +SET_STATIC_HDR(stg_END_EXCEPTION_LIST_closure,stg_END_EXCEPTION_LIST_info,0/*CC*/,,EI_) , /*payload*/{} }; -INFO_TABLE(EXCEPTION_CONS_info, EXCEPTION_CONS_entry, 1, 1, CONSTR, , EF_, 0, 0); +INFO_TABLE(stg_EXCEPTION_CONS_info, stg_EXCEPTION_CONS_entry, 1, 1, CONSTR, , EF_, 0, 0); NON_ENTERABLE_ENTRY_CODE(EXCEPTION_CONS); /* ----------------------------------------------------------------------------- @@ -811,7 +813,7 @@ NON_ENTERABLE_ENTRY_CODE(EXCEPTION_CONS); -------------------------------------------------------------------------- */ #define ArrayInfo(type) \ -INFO_TABLE(type##_info, type##_entry, 0, 0, type, , EF_,"" # type "","" # type ""); +INFO_TABLE(stg_##type##_info, stg_##type##_entry, 0, 0, type, , EF_,"" # type "","" # type ""); ArrayInfo(ARR_WORDS); NON_ENTERABLE_ENTRY_CODE(ARR_WORDS); @@ -826,7 +828,7 @@ NON_ENTERABLE_ENTRY_CODE(MUT_ARR_PTRS_FROZEN); Mutable Variables -------------------------------------------------------------------------- */ -INFO_TABLE(MUT_VAR_info, MUT_VAR_entry, 1, 1, MUT_VAR, , EF_, "MUT_VAR", "MUT_VAR"); +INFO_TABLE(stg_MUT_VAR_info, stg_MUT_VAR_entry, 1, 1, MUT_VAR, , EF_, "MUT_VAR", "MUT_VAR"); NON_ENTERABLE_ENTRY_CODE(MUT_VAR); /* ----------------------------------------------------------------------------- @@ -854,8 +856,8 @@ STGFUN(stg_error_entry) \ just enter the top stack word to start the thread. (see deleteThread) * -------------------------------------------------------------------------- */ -INFO_TABLE(dummy_ret_info, dummy_ret_entry, 0, 0, CONSTR_NOCAF_STATIC, , EF_, 0, 0); -FN_(dummy_ret_entry) +INFO_TABLE(stg_dummy_ret_info, stg_dummy_ret_entry, 0, 0, CONSTR_NOCAF_STATIC, , EF_, 0, 0); +STGFUN(stg_dummy_ret_entry) { W_ ret_addr; FB_ @@ -864,7 +866,7 @@ FN_(dummy_ret_entry) JMP_(ENTRY_CODE(ret_addr)); FE_ } -SET_STATIC_HDR(dummy_ret_closure,dummy_ret_info,CCS_DONT_CARE,,EI_) +SET_STATIC_HDR(stg_dummy_ret_closure,stg_dummy_ret_info,CCS_DONT_CARE,,EI_) , /*payload*/{} }; /* ----------------------------------------------------------------------------- @@ -881,8 +883,8 @@ SET_STATIC_HDR(dummy_ret_closure,dummy_ret_info,CCS_DONT_CARE,,EI_) * -------------------------------------------------------------------------- */ #ifdef REG_R1 -INFO_TABLE_SRT_BITMAP(forceIO_ret_info,forceIO_ret_entry,0,0,0,0,RET_SMALL,,EF_,0,0); -FN_(forceIO_ret_entry) +INFO_TABLE_SRT_BITMAP(stg_forceIO_ret_info,stg_forceIO_ret_entry,0,0,0,0,RET_SMALL,,EF_,0,0); +STGFUN(stg_forceIO_ret_entry) { FB_ Sp++; @@ -891,8 +893,8 @@ FN_(forceIO_ret_entry) JMP_(GET_ENTRY(R1.cl)); } #else -INFO_TABLE_SRT_BITMAP(forceIO_ret_info,forceIO_ret_entry,0,0,0,0,RET_SMALL,,EF_,0,0); -FN_(forceIO_ret_entry) +INFO_TABLE_SRT_BITMAP(stg_forceIO_ret_info,stg_forceIO_ret_entry,0,0,0,0,RET_SMALL,,EF_,0,0); +STGFUN(forceIO_ret_entry) { StgClosure *rval; FB_ @@ -905,21 +907,21 @@ FN_(forceIO_ret_entry) } #endif -INFO_TABLE(forceIO_info,forceIO_entry,1,0,FUN_STATIC,,EF_,0,0); -FN_(forceIO_entry) +INFO_TABLE(stg_forceIO_info,stg_forceIO_entry,1,0,FUN_STATIC,,EF_,0,0); +FN_(stg_forceIO_entry) { FB_ /* Sp[0] contains the IO action we want to perform */ R1.p = (P_)Sp[0]; /* Replace it with the return continuation that enters the result. */ - Sp[0] = (W_)&forceIO_ret_info; + Sp[0] = (W_)&stg_forceIO_ret_info; Sp--; /* Push the RealWorld# tag and enter */ Sp[0] =(W_)REALWORLD_TAG; JMP_(GET_ENTRY(R1.cl)); FE_ } -SET_STATIC_HDR(forceIO_closure,forceIO_info,CCS_DONT_CARE,,EI_) +SET_STATIC_HDR(stg_forceIO_closure,stg_forceIO_info,CCS_DONT_CARE,,EI_) , /*payload*/{} }; @@ -929,7 +931,7 @@ SET_STATIC_HDR(forceIO_closure,forceIO_info,CCS_DONT_CARE,,EI_) #ifdef INTERPRETER -STGFUN(Hugs_CONSTR_entry) +STGFUN(stg_Hugs_CONSTR_entry) { /* R1 points at the constructor */ JMP_(ENTRY_CODE(((StgPtr*)Sp)[0])); @@ -945,17 +947,17 @@ STGFUN(Hugs_CONSTR_entry) FE_ \ } -RET_BCO_ENTRY_TEMPLATE(ret_bco_entry ); -RET_BCO_ENTRY_TEMPLATE(ret_bco_0_entry); -RET_BCO_ENTRY_TEMPLATE(ret_bco_1_entry); -RET_BCO_ENTRY_TEMPLATE(ret_bco_2_entry); -RET_BCO_ENTRY_TEMPLATE(ret_bco_3_entry); -RET_BCO_ENTRY_TEMPLATE(ret_bco_4_entry); -RET_BCO_ENTRY_TEMPLATE(ret_bco_5_entry); -RET_BCO_ENTRY_TEMPLATE(ret_bco_6_entry); -RET_BCO_ENTRY_TEMPLATE(ret_bco_7_entry); +RET_BCO_ENTRY_TEMPLATE(stg_ret_bco_entry ); +RET_BCO_ENTRY_TEMPLATE(stg_ret_bco_0_entry); +RET_BCO_ENTRY_TEMPLATE(stg_ret_bco_1_entry); +RET_BCO_ENTRY_TEMPLATE(stg_ret_bco_2_entry); +RET_BCO_ENTRY_TEMPLATE(stg_ret_bco_3_entry); +RET_BCO_ENTRY_TEMPLATE(stg_ret_bco_4_entry); +RET_BCO_ENTRY_TEMPLATE(stg_ret_bco_5_entry); +RET_BCO_ENTRY_TEMPLATE(stg_ret_bco_6_entry); +RET_BCO_ENTRY_TEMPLATE(stg_ret_bco_7_entry); -VEC_POLY_INFO_TABLE(ret_bco,0, NULL/*srt*/, 0/*srt_off*/, 0/*srt_len*/, RET_BCO,, EF_); +VEC_POLY_INFO_TABLE(stg_ret_bco,0, NULL/*srt*/, 0/*srt_off*/, 0/*srt_len*/, RET_BCO,, EF_); #endif /* INTERPRETER */ @@ -1003,7 +1005,7 @@ static INFO_TBL_CONST StgInfoTable izh_static_info; /* end the name with _closure, to convince the mangler this is a closure */ -StgIntCharlikeClosure CHARLIKE_closure[] = { +StgIntCharlikeClosure stg_CHARLIKE_closure[] = { CHARLIKE_HDR(0), CHARLIKE_HDR(1), CHARLIKE_HDR(2), @@ -1262,7 +1264,7 @@ StgIntCharlikeClosure CHARLIKE_closure[] = { CHARLIKE_HDR(255) }; -StgIntCharlikeClosure INTLIKE_closure[] = { +StgIntCharlikeClosure stg_INTLIKE_closure[] = { INTLIKE_HDR(-16), /* MIN_INTLIKE == -16 */ INTLIKE_HDR(-15), INTLIKE_HDR(-14), diff --git a/ghc/rts/Storage.c b/ghc/rts/Storage.c index 5919f7e..382acd3 100644 --- a/ghc/rts/Storage.c +++ b/ghc/rts/Storage.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Storage.c,v 1.27 2000/11/01 11:41:47 simonmar Exp $ + * $Id: Storage.c,v 1.28 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -496,7 +496,7 @@ stgAllocForGMP (size_t size_in_bytes) /* allocate and fill it in. */ arr = (StgArrWords *)allocate(total_size_in_words); - SET_ARR_HDR(arr, &ARR_WORDS_info, CCCS, data_size_in_words); + SET_ARR_HDR(arr, &stg_ARR_WORDS_info, CCCS, data_size_in_words); /* and return a ptr to the goods inside the array */ return(BYTE_ARR_CTS(arr)); diff --git a/ghc/rts/Storage.h b/ghc/rts/Storage.h index a9c6a09..aae36f4 100644 --- a/ghc/rts/Storage.h +++ b/ghc/rts/Storage.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Storage.h,v 1.16 2000/04/14 15:18:07 sewardj Exp $ + * $Id: Storage.h,v 1.17 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -104,7 +104,7 @@ recordMutable(StgMutClosure *p) bdescr *bd; #ifdef SMP - ASSERT(p->header.info == &WHITEHOLE_info || closure_MUTABLE(p)); + ASSERT(p->header.info == &stg_WHITEHOLE_info || closure_MUTABLE(p)); #else ASSERT(closure_MUTABLE(p)); #endif @@ -135,15 +135,15 @@ recordOldToNewPtrs(StgMutClosure *p) bd = Bdescr((P_)p1); \ if (bd->gen->no == 0) { \ ((StgInd *)p1)->indirectee = p2; \ - SET_INFO(p1,&IND_info); \ + SET_INFO(p1,&stg_IND_info); \ TICK_UPD_NEW_IND(); \ } else { \ ((StgIndOldGen *)p1)->indirectee = p2; \ - if (info != &BLACKHOLE_BQ_info) { \ + if (info != &stg_BLACKHOLE_BQ_info) { \ ((StgIndOldGen *)p1)->mut_link = bd->gen->mut_once_list; \ bd->gen->mut_once_list = (StgMutClosure *)p1; \ } \ - SET_INFO(p1,&IND_OLDGEN_info); \ + SET_INFO(p1,&stg_IND_OLDGEN_info); \ TICK_UPD_OLD_IND(); \ } \ } @@ -157,15 +157,15 @@ updateWithPermIndirection(const StgInfoTable *info, StgClosure *p1, StgClosure * bd = Bdescr((P_)p1); if (bd->gen->no == 0) { ((StgInd *)p1)->indirectee = p2; - SET_INFO(p1,&IND_PERM_info); + SET_INFO(p1,&stg_IND_PERM_info); TICK_UPD_NEW_PERM_IND(p1); } else { ((StgIndOldGen *)p1)->indirectee = p2; - if (info != &BLACKHOLE_BQ_info) { + if (info != &stg_BLACKHOLE_BQ_info) { ((StgIndOldGen *)p1)->mut_link = bd->gen->mut_once_list; bd->gen->mut_once_list = (StgMutClosure *)p1; } - SET_INFO(p1,&IND_OLDGEN_PERM_info); + SET_INFO(p1,&stg_IND_OLDGEN_PERM_info); TICK_UPD_OLD_PERM_IND(); } } diff --git a/ghc/rts/StoragePriv.h b/ghc/rts/StoragePriv.h index 7ef008d..e2b0120 100644 --- a/ghc/rts/StoragePriv.h +++ b/ghc/rts/StoragePriv.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StoragePriv.h,v 1.11 2000/11/01 11:41:47 simonmar Exp $ + * $Id: StoragePriv.h,v 1.12 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -64,7 +64,7 @@ dbl_link_onto(bdescr *bd, bdescr **list) * A mutable list is ended with END_MUT_LIST, so that we can use NULL * as an indication that an object is not on a mutable list. */ -#define END_MUT_LIST ((StgMutClosure *)(void *)&END_MUT_LIST_closure) +#define END_MUT_LIST ((StgMutClosure *)(void *)&stg_END_MUT_LIST_closure) #ifdef DEBUG extern void memInventory(void); diff --git a/ghc/rts/Updates.hc b/ghc/rts/Updates.hc index c6cc04d..891cd59 100644 --- a/ghc/rts/Updates.hc +++ b/ghc/rts/Updates.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Updates.hc,v 1.28 2000/05/16 15:56:00 simonmar Exp $ + * $Id: Updates.hc,v 1.29 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -142,8 +142,8 @@ VEC_POLY_INFO_TABLE(upd_frame,UPD_FRAME_BITMAP, NULL/*srt*/, 0/*srt_off*/, 0/*sr really an optimisation? --SDM) -------------------------------------------------------------------------- */ -INFO_TABLE(PAP_info,PAP_entry,/*special layout*/0,0,PAP,,EF_,"PAP","PAP"); -STGFUN(PAP_entry) +INFO_TABLE(stg_PAP_info,stg_PAP_entry,/*special layout*/0,0,PAP,,EF_,"PAP","PAP"); +STGFUN(stg_PAP_entry) { nat Words; P_ p; @@ -298,7 +298,7 @@ EXTFUN(stg_update_PAP) PapClosure = (StgPAP *)(Hp + 1 - PapSize); /* The new PapClosure */ - SET_HDR(PapClosure,&PAP_info,CCS_pap); + SET_HDR(PapClosure,&stg_PAP_info,CCS_pap); PapClosure->n_args = Words; PapClosure->fun = Fun; @@ -413,8 +413,8 @@ EXTFUN(stg_update_PAP) -------------------------------------------------------------------------- */ -INFO_TABLE(AP_UPD_info,AP_UPD_entry,/*special layout*/0,0,AP_UPD,,EF_,"AP_UPD","AP_UPD"); -STGFUN(AP_UPD_entry) +INFO_TABLE(stg_AP_UPD_info,stg_AP_UPD_entry,/*special layout*/0,0,AP_UPD,,EF_,"AP_UPD","AP_UPD"); +STGFUN(stg_AP_UPD_entry) { nat Words; P_ p; @@ -430,7 +430,7 @@ STGFUN(AP_UPD_entry) /* * Check for stack overflow. */ - STK_CHK(Words+sizeofW(StgUpdateFrame),AP_UPD_entry,R2.p,1,); + STK_CHK(Words+sizeofW(StgUpdateFrame),stg_AP_UPD_entry,R2.p,1,); PUSH_UPD_FRAME(R1.p, 0); Sp -= sizeofW(StgUpdateFrame) + Words; @@ -478,17 +478,17 @@ STGFUN(AP_UPD_entry) FE_ \ } -SEQ_FRAME_ENTRY_TEMPLATE(seq_frame_entry, ENTRY_CODE(Sp[0])); -SEQ_FRAME_ENTRY_TEMPLATE(seq_frame_0_entry,ENTRY_CODE(Sp[0])); -SEQ_FRAME_ENTRY_TEMPLATE(seq_frame_1_entry,ENTRY_CODE(Sp[0])); -SEQ_FRAME_ENTRY_TEMPLATE(seq_frame_2_entry,ENTRY_CODE(Sp[0])); -SEQ_FRAME_ENTRY_TEMPLATE(seq_frame_3_entry,ENTRY_CODE(Sp[0])); -SEQ_FRAME_ENTRY_TEMPLATE(seq_frame_4_entry,ENTRY_CODE(Sp[0])); -SEQ_FRAME_ENTRY_TEMPLATE(seq_frame_5_entry,ENTRY_CODE(Sp[0])); -SEQ_FRAME_ENTRY_TEMPLATE(seq_frame_6_entry,ENTRY_CODE(Sp[0])); -SEQ_FRAME_ENTRY_TEMPLATE(seq_frame_7_entry,ENTRY_CODE(Sp[0])); +SEQ_FRAME_ENTRY_TEMPLATE(stg_seq_frame_entry, ENTRY_CODE(Sp[0])); +SEQ_FRAME_ENTRY_TEMPLATE(stg_seq_frame_0_entry,ENTRY_CODE(Sp[0])); +SEQ_FRAME_ENTRY_TEMPLATE(stg_seq_frame_1_entry,ENTRY_CODE(Sp[0])); +SEQ_FRAME_ENTRY_TEMPLATE(stg_seq_frame_2_entry,ENTRY_CODE(Sp[0])); +SEQ_FRAME_ENTRY_TEMPLATE(stg_seq_frame_3_entry,ENTRY_CODE(Sp[0])); +SEQ_FRAME_ENTRY_TEMPLATE(stg_seq_frame_4_entry,ENTRY_CODE(Sp[0])); +SEQ_FRAME_ENTRY_TEMPLATE(stg_seq_frame_5_entry,ENTRY_CODE(Sp[0])); +SEQ_FRAME_ENTRY_TEMPLATE(stg_seq_frame_6_entry,ENTRY_CODE(Sp[0])); +SEQ_FRAME_ENTRY_TEMPLATE(stg_seq_frame_7_entry,ENTRY_CODE(Sp[0])); -VEC_POLY_INFO_TABLE(seq_frame, UPD_FRAME_BITMAP, NULL/*srt*/, 0/*srt_off*/, 0/*srt_len*/, SEQ_FRAME,, EF_); +VEC_POLY_INFO_TABLE(stg_seq_frame, UPD_FRAME_BITMAP, NULL/*srt*/, 0/*srt_off*/, 0/*srt_len*/, SEQ_FRAME,, EF_); /* ----------------------------------------------------------------------------- * The seq infotable @@ -501,11 +501,11 @@ VEC_POLY_INFO_TABLE(seq_frame, UPD_FRAME_BITMAP, NULL/*srt*/, 0/*srt_off*/, 0/*s * It is used in deleteThread when reverting blackholes. * -------------------------------------------------------------------------- */ -INFO_TABLE(seq_info,seq_entry,1,0,FUN,,EF_,0,0); -STGFUN(seq_entry) +INFO_TABLE(stg_seq_info,stg_seq_entry,1,0,FUN,,EF_,0,0); +STGFUN(stg_seq_entry) { FB_ - STK_CHK_GEN(sizeofW(StgSeqFrame), NO_PTRS, seq_entry, ); + STK_CHK_GEN(sizeofW(StgSeqFrame), NO_PTRS, stg_seq_entry, ); Sp -= sizeofW(StgSeqFrame); PUSH_SEQ_FRAME(Sp); R1.cl = R1.cl->payload[0]; diff --git a/ghc/rts/Weak.c b/ghc/rts/Weak.c index bc993ec..7cbf989 100644 --- a/ghc/rts/Weak.c +++ b/ghc/rts/Weak.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Weak.c,v 1.15 2000/06/20 15:18:40 simonmar Exp $ + * $Id: Weak.c,v 1.16 2000/11/13 14:40:37 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -34,10 +34,10 @@ finalizeWeakPointersNow(void) while ((w = weak_ptr_list)) { weak_ptr_list = w->link; - if (w->header.info != &DEAD_WEAK_info) { - w->header.info = &DEAD_WEAK_info; + if (w->header.info != &stg_DEAD_WEAK_info) { + w->header.info = &stg_DEAD_WEAK_info; IF_DEBUG(weak,fprintf(stderr,"Finalising weak pointer at %p -> %p\n", w, w->key)); - if (w->finalizer != &NO_FINALIZER_closure) { + if (w->finalizer != &stg_NO_FINALIZER_closure) { rts_evalIO(w->finalizer,NULL); } } @@ -67,7 +67,7 @@ scheduleFinalizers(StgWeak *list) /* count number of finalizers first... */ for (n = 0, w = list; w; w = w->link) { - if (w->finalizer != &NO_FINALIZER_closure) + if (w->finalizer != &stg_NO_FINALIZER_closure) n++; } @@ -76,15 +76,15 @@ scheduleFinalizers(StgWeak *list) IF_DEBUG(weak,fprintf(stderr,"weak: batching %d finalizers\n", n)); arr = (StgMutArrPtrs *)allocate(sizeofW(StgMutArrPtrs) + n); - SET_HDR(arr, &MUT_ARR_PTRS_FROZEN_info, CCS_SYSTEM); + SET_HDR(arr, &stg_MUT_ARR_PTRS_FROZEN_info, CCS_SYSTEM); arr->ptrs = n; for (n = 0, w = list; w; w = w->link) { - if (w->finalizer != &NO_FINALIZER_closure) { + if (w->finalizer != &stg_NO_FINALIZER_closure) { arr->payload[n] = w->finalizer; n++; } - w->header.info = &DEAD_WEAK_info; + w->header.info = &stg_DEAD_WEAK_info; } t = createIOThread(RtsFlags.GcFlags.initialStkSize, -- 1.7.10.4