/* -----------------------------------------------------------------------------
- * $Id: StgStartup.hc,v 1.6 2000/03/08 17:48:24 simonmar Exp $
+ * $Id: StgStartup.hc,v 1.11 2000/04/03 16:28:08 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
/* -----------------------------------------------------------------------------
Special STG entry points for module registration.
+
+ This stuff is problematic for Hugs, because it introduces a
+ dependency between the RTS and the program (ie. __init_PrelMain). So
+ we currently disable module initialisation for Hugs.
-------------------------------------------------------------------------- */
+#ifndef INTERPRETER
+
+extern F_ *init_stack;
+
STGFUN(stg_init_ret)
{
FB_
FE_
}
+/* On entry to stg_init:
+ * init_stack[0] = &stg_init_ret;
+ * init_stack[1] = __init_Something;
+ */
STGFUN(stg_init)
{
- EF_(__init_Main);
- EF_(__init_Prelude);
FB_
- PUSH_INIT_STACK(stg_init_ret);
- PUSH_INIT_STACK(__init_Prelude);
- JMP_(__init_Main);
+ Sp = BaseReg->rSp;
+ JMP_(POP_INIT_STACK());
FE_
}
START_MOD_INIT(__init_PrelGHC);
END_MOD_INIT();
+
+#endif /* !INTERPRETER */