From e778a17045aac8aded0e0438f5e0178643ff678d Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 9 Feb 2001 13:09:17 +0000 Subject: [PATCH] [project @ 2001-02-09 13:09:16 by simonmar] Remove all vestiges of INTERPRETER and __HUGS__. --- ghc/includes/SMP.h | 6 +- ghc/includes/Stg.h | 9 +- ghc/includes/StgMiscClosures.h | 10 +- ghc/includes/Updates.h | 6 +- ghc/includes/options.h | 240 ---------------------------------------- ghc/rts/Prelude.c | 203 --------------------------------- ghc/rts/Prelude.h | 76 +------------ ghc/rts/PrimOps.hc | 7 +- ghc/rts/Printer.c | 15 +-- ghc/rts/RtsStartup.c | 14 +-- ghc/rts/Sanity.c | 4 +- ghc/rts/Schedule.c | 12 +- ghc/rts/StgStartup.hc | 6 +- ghc/rts/Storage.h | 31 +----- 14 files changed, 17 insertions(+), 622 deletions(-) delete mode 100644 ghc/includes/options.h delete mode 100644 ghc/rts/Prelude.c diff --git a/ghc/includes/SMP.h b/ghc/includes/SMP.h index 3a31d96..0f15aa0 100644 --- a/ghc/includes/SMP.h +++ b/ghc/includes/SMP.h @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: SMP.h,v 1.2 2001/02/08 14:36:21 simonmar Exp $ + * $Id: SMP.h,v 1.3 2001/02/09 13:09:17 simonmar Exp $ * * (c) The GHC Team, 1999 * @@ -20,9 +20,7 @@ #if defined(SMP) -#if defined(INTERPRETER) \ - || defined(PROFILING) \ - || defined(TICKY_TICKY) +#if defined(PROFILING) || defined(TICKY_TICKY) #error Build options incompatible with SMP. #endif diff --git a/ghc/includes/Stg.h b/ghc/includes/Stg.h index 4c891b7..9e37b03 100644 --- a/ghc/includes/Stg.h +++ b/ghc/includes/Stg.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stg.h,v 1.34 2000/12/04 12:31:20 simonmar Exp $ + * $Id: Stg.h,v 1.35 2001/02/09 13:09:17 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -37,9 +37,6 @@ /* Configuration */ #include "config.h" -#ifdef __HUGS__ /* vile hack till the GHC folks come on board */ -#include "options.h" -#endif /* Some macros to handle DLLing (Win32 only at the moment). */ #include "StgDLL.h" @@ -65,10 +62,8 @@ # define LAZY_BLACKHOLING #endif -/* ToDo: Set this flag properly: COMPILER and INTERPRETER should not be mutually exclusive. */ -#ifndef INTERPRETER +/* ToDo: remove */ #define COMPILER 1 -#endif /* TABLES_NEXT_TO_CODE says whether to assume that info tables are * assumed to reside just before the code for a function. diff --git a/ghc/includes/StgMiscClosures.h b/ghc/includes/StgMiscClosures.h index 385d111..7875788 100644 --- a/ghc/includes/StgMiscClosures.h +++ b/ghc/includes/StgMiscClosures.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgMiscClosures.h,v 1.33 2001/01/29 17:23:41 simonmar Exp $ + * $Id: StgMiscClosures.h,v 1.34 2001/02/09 13:09:17 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -131,14 +131,6 @@ 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 stg_ret_bco_info; - -#endif /* INTERPRETER */ - /* closures */ extern DLL_IMPORT_RTS StgClosure stg_END_TSO_QUEUE_closure; diff --git a/ghc/includes/Updates.h b/ghc/includes/Updates.h index 9c17466..48df7a3 100644 --- a/ghc/includes/Updates.h +++ b/ghc/includes/Updates.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Updates.h,v 1.22 2001/01/29 17:23:41 simonmar Exp $ + * $Id: Updates.h,v 1.23 2001/02/09 13:09:17 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -239,10 +239,6 @@ extern void newCAF(StgClosure*); SET_INFO((StgInd *)cafptr,(const StgInfoTable*)&stg_IND_STATIC_info);\ } -#ifdef INTERPRETER -extern void newCAF_made_by_Hugs(StgCAF*); -#endif - /* ----------------------------------------------------------------------------- Update-related prototypes -------------------------------------------------------------------------- */ diff --git a/ghc/includes/options.h b/ghc/includes/options.h deleted file mode 100644 index 7993101..0000000 --- a/ghc/includes/options.h +++ /dev/null @@ -1,240 +0,0 @@ - -/* -------------------------------------------------------------------------- - * Configuration options - * - * Copyright (c) The University of Nottingham and Yale University, 1994-1997. - * All rights reserved. See NOTICE for details and conditions of use etc... - * Hugs version 1.4, December 1997 - * - * $RCSfile: options.h,v $ - * $Revision: 1.29 $ - * $Date: 2000/05/10 09:00:20 $ - * ------------------------------------------------------------------------*/ - - -/* -------------------------------------------------------------------------- - * Hugs paths and directories - * ------------------------------------------------------------------------*/ - -/* Define this as the default setting of HUGSPATH. - * Value may contain string "{Hugs}" (for which we will substitute the - * value of HUGSDIR) and should be either colon-separated (Unix) - * or semicolon-separated (Macintosh, Windows, DOS). Escape - * characters in the path string are interpreted according to normal - * Haskell conventions. - * - * This value can be overridden from the command line by setting the - * HUGSFLAGS environment variable or by storing an appropriate value - * for HUGSFLAGS in the registry (Win32 only). In all cases, use a - * string of the form -P"...". - */ -#define HUGSPATH "." - -/* The directory name which is substituted for the string "{Hugs}" - * in a path variable. This normally points to where the Hugs libraries - * are installed - ie so that the file HUGSDIR/lib/Prelude.hs exists - * Typical values are: - * "/usr/local/lib/hugs" - * "/usr/homes/JFHaskell/hugs" - * ".." - * - * This value is ignored on Windows and Macintosh versions since - * it is assumed that the binary is installed in HUGSDIR. - * - * This value cannot be overridden from the command line or by using - * environment variables. This isn't quite as limiting as you'd think - * since you can always choose _not_ to use the {Hugs} variable - however, - * it's obviously _nicer_ to have it set correctly. - */ -#ifndef HUGSDIR -#define HUGSDIR "." -#endif - - -/* -------------------------------------------------------------------------- - * User interface options - * ------------------------------------------------------------------------*/ - -/* Define if you want filenames to be converted to normal form by: - * o replacing relative pathnames with absolute pathnames and - * eliminating .. and . where possible. - * o converting to lower case (only in case-insensitive filesystems) - */ -#define PATH_CANONICALIZATION 0 - -/* Define if you want the small startup banner. - */ -#define SMALL_BANNER 0 - - -/* -------------------------------------------------------------------------- - * Language extensions - * ------------------------------------------------------------------------*/ - -/* Define if T-REX; Typed Rows and EXtension should be enabled */ -/* Doesn't work in current system - I don't know what the primops do */ -#define TREX 0 - -/* Implicit Parameters */ -#define IPARAM 1 - -/* Multi-instance resolution */ -#define MULTI_INST 0 - - -/* -------------------------------------------------------------------------- - * Various table sizes - * ------------------------------------------------------------------------*/ - -#define NUM_TUPLES 37 -#define NUM_CHARS 256 -#if TREX -#define NUM_EXT 100 -#endif -#define CHAR_MASK 0xff - -#define MINIMUMHEAP 19000 -#define MAXIMUMHEAP 0 -#define DEFAULTHEAP 320000 - -#define TEXT_SIZE 100000 -#define NUM_TEXTH 10 -#define NUM_TYVARS 4000 -#define NUM_STACK 16000 -#define NUM_DTUPLES 5 -#define NUM_MSTACK 2000 - -#define MAXPOSINT 0x7fffffff -#define MINNEGINT (-MAXPOSINT-1) -#define MAXHUGSWORD 0xffffffffU - -#define minRecovery 1000 -#define bitsPerWord 32 -#define wordShift 5 -#define wordMask 31 - -/* Should quantifiers be displayed in error messages. - * Warning: not consistently used. - */ -#define DISPLAY_QUANTIFIERS 0 - -/* Flags to determine which raw representations and operations are available - * Notes: - * o if you turn everything on, you might end up with more then 256 - * bytecodes: check the value of i_ccall (the lst bytecode) to check - * (JRS), 22apr99: I don't think any of the #undef'd ones will work - * without attention. However, standard Haskell 98 is supported - * is supported without needing them. - */ -#undef PROVIDE_WEAK - -#define PROVIDE_STABLE 1 -#define PROVIDE_FOREIGN 1 -#define PROVIDE_COERCE 1 -#define PROVIDE_PTREQUALITY 1 -#define PROVIDE_CONCURRENT 1 - -/* Turn bytecode interpreter support on/off. - */ -#define INTERPRETER 1 - -/* Turn on debugging output and some sanity checks - */ -/*#define DEBUG*/ - -/* NB: LAZY_BLACKHOLING has been moved up to Stg.h where both Hugs and GHC can see it, - * and EAGER_BLACKHOLING has been introduced also. KSW 1999-01. - */ - - -/* Turn miniinterpreter on/off. - * - * The mininterpreter is portable but slow - if you turn it off, - * you'll probably need to provide some assembly language support - * for your architecture. - */ -#define USE_MINIINTERPRETER 1 - -/* Turn registerisation on/off. - * - * If you turn this off, you'll probably need to provide some - * assembly language support for your architecture. - */ -/* Disabled by JRS 09 May 00. Seems unneccessary and generates a lot of - warnings compiling the RTS. -*/ -/* #define NO_REGS */ - - -/* Define if :xplain should be enabled */ -#define EXPLAIN_INSTANCE_RESOLUTION 0 - - -/* Define if you want to run Haskell code through a preprocessor - * - * Note that the :reload command doesn't know about any dependencies - * introduced by using #include so you must :load (not :reload) if - * you change any #included files (such as configuration files). - */ -#define USE_PREPROCESSOR 1 - -/* Define if you want to time every evaluation. - * - * Timing is included in the Hugs distribution for the purpose of benchmarking - * the Hugs interpreter, comparing its performance across a variety of - * different machines, and with other systems for similar languages. - * - * It would be somewhat foolish to try to use the timings produced in this - * way for any other purpose. In particular, using timings to compare the - * performance of different versions of an algorithm is likely to give very - * misleading results. The current implementation of Hugs as an interpreter, - * without any significant optimizations, means that there are much more - * significant overheads than can be accounted for by small variations in - * Hugs code. - */ -/* #undef WANT_TIMER */ - - -/* -------------------------------------------------------------------------- - * Desugaring options - * - * These options are mostly used for developing/debugging the system. - * Since they turn off required parts of the Haskell language, you'll - * probably need to modify Prelude.hs and the libraries if you change - * these flags. - * ------------------------------------------------------------------------*/ - -/* Define if single-element dictionaries are implemented by newtype. - * Should be turned on. Mostly used to make it easier to find which - * bits of code implement this optimisation and as a way of documenting - * them. - */ -#define USE_NEWTYPE_FOR_DICTS 1 - -/* Define if strings should be represented as normal C strings. - * Note that this doesn't work if the string contains '\0' - * and makes persistence problematic. - * Intended as a stop-gap measure until mutable byte arrays are available. - */ -#define USE_ADDR_FOR_STRINGS 1 - - -/* -------------------------------------------------------------------------- - * Experimental features - * These are likely to disappear/change in future versions and should not - * be used by most people.. - * ------------------------------------------------------------------------*/ - -/* In a plain Hugs system, most signals (SIGBUS, SIGTERM, etc) indicate - * some kind of error in Hugs - or maybe a stack overflow. Rather than - * just crash, Hugs catches these errors and returns to the main loop. - * It does this by calling a function "panic" which longjmp's back to the - * main loop. - * If you're developing a GreenCard library, this may not be the right - * behaviour - it's better if Hugs leaves them for your debugger to - * catch rather than trapping them and "panicking". - */ -#define DONT_PANIC 1 - - -/* ----------------------------------------------------------------------- */ diff --git a/ghc/rts/Prelude.c b/ghc/rts/Prelude.c deleted file mode 100644 index 5f8ed6d..0000000 --- a/ghc/rts/Prelude.c +++ /dev/null @@ -1,203 +0,0 @@ - -/* ----------------------------------------------------------------------------- - * $Id: Prelude.c,v 1.9 2000/08/07 23:37:23 qrczak Exp $ - * - * (c) The GHC Team, 1998-2000 - * - * Prelude identifiers that we sometimes need to refer to in the RTS. - * - * ---------------------------------------------------------------------------*/ - -#include "Rts.h" -#include "Prelude.h" - -#if defined(INTERPRETER) -const StgClosure *ind_True_closure; -const StgClosure *ind_False_closure; -const StgClosure *ind_unpackCString_closure; -const StgClosure *ind_runFinalizerBatch_closure; - -const StgClosure *ind_stackOverflow_closure; -const StgClosure *ind_heapOverflow_closure; -const StgClosure *ind_PutFullMVar_closure; -const StgClosure *ind_BlockedOnDeadMVar_closure; -const StgClosure *ind_NonTermination_closure; - -const StgInfoTable *ind_Czh_static_info; -const StgInfoTable *ind_Izh_static_info; -const StgInfoTable *ind_Fzh_static_info; -const StgInfoTable *ind_Dzh_static_info; -const StgInfoTable *ind_Azh_static_info; -const StgInfoTable *ind_Wzh_static_info; -const StgInfoTable *ind_Czh_con_info; -const StgInfoTable *ind_Izh_con_info; -const StgInfoTable *ind_Fzh_con_info; -const StgInfoTable *ind_Dzh_con_info; -const StgInfoTable *ind_Azh_con_info; -const StgInfoTable *ind_Wzh_con_info; -const StgInfoTable *ind_I64zh_con_info; -const StgInfoTable *ind_W64zh_con_info; -const StgInfoTable *ind_StablePtr_static_info; -const StgInfoTable *ind_StablePtr_con_info; - -INFO_TABLE_CONSTR(hugs_standalone_Czh_con_info,Hugs_CONSTR_entry, - 0,sizeofW(StgChar),0,CONSTR,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_Izh_con_info,Hugs_CONSTR_entry, - 0,sizeofW(StgInt),0,CONSTR,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_I64zh_con_info,Hugs_CONSTR_entry, - 0,sizeofW(StgInt64),0,CONSTR,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_W64zh_con_info,Hugs_CONSTR_entry, - 0,sizeofW(StgWord64),0,CONSTR,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_Fzh_con_info,Hugs_CONSTR_entry, - 0,sizeofW(StgFloat),0,CONSTR,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_Dzh_con_info,Hugs_CONSTR_entry, - 0,sizeofW(StgDouble),0,CONSTR,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_Azh_con_info,Hugs_CONSTR_entry, - 0,sizeofW(StgAddr),0,CONSTR,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_Wzh_con_info,Hugs_CONSTR_entry, - 0,sizeofW(StgWord),0,CONSTR,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_StablePtr_con_info,Hugs_CONSTR_entry, - 0,sizeofW(StgStablePtr),0,CONSTR,,EF_,0,0); - -INFO_TABLE_CONSTR(hugs_standalone_Czh_static_info,Hugs_CONSTR_entry, - 0,sizeofW(StgChar),0,CONSTR_NOCAF_STATIC,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_Izh_static_info,Hugs_CONSTR_entry, - 0,sizeofW(StgInt),0,CONSTR_NOCAF_STATIC,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_I64zh_static_info,Hugs_CONSTR_entry, - 0,sizeofW(StgInt64),0,CONSTR_NOCAF_STATIC,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_Fzh_static_info,Hugs_CONSTR_entry, - 0,sizeofW(StgFloat),0,CONSTR_NOCAF_STATIC,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_Dzh_static_info,Hugs_CONSTR_entry, - 0,sizeofW(StgDouble),0,CONSTR_NOCAF_STATIC,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_Azh_static_info,Hugs_CONSTR_entry, - 0,sizeofW(StgAddr),0,CONSTR_NOCAF_STATIC,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_Wzh_static_info,Hugs_CONSTR_entry, - 0,sizeofW(StgWord),0,CONSTR_NOCAF_STATIC,,EF_,0,0); -INFO_TABLE_CONSTR(hugs_standalone_StablePtr_static_info,Hugs_CONSTR_entry, - 0,sizeofW(StgStablePtr),0,CONSTR_NOCAF_STATIC,,EF_,0,0); - -#ifdef XMLAMBDA -/* The Inj constructor: data Inj = forall a. Inj a Int# - Since this one is not present in Haskell compiled stuff, we bind it statically. -*/ -INFO_TABLE_CONSTR(xmlambda_Inj_con_info,Hugs_CONSTR_entry, - sizeofW(StgPtr),sizeofW(StgInt),0,CONSTR,,EF_,0,0); - -const StgInfoTable* ind_Inj_con_info = &xmlambda_Inj_con_info; -#endif /* XMLAMBDA */ - -#endif - - -/* Fix up references to various Prelude symbols. For Hugs, we - pass either NULL, to denote standalone mode, or the address of - a lookup function which finds the specified symbol in the - compiled Prelude which Hugs has just loaded. - - In combined mode, call here when POSTPREL is signalled in link.c - (since before that point, there are no symbols to link to). - In standalone mode, call here at any time, preferably as early - as possible -- when PREPREL is signalled. - - At the moment, standalone mode does not link True, False, - PutFullMVar or NonTermination. That might change (if we - implement them in the Hugs standalone Prelude), but then - we (1) need a way to ask hugs the address of the BCOs, and - (2) this can only be done at POSTPREL time. -*/ -void fixupRTStoPreludeRefs ( void*(*ask_hugs_dynamic_linker)(char*) ) -{ - (void)ask_hugs_dynamic_linker; /* keep gcc -Wall happy */ -#if defined(INTERPRETER) - if (ask_hugs_dynamic_linker == NULL) { - - /* Hugs standalone mode. */ - ind_True_closure = NULL; /* True__closure; */ - ind_False_closure = NULL; /* False_closure; */ - ind_runFinalizerBatch_closure = NULL; /* runFinalizerBatch_closure; */ - ind_PutFullMVar_closure = NULL; /* PutFullMVar_closure; */ - ind_BlockedOnDeadMVar_closure = NULL; /* BlockedOnDeadMVar_closure; */ - ind_NonTermination_closure = NULL; /* NonTermination_closure; */ - ind_unpackCString_closure = NULL; /* unpackCString_closure; */ - - ind_stackOverflow_closure = stackOverflow_closure; - ind_heapOverflow_closure = heapOverflow_closure; - - ind_Czh_static_info = &hugs_standalone_Czh_static_info; - ind_Izh_static_info = &hugs_standalone_Izh_static_info; - ind_Fzh_static_info = &hugs_standalone_Fzh_static_info; - ind_Dzh_static_info = &hugs_standalone_Dzh_static_info; - ind_Azh_static_info = &hugs_standalone_Azh_static_info; - ind_Wzh_static_info = &hugs_standalone_Wzh_static_info; - ind_Czh_con_info = &hugs_standalone_Czh_con_info; - ind_Izh_con_info = &hugs_standalone_Izh_con_info; - ind_Fzh_con_info = &hugs_standalone_Fzh_con_info; - ind_Dzh_con_info = &hugs_standalone_Dzh_con_info; - ind_Azh_con_info = &hugs_standalone_Azh_con_info; - ind_Wzh_con_info = &hugs_standalone_Wzh_con_info; - ind_I64zh_con_info = &hugs_standalone_I64zh_con_info; - ind_W64zh_con_info = &hugs_standalone_W64zh_con_info; - ind_StablePtr_static_info = &hugs_standalone_StablePtr_static_info; - ind_StablePtr_con_info = &hugs_standalone_StablePtr_con_info; - - } else { - - /* Hugs combined mode. */ - void*(*ask)(char*) = ask_hugs_dynamic_linker; - - ind_True_closure - = ask("PrelBase_True_closure"); - ind_False_closure - = ask("PrelBase_False_closure"); - ind_runFinalizerBatch_closure - = ask("PrelWeak_runFinalizzerBatch_closure"); - ind_PutFullMVar_closure - = ask("PrelException_PutFullMVar_closure"); - ind_BlockedOnDeadMVar_closure - = ask("PrelException_BlockedOnDeadMVar_closure"); - ind_NonTermination_closure - = ask("PrelException_NonTermination_closure"); - - ind_unpackCString_closure = ask("PrelPack_unpackCString_closure"); - ind_stackOverflow_closure = ask("PrelException_stackOverflow_closure"); - ind_heapOverflow_closure = ask("PrelException_heapOverflow_closure"); - - ind_Czh_static_info = ask("PrelBase_Czh_static_info"); - ind_Izh_static_info = ask("PrelBase_Izh_static_info"); - ind_Fzh_static_info = ask("PrelFloat_Fzh_static_info"); - ind_Dzh_static_info = ask("PrelFloat_Dzh_static_info"); - ind_Azh_static_info = ask("PrelAddr_Azh_static_info"); - ind_Wzh_static_info = ask("PrelAddr_Wzh_static_info"); - ind_Czh_con_info = ask("PrelBase_Czh_con_info"); - ind_Izh_con_info = ask("PrelBase_Izh_con_info"); - ind_Fzh_con_info = ask("PrelFloat_Fzh_con_info"); - ind_Dzh_con_info = ask("PrelFloat_Dzh_con_info"); - ind_Azh_con_info = ask("PrelAddr_Azh_con_info"); - ind_Wzh_con_info = ask("PrelAddr_Wzh_con_info"); - ind_I64zh_con_info = ask("PrelAddr_I64zh_con_info"); - ind_W64zh_con_info = ask("PrelAddr_W64zh_con_info"); - ind_StablePtr_static_info = ask("PrelStable_StablePtr_static_info"); - ind_StablePtr_con_info = ask("PrelStable_StablePtr_con_info"); - - } -#endif - - /* When the RTS and Prelude live in separate DLLs, - we need to patch up the char- and int-like tables - that the RTS keeps after both DLLs have been loaded, - filling in the tables with references to where the - static info tables have been loaded inside the running - process. - */ -#if defined(INTERPRETER) || defined(ENABLE_WIN32_DLL_SUPPORT) - { - int i; - - for(i=0; i<=MAX_CHARLIKE-MIN_CHARLIKE; i++) - (CHARLIKE_closure[i]).header.info = Czh_static_info; - - for(i=0; i<=MAX_INTLIKE-MIN_INTLIKE; i++) - (INTLIKE_closure[i]).header.info = Izh_static_info; - } -#endif -} diff --git a/ghc/rts/Prelude.h b/ghc/rts/Prelude.h index e2c0457..48f72e4 100644 --- a/ghc/rts/Prelude.h +++ b/ghc/rts/Prelude.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Prelude.h,v 1.13 2001/01/11 17:25:56 simonmar Exp $ + * $Id: Prelude.h,v 1.14 2001/02/09 13:09:16 simonmar Exp $ * * (c) The GHC Team, 1998-2001 * @@ -14,7 +14,6 @@ * modules these names are defined in. */ -#ifndef INTERPRETER extern DLL_IMPORT const StgClosure PrelBase_True_closure; extern DLL_IMPORT const StgClosure PrelBase_False_closure; extern DLL_IMPORT const StgClosure PrelPack_unpackCString_closure; @@ -106,77 +105,4 @@ extern DLL_IMPORT const StgInfoTable PrelStable_StablePtr_con_info; #define StablePtr_static_info (&PrelStable_StablePtr_static_info) #define StablePtr_con_info (&PrelStable_StablePtr_con_info) -#else /* INTERPRETER */ - -/* We need indirections to the Prelude stuff, because we can't link - * these symbols statically. - */ -extern const StgClosure *ind_True_closure; -extern const StgClosure *ind_False_closure; -extern const StgClosure *ind_unpackCString_closure; -extern const StgClosure *ind_runFinalizerBatch_closure; - -extern const StgClosure *ind_stackOverflow_closure; -extern const StgClosure *ind_heapOverflow_closure; -extern const StgClosure *ind_PutFullMVar_closure; -extern const StgClosure *ind_BlockedOnDeadMVar_closure; -extern const StgClosure *ind_NonTermination_closure; - -extern const StgInfoTable *ind_Czh_static_info; -extern const StgInfoTable *ind_Izh_static_info; -extern const StgInfoTable *ind_Fzh_static_info; -extern const StgInfoTable *ind_Dzh_static_info; -extern const StgInfoTable *ind_Azh_static_info; -extern const StgInfoTable *ind_Wzh_static_info; -extern const StgInfoTable *ind_Czh_con_info; -extern const StgInfoTable *ind_Izh_con_info; -extern const StgInfoTable *ind_Fzh_con_info; -extern const StgInfoTable *ind_Dzh_con_info; -extern const StgInfoTable *ind_Azh_con_info; -extern const StgInfoTable *ind_Wzh_con_info; -extern const StgInfoTable *ind_I64zh_con_info; -extern const StgInfoTable *ind_W64zh_con_info; -extern const StgInfoTable *ind_StablePtr_static_info; -extern const StgInfoTable *ind_StablePtr_con_info; - -#define True_closure ind_True_closure -#define False_closure ind_False_closure -#define unpackCString_closure ind_unpackCString_closure -#define runFinalizerBatch_closure ind_runFinalizerBatch_closure - -#define stackOverflow_closure ind_stackOverflow_closure -#define heapOverflow_closure ind_heapOverflow_closure -#define PutFullMVar_closure ind_PutFullMVar_closure -#define BlockedOnDeadMVar_closure ind_BlockedOnDeadMVar_closure -#define NonTermination_closure ind_NonTermination_closure - -#define Czh_static_info ind_Czh_static_info -#define Izh_static_info ind_Izh_static_info -#define Fzh_static_info ind_Fzh_static_info -#define Dzh_static_info ind_Dzh_static_info -#define Azh_static_info ind_Azh_static_info -#define Wzh_static_info ind_Wzh_static_info -#define Czh_con_info ind_Czh_con_info -#define Izh_con_info ind_Izh_con_info -#define Fzh_con_info ind_Fzh_con_info -#define Dzh_con_info ind_Dzh_con_info -#define Azh_con_info ind_Azh_con_info -#define Wzh_con_info ind_Wzh_con_info -#define W64zh_con_info ind_W64zh_con_info -#define I64zh_con_info ind_I64zh_con_info -#define StablePtr_static_info ind_StablePtr_static_info -#define StablePtr_con_info ind_StablePtr_con_info - -#ifdef XMLAMBDA -/* The Inj constructor. Not present in combined mode or compiled code. */ - -extern const StgInfoTable *ind_Inj_con_info; -#define Inj_con_info ind_Inj_con_info - -#endif - -#endif - -void fixupRTStoPreludeRefs( void*(*)(char*) ); - #endif /* PRELUDE_H */ diff --git a/ghc/rts/PrimOps.hc b/ghc/rts/PrimOps.hc index efb83c5..6355a09 100644 --- a/ghc/rts/PrimOps.hc +++ b/ghc/rts/PrimOps.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: PrimOps.hc,v 1.69 2001/01/25 13:30:31 simonmar Exp $ + * $Id: PrimOps.hc,v 1.70 2001/02/09 13:09:16 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -944,13 +944,8 @@ FN_(putMVarzh_fast) #endif if (info == &stg_FULL_MVAR_info) { -#ifdef INTERPRETER - fprintf(stderr, "fatal: put on a full MVar in Hugs; aborting\n" ); - exit(1); -#else R1.cl = (StgClosure *)PutFullMVar_closure; JMP_(raisezh_fast); -#endif } mvar->value = R2.cl; diff --git a/ghc/rts/Printer.c b/ghc/rts/Printer.c index b163389..fee32ea 100644 --- a/ghc/rts/Printer.c +++ b/ghc/rts/Printer.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Printer.c,v 1.34 2001/01/29 17:23:41 simonmar Exp $ + * $Id: Printer.c,v 1.35 2001/02/09 13:09:16 simonmar Exp $ * * (c) The GHC Team, 1994-2000. * @@ -45,24 +45,11 @@ static void printZcoded ( const char *raw ); * Printer * ------------------------------------------------------------------------*/ -#ifdef INTERPRETER -char* lookupHugsItblName ( void* itbl ); -#endif - void printPtr( StgPtr p ) { -#ifdef INTERPRETER - char* str; -#endif const char *raw; if (lookupGHCName( p, &raw )) { printZcoded(raw); -#ifdef INTERPRETER - } else if ((raw = lookupHugsName(p)) != 0) { - fprintf(stderr, "%s", raw); - } else if ((str = lookupHugsItblName(p)) != 0) { - fprintf(stderr, "%p=%s", p, str); -#endif } else { fprintf(stderr, "%p", p); } diff --git a/ghc/rts/RtsStartup.c b/ghc/rts/RtsStartup.c index 9bdc155..013fe66 100644 --- a/ghc/rts/RtsStartup.c +++ b/ghc/rts/RtsStartup.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsStartup.c,v 1.47 2001/02/09 12:09:33 simonmar Exp $ + * $Id: RtsStartup.c,v 1.48 2001/02/09 13:09:16 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -165,9 +165,7 @@ startupHaskell(int argc, char *argv[], void (*init_root)(void)) #endif /* run the per-module initialisation code */ -#if !defined(INTERPRETER) initModules(init_root); -#endif #if defined(PROFILING) || defined(DEBUG) initProfiling2(); @@ -192,14 +190,6 @@ startupHaskell(int argc, char *argv[], void (*init_root)(void)) init_default_handlers(); #endif -#if !defined(INTERPRETER) - /* Initialise pointers from the RTS to the prelude. - Only for compiled code -- the interpreter - will call this itself later, so don't do so now. - */ - fixupRTStoPreludeRefs(NULL); -#endif - #ifdef RTS_GTK_FRONTPANEL if (RtsFlags.GcFlags.frontpanel) { initFrontPanel(); @@ -242,7 +232,6 @@ startupHaskell(int argc, char *argv[], void (*init_root)(void)) F_ *init_stack = NULL; nat init_sp = 0; -#ifndef INTERPRETER static void initModules ( void (*init_root)(void) ) { @@ -263,7 +252,6 @@ initModules ( void (*init_root)(void) ) cap.rSp = (P_)(init_stack + init_sp); StgRun((StgFunPtr)stg_init, &cap); } -#endif /* !INTERPRETER */ /* ----------------------------------------------------------------------------- * Shutting down the RTS - two ways of doing this, one which diff --git a/ghc/rts/Sanity.c b/ghc/rts/Sanity.c index bd5d96a..4218afa 100644 --- a/ghc/rts/Sanity.c +++ b/ghc/rts/Sanity.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Sanity.c,v 1.25 2001/01/29 17:23:41 simonmar Exp $ + * $Id: Sanity.c,v 1.26 2001/02/09 13:09:16 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -219,9 +219,7 @@ checkClosure( StgClosure* p ) { const StgInfoTable *info; -#ifndef INTERPRETER ASSERT(LOOKS_LIKE_GHC_INFO(p->header.info)); -#endif /* Is it a static closure (i.e. in the data segment)? */ if (LOOKS_LIKE_STATIC(p)) { diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 9e6b057..665e60f 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.88 2001/01/31 11:04:29 simonmar Exp $ + * $Id: Schedule.c,v 1.89 2001/02/09 13:09:16 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -1614,11 +1614,6 @@ initScheduler(void) RtsFlags.ConcFlags.ctxtSwitchTicks = RtsFlags.ConcFlags.ctxtSwitchTime / TICK_MILLISECS; -#ifdef INTERPRETER - ecafList = END_ECAF_LIST; - clearECafTable(); -#endif - /* Install the SIGHUP handler */ #ifdef SMP { @@ -2076,13 +2071,8 @@ threadStackOverflow(StgTSO *tso) printStackChunk(tso->sp, stg_min(tso->stack+tso->stack_size, tso->sp+64))); -#ifdef INTERPRETER - fprintf(stderr, "fatal: stack overflow in Hugs; aborting\n" ); - exit(1); -#else /* Send this thread the StackOverflow exception */ raiseAsync(tso, (StgClosure *)stackOverflow_closure); -#endif return tso; } diff --git a/ghc/rts/StgStartup.hc b/ghc/rts/StgStartup.hc index 5949c86..f4e5683 100644 --- a/ghc/rts/StgStartup.hc +++ b/ghc/rts/StgStartup.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgStartup.hc,v 1.13 2000/04/26 13:50:27 simonmar Exp $ + * $Id: StgStartup.hc,v 1.14 2001/02/09 13:09:16 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -138,8 +138,6 @@ STGFUN(stg_enterStackTop) we currently disable module initialisation for Hugs. -------------------------------------------------------------------------- */ -#ifndef INTERPRETER - extern F_ *init_stack; STGFUN(stg_init_ret) @@ -165,5 +163,3 @@ STGFUN(stg_init) START_MOD_INIT(__init_PrelGHC); END_MOD_INIT(); - -#endif /* !INTERPRETER */ diff --git a/ghc/rts/Storage.h b/ghc/rts/Storage.h index fcaca04..7d9815a 100644 --- a/ghc/rts/Storage.h +++ b/ghc/rts/Storage.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Storage.h,v 1.27 2001/02/09 10:33:22 sewardj Exp $ + * $Id: Storage.h,v 1.28 2001/02/09 13:09:16 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -248,21 +248,6 @@ updateWithPermIndirection(const StgInfoTable *info, StgClosure *p1, StgClosure * The CAF table - used to let us revert CAFs -------------------------------------------------------------------------- */ -#if defined(INTERPRETER) -typedef struct StgCAFTabEntry_ { - StgClosure* closure; - StgInfoTable* origItbl; -} StgCAFTabEntry; - -extern void addToECafTable ( StgClosure* closure, StgInfoTable* origItbl ); -extern void clearECafTable ( void ); - -extern StgCAF* ecafList; -extern StgCAFTabEntry* ecafTable; -extern StgInt usedECafTable; -extern StgInt sizeECafTable; -#endif - #if defined(DEBUG) void printMutOnceList(generation *gen); void printMutableList(generation *gen); @@ -351,7 +336,7 @@ void printMutableList(generation *gen); extern void* TEXT_SECTION_END_MARKER_DECL; extern void* DATA_SECTION_END_MARKER_DECL; -#if defined(INTERPRETER) || defined(GHCI) +#if defined(GHCI) /* Take into account code sections in dynamically loaded object files. */ #define IS_CODE_PTR(p) ( ((P_)(p) < (P_)&TEXT_SECTION_END_MARKER) \ || is_dynamically_loaded_code_or_rodata_ptr((char *)p) ) @@ -465,7 +450,7 @@ extern int is_heap_alloced(const void* x); LOOKS_LIKE_STATIC() - distinguishes between static and heap allocated data. */ -#if defined(ENABLE_WIN32_DLL_SUPPORT) && !defined(INTERPRETER) +#if defined(ENABLE_WIN32_DLL_SUPPORT) /* definitely do not enable for mingw DietHEP */ #define LOOKS_LIKE_STATIC(r) (!(HEAP_ALLOCED(r))) @@ -495,15 +480,7 @@ extern int is_heap_alloced(const void* x); infotables for constructors on the (writable) C heap. -------------------------------------------------------------------------- */ -#ifdef INTERPRETER -# ifdef USE_MINIINTERPRETER - /* yoiks: one of the dreaded pointer equality tests */ -# define IS_HUGS_CONSTR_INFO(info) \ - (((StgInfoTable *)(info))->entry == (StgFunPtr)&Hugs_CONSTR_entry) -# else -# define IS_HUGS_CONSTR_INFO(info) 0 /* ToDo: more than mildly bogus */ -# endif -#elif GHCI +#ifdef GHCI /* not accurate by any means, but stops the assertions failing... */ # define IS_HUGS_CONSTR_INFO(info) IS_USER_PTR(info) #else -- 1.7.10.4