Fix silly bug in casMutVar#: I forgot the GC write barrier
authorSimon Marlow <marlowsd@gmail.com>
Fri, 9 Dec 2011 09:09:42 +0000 (09:09 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 9 Dec 2011 09:09:42 +0000 (09:09 +0000)
rts/PrimOps.cmm

index 21ac05f..8475555 100644 (file)
@@ -284,6 +284,9 @@ stg_casMutVarzh
     if (h != old) {
         RET_NP(1,h);
     } else {
+        if (GET_INFO(mv) == stg_MUT_VAR_CLEAN_info) {
+           foreign "C" dirty_MUT_VAR(BaseReg "ptr", mv "ptr") [];
+        }
         RET_NP(0,h);
     }
 }