Wolfgang Jeltsch pushed to branch wip/jeltsch/textual-bytecode-output at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • compiler/GHC/ByteCode/Show.hs
    ... ... @@ -17,9 +17,9 @@ import Data.Int (Int)
    17 17
     import Data.Word (Word)
    
    18 18
     import Data.Maybe (Maybe, maybe)
    
    19 19
     import Data.Either (Either, either)
    
    20
    -import Data.List (length, (++), map, zipWith, zipWith4, take, drop, replicate)
    
    20
    +import Data.List (length, (++), map, zipWith4, take, drop, replicate)
    
    21 21
     import Data.String (String)
    
    22
    -import Data.ByteString (ByteString, unpack)
    
    22
    +import Data.ByteString (ByteString)
    
    23 23
     import Data.ByteString.Short (ShortByteString)
    
    24 24
     import Data.IntMap (IntMap)
    
    25 25
     import Data.IntMap qualified as IntMap (toList)
    
    ... ... @@ -93,8 +93,7 @@ pprOnDiskModuleByteCode OnDiskModuleByteCode {..}
    93 93
         = vcat [
    
    94 94
                    pprModuleIdent                   $ odgbc_module,
    
    95 95
                    pprOnDiskModuleByteCodeHash      $ odgbc_hash,
    
    96
    -               pprCompiledByteCode odgbc_module $ odgbc_compiled_byte_code,
    
    97
    -               pprObjectFileContents            $ odgbc_foreign
    
    96
    +               pprCompiledByteCode odgbc_module $ odgbc_compiled_byte_code
    
    98 97
                ]
    
    99 98
     
    
    100 99
     -- | […]
    
    ... ... @@ -460,26 +459,6 @@ pprTickBoxName = entry (text "tick box name:") .
    460 459
     pprTickCount :: Int -> SDoc
    
    461 460
     pprTickCount = entry (text "number of ticks:") . ppr
    
    462 461
     
    
    463
    --- | […]
    
    464
    -pprObjectFileContents :: [ByteString] -> SDoc
    
    465
    -pprObjectFileContents = entry (text "contents of object files:") .
    
    466
    -                        vcatOrNone                               .
    
    467
    -                        zipWith pprObjectFileContent [0 ..]
    
    468
    -
    
    469
    --- | […]
    
    470
    -pprObjectFileContent :: Int -> ByteString -> SDoc
    
    471
    -pprObjectFileContent ix = entry (text "file" <+> ppr ix <> text ":") .
    
    472
    -                          pprByteString
    
    473
    -
    
    474
    --- | […]
    
    475
    -pprByteString :: ByteString -> SDoc
    
    476
    -pprByteString = pprFixedSizeNaturalList . unpack
    
    477
    -
    
    478
    --- | […]
    
    479
    -pprFixedSizeNaturalList :: (Integral a, FiniteBits a) => [a] -> SDoc
    
    480
    -pprFixedSizeNaturalList []   = text "<empty>"
    
    481
    -pprFixedSizeNaturalList list = hsep (map pprFixedSizeNatural list)
    
    482
    -
    
    483 462
     -- | […]
    
    484 463
     pprFixedSizeNatural :: (Integral a, FiniteBits a) => a -> SDoc
    
    485 464
     pprFixedSizeNatural num