Improve error messsage when argument count varies
[ghc-hetmet.git] / ghc / includes / Cmm.h
index d0dedb8..5a38059 100644 (file)
 // whether the nursery is nearly empty in any function that uses
 // allocateLocal() - this includes many of the primops.
 #define MAYBE_GC(liveness,reentry)                     \
-   if (bdescr_link(CurrentNursery) == NULL) {          \
+  if (bdescr_link(CurrentNursery) == NULL || CInt[alloc_blocks] >= CInt[alloc_blocks_lim]) {           \
        R9  = liveness;                                 \
         R10 = reentry;                                 \
         jump stg_gc_gen_hp;                            \