
#8742: Reuse scavenge_small_bitmap -------------------------------------+------------------------------------ Reporter: Tarrasch | Owner: Type: task | Status: patch Priority: lowest | Milestone: 7.10.1 Component: Runtime System | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Tarrasch): Ok. I stumbled upon the same exact set of issues with non-matching types for `Compact.c`. It seems like at differenct places `StgWord`, `W_` and `nat` is used. And again `scavenge_PAP_payload` gets passed `StgHalfWord`s. If I were to unify these to use the same type for the variable `size`, which should it be? I would myself just go for `StgWord` since if you look at the `bitmap` variable, it's usually of type `StgWord`, and usually the equation is that `size == BITMAP_SIZE(bitmap) == ((bitmap) & BITMAP_SIZE_MASK)`. Am I over-thinking this? I just think that with these series of patches we get these two nice benefits: 1. A consistent use of the types (or is there any good reason they differ so much?) 2. We can safely apply two patches that would remove a total of 30 lines of code. Without worrying that we loose performance since the `.o` files can be checked to be exact matches. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8742#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler