From: sewardj Date: Tue, 27 Apr 1999 10:59:31 +0000 (+0000) Subject: [project @ 1999-04-27 10:59:29 by sewardj] X-Git-Tag: Approximately_9120_patches~6301 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=5037aed1d4c50a03a499ce5d8495107b0d6a5b5b;p=ghc-hetmet.git [project @ 1999-04-27 10:59:29 by sewardj] Minor mods to make STG Hugs compile out-of-the-box. --- diff --git a/ghc/includes/ClosureMacros.h b/ghc/includes/ClosureMacros.h index fca822f..4f170ca 100644 --- a/ghc/includes/ClosureMacros.h +++ b/ghc/includes/ClosureMacros.h @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: ClosureMacros.h,v 1.11 1999/04/23 13:54:12 simonm Exp $ + * $Id: ClosureMacros.h,v 1.12 1999/04/27 10:59:30 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -367,5 +367,7 @@ SET_STATIC_HDR(PrelBase_CZh_closure,PrelBase_CZh_info,costCentreStack,const); #define bcoConstFloat( bco, i ) (PK_FLT(stgCast(StgWord*,(bco)->payload+(bco)->n_ptrs+i))) #define bcoConstDouble( bco, i ) (PK_DBL(stgCast(StgWord*,(bco)->payload+(bco)->n_ptrs+i))) #define bcoInstr( bco, i ) (stgCast(StgWord8*, ((bco)->payload+(bco)->n_ptrs+(bco)->n_words))[i]) +static __inline__ StgInt bcoInstr16 ( StgBCO* bco, unsigned int i ) +{ StgInt x = (bcoInstr(bco,i) << 8) + bcoInstr(bco,i+1); return x; } #endif /* CLOSUREMACROS_H */ diff --git a/ghc/interpreter/Makefile b/ghc/interpreter/Makefile index b6452f2..45b574b 100644 --- a/ghc/interpreter/Makefile +++ b/ghc/interpreter/Makefile @@ -1,6 +1,6 @@ # ----------------------------------------------------------------------------- # -# $Id: Makefile,v 1.7 1999/04/27 10:06:47 sewardj Exp $ # +# $Id: Makefile,v 1.8 1999/04/27 10:59:29 sewardj Exp $ # # ----------------------------------------------------------------------------- # TOP = ../.. @@ -42,7 +42,7 @@ nHandle.so: gcc -O -fPIC -shared -o nHandle.so nHandle.c $(TOP)/ghc/rts/libHSrts.a: - (cd $(TOP)/ghc/rts ; make clean ; make) + (cd $(TOP)/ghc/rts ; make clean ; make EXTRA_CC_OPTS=-I$(GHC_DIR)/interpreter) cleanish: /bin/rm *.o @@ -53,7 +53,7 @@ snapshot: ../rts/Assembler.c ../rts/Evaluator.c ../rts/Disassembler.c \ ../rts/ForeignCall.c ../rts/Printer.c ../rts/QueueTemplate.h \ ../includes/options.h ../includes/Assembler.h nHandle.c \ - ../includes/Assembler.h ../rts/Bytecodes.h \ + ../includes/Assembler.h ../rts/Bytecodes.h ../includes/ClosureMacros.h \ lib/*.hs runnofib runallnofib diff --git a/ghc/interpreter/version.h b/ghc/interpreter/version.h index 5345d73..2834344 100644 --- a/ghc/interpreter/version.h +++ b/ghc/interpreter/version.h @@ -13,6 +13,6 @@ #if MAJOR_RELEASE #define HUGS_VERSION "January 1998 " #else -#define HUGS_VERSION "STG-98 proto " +#define HUGS_VERSION "STG 27 Apr 99" #endif diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 165b61f..09aeb15 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.19 1999/03/20 17:33:07 sof Exp $ + * $Id: Schedule.c,v 1.20 1999/04/27 10:59:31 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -520,8 +520,13 @@ threadStackOverflow(StgTSO *tso) printStackChunk(tso->sp, stg_min(tso->stack+tso->stack_size, tso->sp+64)); #endif +#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; }