Skip to content
  • Sylvain Henry's avatar
    Remove UniqSupply from NameCache · 532c6a54
    Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
    As suggested by @alexbiehl, this patch replaces the always updated
    UniqSupply in NameCache with a fixed Char and use it with `uniqFromMask`
    to generate uniques.
    
    This required some refactoring because getting a new unique from the
    NameCache can't be done in pure code anymore, in particular not in an
    atomic update function for `atomicModifyIORef`. So we use an MVar
    instead to store the OrigNameCache field.
    
    For some reason, T12545 increases (+1%) on i386 while it decreases on
    other CI runners.
    
    T9630 ghc/peak increases only with the dwarf build on CI (+16%).
    
    Metric Decrease:
        T12425
        T12545
        T9198
        T12234
    
    Metric Increase:
        T12545
        T9630
    
    Update haddock submodule
    532c6a54