[project @ 2000-08-25 10:06:37 by qrczak]
[ghc-hetmet.git] / ghc / rts / StgMiscClosures.hc
index 4861c88..4d626ad 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: StgMiscClosures.hc,v 1.43 2000/04/19 10:51:59 simonmar Exp $
+ * $Id: StgMiscClosures.hc,v 1.47 2000/08/02 14:13:28 rrt Exp $
  *
  * (c) The GHC Team, 1998-2000
  *
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #endif
 
-/* ToDo: make the printing of panics more Win32-friendly, i.e.,
+/* ToDo: make the printing of panics more win32-friendly, i.e.,
  *       pop up some lovely message boxes (as well).
  */
 #define DUMP_ERRMSG(msg) STGCALL2(fprintf,stderr,msg)
@@ -41,13 +41,12 @@ STGFUN(type##_entry)                                                        \
   FB_                                                                  \
     DUMP_ERRMSG(#type " object entered!\n");                            \
     STGCALL1(shutdownHaskellAndExit, EXIT_FAILURE);                    \
+    return NULL;                                                       \
   FE_                                                                  \
 }
 
 /* -----------------------------------------------------------------------------
    Entry code for an indirection.
-
-   This code assumes R1 is in a register for now.
    -------------------------------------------------------------------------- */
 
 INFO_TABLE(IND_info,IND_entry,1,0,IND,,EF_,0,0);
@@ -67,7 +66,6 @@ STGFUN(IND_STATIC_entry)
 {
     FB_
     TICK_ENT_IND(Node);        /* tick */
-  
     R1.p = (P_) ((StgIndStatic*)R1.p)->indirectee;
     TICK_ENT_VIA_NODE();
     JMP_(ENTRY_CODE(*R1.p));
@@ -585,15 +583,17 @@ NON_ENTERABLE_ENTRY_CODE(MUT_VAR);
    This is used for filling in vector-table entries that can never happen,
    for instance.
    -------------------------------------------------------------------------- */
-
+/* No longer used; we use NULL, because a) it never happens, right? and b)
+   Windows doesn't like DLL entry points being used as static initialisers
 STGFUN(stg_error_entry)                                                        \
 {                                                                      \
   FB_                                                                  \
     DUMP_ERRMSG("fatal: stg_error_entry");                              \
     STGCALL1(shutdownHaskellAndExit, EXIT_FAILURE);                    \
+    return NULL;                                                       \
   FE_                                                                  \
 }
-
+*/
 /* -----------------------------------------------------------------------------
    Dummy return closure