diff --git a/ghc/includes/StgMacros.h b/ghc/includes/StgMacros.h index 9cfc6c69b29765893e65413d963c1b5f298bb253..bc269ad1993291a01b7d0cd373e1e6531e67725f 100644 --- a/ghc/includes/StgMacros.h +++ b/ghc/includes/StgMacros.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgMacros.h,v 1.18 1999/11/09 15:57:40 simonmar Exp $ + * $Id: StgMacros.h,v 1.19 1999/11/22 16:44:30 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -70,58 +70,22 @@ words in the block. -------------------------------------------------------------------------- */ -#ifndef DEBUG_EXTRA #define ARGTAG_MAX 16 /* probably arbitrary */ #define ARG_TAG(n) (n) -#define ARG_SIZE(n) stgCast(StgWord,n) +#define ARG_SIZE(n) (StgWord)n typedef enum { REALWORLD_TAG = 0, - INT_TAG = sizeofW(StgInt), - INT64_TAG = sizeofW(StgInt64), - WORD_TAG = sizeofW(StgWord), - ADDR_TAG = sizeofW(StgAddr), - CHAR_TAG = sizeofW(StgChar), - FLOAT_TAG = sizeofW(StgFloat), - DOUBLE_TAG = sizeofW(StgDouble), - STABLE_TAG = sizeofW(StgWord), + INT_TAG = sizeofW(StgInt), + INT64_TAG = sizeofW(StgInt64), + WORD_TAG = sizeofW(StgWord), + ADDR_TAG = sizeofW(StgAddr), + CHAR_TAG = sizeofW(StgChar), + FLOAT_TAG = sizeofW(StgFloat), + DOUBLE_TAG = sizeofW(StgDouble), + STABLE_TAG = sizeofW(StgWord), } StackTag; -#else /* DEBUG_EXTRA */ - -typedef enum { - ILLEGAL_TAG, - REALWORLD_TAG, - INT_TAG , - INT64_TAG , - WORD_TAG , - ADDR_TAG , - CHAR_TAG , - FLOAT_TAG , - DOUBLE_TAG , - STABLE_TAG , - ARGTAG_MAX = DOUBLE_TAG -} StackTag; - -/* putting this in a .h file generates many copies - but its only a - * debugging build. - */ -static StgWord stg_arg_size[] = { - [REALWORLD_TAG] = 0, - [INT_TAG ] = sizeofW(StgInt), - [INT64_TAG ] = sizeofW(StgInt64), - [WORD_TAG ] = sizeofW(StgWord), - [ADDR_TAG ] = sizeofW(StgAddr), - [CHAR_TAG ] = sizeofW(StgChar), - [FLOAT_TAG ] = sizeofW(StgFloat), - [DOUBLE_TAG] = sizeofW(StgDouble), - [STABLE_TAG] = sizeofW(StgWord) -}; - -#define ARG_SIZE(tag) stg_arg_size[stgCast(StgWord,tag)] - -#endif /* DEBUG_EXTRA */ - static inline int IS_ARG_TAG( StgWord p ); static inline int IS_ARG_TAG( StgWord p ) { return p <= ARGTAG_MAX; } diff --git a/ghc/includes/options.h b/ghc/includes/options.h index ac8e2832c462ca36f167d660d64a147ea1f58fae..aec07a72b088a3d84d47dfa0eb9918f6a3f60054 100644 --- a/ghc/includes/options.h +++ b/ghc/includes/options.h @@ -13,8 +13,8 @@ * Hugs version 1.4, December 1997 * * $RCSfile: options.h,v $ - * $Revision: 1.12 $ - * $Date: 1999/11/12 17:32:36 $ + * $Revision: 1.13 $ + * $Date: 1999/11/22 16:44:31 $ * ------------------------------------------------------------------------*/ @@ -218,11 +218,6 @@ */ /*#define DEBUG*/ -/* Make stack tags more informative than just their size. - * Helps when printing the stack and when running sanity checks. - */ -/*#define DEBUG_EXTRA*/ - /* 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. */ diff --git a/ghc/interpreter/Makefile b/ghc/interpreter/Makefile index 45f4a143076af3d9d5268752a78a147ba3f25350..4fcc0e8acd8fe025407c649b13bf6aa3304844c5 100644 --- a/ghc/interpreter/Makefile +++ b/ghc/interpreter/Makefile @@ -1,6 +1,6 @@ # --------------------------------------------------------------------------- # -# $Id: Makefile,v 1.19 1999/11/22 10:13:00 sewardj Exp $ # +# $Id: Makefile,v 1.20 1999/11/22 16:44:32 sewardj Exp $ # # --------------------------------------------------------------------------- # TOP = .. @@ -38,7 +38,7 @@ C_SRCS = link.c type.c static.c storage.c derive.c input.c compiler.c subst.c \ translate.c codegen.c lift.c free.c stgSubst.c output.c \ hugs.c dynamic.c stg.c sainteger.c interface.c -SRC_CC_OPTS = -g -O -I$(GHC_INTERPRETER_DIR) -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR) -D__HUGS__ -DCOMPILING_RTS -Wall -Wstrict-prototypes -Wno-unused -DDEBUG -DDEBUG_EXTRA -Winline +SRC_CC_OPTS = -g -O -I$(GHC_INTERPRETER_DIR) -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR) -D__HUGS__ -DCOMPILING_RTS -Wall -Wstrict-prototypes -Wno-unused -DDEBUG -Winline GHC_LIBS_NEEDED = $(GHC_RUNTIME_DIR)/libHSrts.a diff --git a/ghc/rts/Printer.c b/ghc/rts/Printer.c index a6e0c4c92244d9f726e4cdb5ed37007879281998..844acca317796ffc54e79b19d6cfa45b3e68c017 100644 --- a/ghc/rts/Printer.c +++ b/ghc/rts/Printer.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------------- - * $Id: Printer.c,v 1.16 1999/11/22 16:16:35 sewardj Exp $ + * $Id: Printer.c,v 1.17 1999/11/22 16:44:33 sewardj Exp $ * * Copyright (c) 1994-1999. * @@ -299,7 +299,8 @@ void printClosure( StgClosure *obj ) } default: //barf("printClosure %d",get_itbl(obj)->type); - fprintf(stderr, "*** printClosure: unknown type %d ****\n",get_itbl(obj)->type ); + fprintf(stderr, "*** printClosure: unknown type %d ****\n", + get_itbl(obj)->type ); return; } } @@ -309,53 +310,12 @@ StgPtr printStackObj( StgPtr sp ) /*fprintf(stderr,"Stack[%d] = ", &stgStack[STACK_SIZE] - sp); */ if (IS_ARG_TAG(*sp)) { - -#ifdef DEBUG - StackTag tag = (StackTag)*sp; - switch ( tag ) { - case ILLEGAL_TAG: - barf("printStackObj: ILLEGAL_TAG"); - break; - case REALWORLD_TAG: - fprintf(stderr,"RealWorld#\n"); - break; - case INT_TAG: - fprintf(stderr,"Int# %d\n", *(StgInt*)(sp+1)); - break; - case INT64_TAG: - fprintf(stderr,"Int64# %lld\n", *(StgInt64*)(sp+1)); - break; - case WORD_TAG: - fprintf(stderr,"Word# %d\n", *(StgWord*)(sp+1)); - break; - case ADDR_TAG: - fprintf(stderr,"Addr# "); printPtr(*(StgAddr*)(sp+1)); fprintf(stderr,"\n"); - break; - case CHAR_TAG: - fprintf(stderr,"Char# %d\n", *(StgChar*)(sp+1)); - break; - case FLOAT_TAG: - fprintf(stderr,"Float# %f\n", PK_FLT(sp+1)); - break; - case DOUBLE_TAG: - fprintf(stderr,"Double# %f\n", PK_DBL(sp+1)); - break; - default: - barf("printStackObj: unrecognised ARGTAG %d",tag); + nat i; + StgWord tag = *sp++; + fprintf(stderr,"Tag: %d words\n", tag); + for (i = 0; i < tag; i++) { + fprintf(stderr,"Word# %d\n", *sp++); } - sp += 1 + ARG_SIZE(tag); - -#else /* !DEBUG */ - { - StgWord tag = *sp++; - nat i; - fprintf(stderr,"Tag: %d words\n", tag); - for (i = 0; i < tag; i++) { - fprintf(stderr,"Word# %d\n", *sp++); - } - } -#endif - } else { StgClosure* c = (StgClosure*)(*sp); printPtr((StgPtr)*sp); diff --git a/mk/config.h.in b/mk/config.h.in index 11e7082e523c73b5680c624de3d2d02e861e6c57..6dd7e89f37db0b81a2188f6fac45ba57b3d0e288 100644 --- a/mk/config.h.in +++ b/mk/config.h.in @@ -114,6 +114,9 @@ /* Define if you support the production (and use) of Win32 DLLs. */ #undef HAVE_WIN32_DLL_SUPPORT +/* Define if you have and want to use readline in Hugs. */ +#undef HAVE_LIBREADLINE + /* Define if C Symbols have a leading underscore added by the compiler */ #undef LEADING_UNDERSCORE @@ -457,6 +460,3 @@ /* Define if you have the iberty library (-liberty). */ #undef HAVE_LIBIBERTY - -/* Define if you have the readline library (-lreadline). */ -#undef HAVE_LIBREADLINE