diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-06-05 17:00:22 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-06-05 17:00:34 +0300 |
commit | 4075656e8bb2338d9857acfa54f8b9c5e0661f44 (patch) | |
tree | e2aed739e695ff3d12d5f071ff8214c38a07abae /libraries/ghc-heap | |
parent | 8ed8b037fee9611b1c4ef49adb6cf50bbd929a27 (diff) | |
download | haskell-4075656e8bb2338d9857acfa54f8b9c5e0661f44.tar.gz |
Rename some mutable closure types for consistency
SMALL_MUT_ARR_PTRS_FROZEN0 -> SMALL_MUT_ARR_PTRS_FROZEN_DIRTY
SMALL_MUT_ARR_PTRS_FROZEN -> SMALL_MUT_ARR_PTRS_FROZEN_CLEAN
MUT_ARR_PTRS_FROZEN0 -> MUT_ARR_PTRS_FROZEN_DIRTY
MUT_ARR_PTRS_FROZEN -> MUT_ARR_PTRS_FROZEN_CLEAN
Naming is now consistent with other CLEAR/DIRTY objects (MVAR, MUT_VAR,
MUT_ARR_PTRS).
(alternatively we could rename MVAR_DIRTY/MVAR_CLEAN etc. to MVAR0/MVAR)
Removed a few comments in Scav.c about FROZEN0 being on the mut_list
because it's now clear from the closure type.
Reviewers: bgamari, simonmar, erikd
Reviewed By: simonmar
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4784
Diffstat (limited to 'libraries/ghc-heap')
-rw-r--r-- | libraries/ghc-heap/GHC/Exts/Heap.hs | 2 | ||||
-rw-r--r-- | libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libraries/ghc-heap/GHC/Exts/Heap.hs b/libraries/ghc-heap/GHC/Exts/Heap.hs index 61fab5f1c9..9dc1f94a67 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap.hs +++ b/libraries/ghc-heap/GHC/Exts/Heap.hs @@ -224,7 +224,7 @@ getClosure x = do ++ show (length rawWds) pure $ ArrWordsClosure itbl (head rawWds) (tail rawWds) - t | t >= MUT_ARR_PTRS_CLEAN && t <= MUT_ARR_PTRS_FROZEN -> do + t | t >= MUT_ARR_PTRS_CLEAN && t <= MUT_ARR_PTRS_FROZEN_CLEAN -> do unless (length rawWds >= 2) $ fail $ "Expected at least 2 words to MUT_ARR_PTRS_* " ++ "found " ++ show (length rawWds) diff --git a/libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs b/libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs index 507561fbee..7cd85fe99e 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs +++ b/libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs @@ -57,8 +57,8 @@ data ClosureType | ARR_WORDS | MUT_ARR_PTRS_CLEAN | MUT_ARR_PTRS_DIRTY - | MUT_ARR_PTRS_FROZEN0 - | MUT_ARR_PTRS_FROZEN + | MUT_ARR_PTRS_FROZEN_DIRTY + | MUT_ARR_PTRS_FROZEN_CLEAN | MUT_VAR_CLEAN | MUT_VAR_DIRTY | WEAK @@ -73,8 +73,8 @@ data ClosureType | WHITEHOLE | SMALL_MUT_ARR_PTRS_CLEAN | SMALL_MUT_ARR_PTRS_DIRTY - | SMALL_MUT_ARR_PTRS_FROZEN0 - | SMALL_MUT_ARR_PTRS_FROZEN + | SMALL_MUT_ARR_PTRS_FROZEN_DIRTY + | SMALL_MUT_ARR_PTRS_FROZEN_CLEAN | COMPACT_NFDATA | N_CLOSURE_TYPES deriving (Enum, Eq, Ord, Show) |