HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleghc-9.10.3GHC2021

GHC.Data.Bitmap

  • 1 type
  • 3 values
  • Packageghc-9.10.3
  • Exports4
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceBitmap.hs
typetype Bitmap = [StgWord]
#

A bitmap represented by a sequence of StgWords on the target architecture. These are used for bitmaps in info tables and other generated code which need to be emitted as sequences of StgWords.

valueintsToReverseBitmap
  1. :: Platform
  2. -> Int

    size in bits

  3. -> [Int]

    sorted indices of zeros free of duplicates

  4. -> Bitmap
#

Make a bitmap where the slots specified are the zeros in the bitmap. eg. [0,1,3], size 4 ==> 0x4 (we leave any bits outside the size as zero, just to make the bitmap easier to read).

The list of Ints must be already sorted and duplicate-free.

Magic number, must agree with BITMAP_BITS_SHIFT in InfoTables.h. Some kinds of bitmap pack a size/bitmap into a single word if possible, or fall back to an external pointer when the bitmap is too large. This value represents the largest size of bitmap that can be packed into a single word.