Minor mods to make STG Hugs compile out-of-the-box.
/* ----------------------------------------------------------------------------
- * $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
*
#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 = ../..
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
../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
#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
*
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;
}