Apply same logic about copyable closures when creating thunkgs in deepDup
[darcs-mirror-ghc-dup.git] / cbits / dup-prim.cmm
index 07ac09a..4f82734 100644 (file)
@@ -225,10 +225,17 @@ deepDupClosure
                    goto out2;
                }
                */
-               default: {
+
+               // Thunks are good
+               case THUNK, THUNK_1_0, THUNK_0_1, THUNK_2_0, THUNK_1_1, THUNK_0_2,
+                    THUNK_STATIC, THUNK_SELECTOR, AP: {
                    StgClosure_payload(copy, p + payloadOffset) = ap;
                    goto out2;
                }
+
+               default: {
+                   goto out2;
+               }
            }
        out2: