Add more sanity checking
[ghc-heap-view.git] / cbits / HeapView.c
index ef99453..ccfb122 100644 (file)
@@ -62,7 +62,9 @@ char *gtc_heap_view_closure_type_names[] = {
  [RET_BCO]               = "RET_BCO",
  [RET_SMALL]             = "RET_SMALL",
  [RET_BIG]               = "RET_BIG",
+#ifndef GHC_7_7
  [RET_DYN]               = "RET_DYN",
+#endif
  [RET_FUN]               = "RET_FUN",
  [UPDATE_FRAME]          = "UPDATE_FRAME",
  [CATCH_FRAME]           = "CATCH_FRAME",
@@ -72,6 +74,9 @@ char *gtc_heap_view_closure_type_names[] = {
  [BLOCKING_QUEUE]        = "BLOCKING_QUEUE",
  [MVAR_CLEAN]            = "MVAR_CLEAN",
  [MVAR_DIRTY]            = "MVAR_DIRTY",
+#ifdef GHC_7_7
+ [TVAR]                  = "TVAR",
+#endif
  [ARR_WORDS]             = "ARR_WORDS",
  [MUT_ARR_PTRS_CLEAN]    = "MUT_ARR_PTRS_CLEAN",
  [MUT_ARR_PTRS_DIRTY]    = "MUT_ARR_PTRS_DIRTY",
@@ -95,9 +100,9 @@ char *gtc_heap_view_closure_type_names[] = {
 void gtc_heap_view_closure_ptrs_in_pap_payload(StgClosure *ptrs[], StgWord *nptrs, StgClosure *fun, StgClosure **payload, StgWord size) {
     StgWord bitmap;
     StgFunInfoTable *fun_info;
-    
+
     fun_info = get_fun_itbl(UNTAG_CLOSURE(fun));
-    ASSERT(fun_info->i.type != PAP);
+    // ASSERT(fun_info->i.type != PAP);
     StgClosure **p = payload;
 
     switch (fun_info->f.fun_type) {
@@ -249,7 +254,7 @@ StgMutArrPtrs *gtc_heap_view_closurePtrs(Capability *cap, StgClosure *closure) {
             break;
 
         default:
-            fprintf(stderr,"closurePtrs: Cannot handle type %s yet\n", gtc_heap_view_closure_type_names[info->type]);
+            //fprintf(stderr,"closurePtrs: Cannot handle type %s yet\n", gtc_heap_view_closure_type_names[info->type]);
             break;
     }