Fix #3741, simplifying things in the process
[ghc-hetmet.git] / rts / StgMiscClosures.cmm
index 639ac7e..8fd96c1 100644 (file)
@@ -289,11 +289,6 @@ INFO_TABLE(stg_IND_OLDGEN_PERM,1,0,IND_OLDGEN_PERM,"IND_OLDGEN_PERM","IND_OLDGEN
  */
 INFO_TABLE(stg_BLACKHOLE,0,1,BLACKHOLE,"BLACKHOLE","BLACKHOLE")
 {
-#if defined(GRAN)
-    /* Before overwriting TSO_LINK */
-    STGCALL3(GranSimBlock,CurrentTSO,CurrentProc,(StgClosure *)R1 /*Node*/);
-#endif
-
     TICK_ENT_BH();
 
 #ifdef THREADED_RTS
@@ -319,48 +314,9 @@ INFO_TABLE(stg_BLACKHOLE,0,1,BLACKHOLE,"BLACKHOLE","BLACKHOLE")
     jump stg_block_blackhole;
 }
 
-#if defined(PAR) || defined(GRAN)
-
-INFO_TABLE(stg_RBH,1,1,RBH,"RBH","RBH")
-{
-# if defined(GRAN)
-    /* mainly statistics gathering for GranSim simulation */
-    STGCALL3(GranSimBlock,CurrentTSO,CurrentProc,(StgClosure *)R1 /*Node*/);
-# endif
-
-    /* exactly the same as a BLACKHOLE_BQ_entry -- HWL */
-    /* Put ourselves on the blocking queue for this black hole */
-    TSO_link(CurrentTSO) = StgBlockingQueue_blocking_queue(R1);
-    StgBlockingQueue_blocking_queue(R1) = CurrentTSO;
-    /* jot down why and on what closure we are blocked */
-    TSO_why_blocked(CurrentTSO) = BlockedOnBlackHole::I16;
-    TSO_block_info(CurrentTSO) = R1;
-
-    /* PAR: dumping of event now done in blockThread -- HWL */
-
-    /* stg_gen_block is too heavyweight, use a specialised one */
-    jump stg_block_1;
-}
-
-INFO_TABLE(stg_RBH_Save_0,0,2,CONSTR,"RBH_Save_0","RBH_Save_0")
-{ foreign "C" barf("RBH_Save_0 object entered!") never returns; }
-
-INFO_TABLE(stg_RBH_Save_1,1,1,CONSTR,"RBH_Save_1","RBH_Save_1");
-{ foreign "C" barf("RBH_Save_1 object entered!") never returns; }
-
-INFO_TABLE(stg_RBH_Save_2,2,0,CONSTR,"RBH_Save_2","RBH_Save_2");
-{ foreign "C" barf("RBH_Save_2 object entered!") never returns; }
-
-#endif /* defined(PAR) || defined(GRAN) */
-
 /* identical to BLACKHOLEs except for the infotag */
 INFO_TABLE(stg_CAF_BLACKHOLE,0,1,CAF_BLACKHOLE,"CAF_BLACKHOLE","CAF_BLACKHOLE")
 {
-#if defined(GRAN)
-    /* mainly statistics gathering for GranSim simulation */
-    STGCALL3(GranSimBlock,CurrentTSO,CurrentProc,(StgClosure *)R1 /*Node*/);
-#endif
-
     TICK_ENT_BH();
     LDV_ENTER(R1);
 
@@ -608,12 +564,14 @@ CLOSURE(stg_dummy_ret_closure,stg_dummy_ret);
 
 #if defined(__PIC__) && defined(mingw32_TARGET_OS)
 /*
- * When sticking the RTS in a DLL, we delay populating the
+ * When sticking the RTS in a Windows DLL, we delay populating the
  * Charlike and Intlike tables until load-time, which is only
  * when we've got the real addresses to the C# and I# closures.
- *
+ *     
+ *     -- this is currently broken BL 2009/11/14.
+ *        we don't rewrite to static closures at all with Windows DLLs.
  */
-#warning Is this correct? _imp is a pointer!
+// #warning Is this correct? _imp is a pointer!
 #define Char_hash_static_info _imp__ghczmprim_GHCziTypes_Czh_static_info
 #define Int_hash_static_info _imp__ghczmprim_GHCziTypes_Izh_static_info
 #else
@@ -631,6 +589,7 @@ CLOSURE(stg_dummy_ret_closure,stg_dummy_ret);
 
 /* end the name with _closure, to convince the mangler this is a closure */
 
+#if !(defined(__PIC__) && defined(mingw32_HOST_OS))
 section "data" {
  stg_CHARLIKE_closure:
     CHARLIKE_HDR(0)
@@ -927,3 +886,5 @@ section "data" {
     INTLIKE_HDR(15)
     INTLIKE_HDR(16)    /* MAX_INTLIKE == 16 */
 }
+
+#endif // !(defined(__PIC__) && defined(mingw32_HOST_OS))