diff options
author | Ryan Newton <rrnewton@gmail.com> | 2012-04-20 10:17:20 -0400 |
---|---|---|
committer | Ryan Newton <rrnewton@gmail.com> | 2013-08-21 00:02:29 -0400 |
commit | 1c45d05d1a4808767fd921988495346f22290e23 (patch) | |
tree | 5c96fcc65f029858c47558ad3c744779d4eb4a9a /rts/PrimOps.cmm | |
parent | 3ca7ecb57eefc43b4347e22ad2fd7a4962d84020 (diff) | |
download | haskell-1c45d05d1a4808767fd921988495346f22290e23.tar.gz |
Tweak stg_casArrayzh as per Simon Marlow's suggestion.
Diffstat (limited to 'rts/PrimOps.cmm')
-rw-r--r-- | rts/PrimOps.cmm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index 3bf5f37a00..b13e05ce87 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -223,12 +223,10 @@ stg_casArrayzh RET_NP(1,h); } else { // Compare and Swap Succeeded: - if (GET_INFO(arr) == stg_MUT_ARR_PTRS_CLEAN_info) { - SET_HDR(arr, stg_MUT_ARR_PTRS_DIRTY_info, CCCS); - len = StgMutArrPtrs_ptrs(arr); - // The write barrier. We must write a byte into the mark table: - I8[arr + SIZEOF_StgMutArrPtrs + WDS(len) + (ind >> MUT_ARR_PTRS_CARD_BITS )] = 1; - } + SET_HDR(arr, stg_MUT_ARR_PTRS_DIRTY_info, CCCS); + len = StgMutArrPtrs_ptrs(arr); + // The write barrier. We must write a byte into the mark table: + I8[arr + SIZEOF_StgMutArrPtrs + WDS(len) + (ind >> MUT_ARR_PTRS_CARD_BITS )] = 1; RET_NP(0,h); } } |