Commit 5037aed1 authored by sewardj's avatar sewardj
Browse files

[project @ 1999-04-27 10:59:29 by sewardj]

Minor mods to make STG Hugs compile out-of-the-box.
parent b9ad54f9
/* ----------------------------------------------------------------------------
* $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 */
# ----------------------------------------------------------------------------- #
# $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
......
......@@ -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
/* -----------------------------------------------------------------------------
* $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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment