Apply same logic about copyable closures when creating thunkgs in deepDup 0_1
authorJoachim Breitner <mail@joachim-breitner.de>
Fri, 28 Sep 2012 19:27:23 +0000 (19:27 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Fri, 28 Sep 2012 19:27:23 +0000 (19:27 +0000)
cbits/dup-prim.cmm
testsuite/tests/mvar.stderr-optasm [deleted file]

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:
 
diff --git a/testsuite/tests/mvar.stderr-optasm b/testsuite/tests/mvar.stderr-optasm
deleted file mode 100644 (file)
index b429eb0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Closure of nun-dupable type 10 passed to dup!