[Git][ghc/ghc][wip/jeltsch/textual-bytecode-output] A bit of wobbling
Wolfgang Jeltsch pushed to branch wip/jeltsch/textual-bytecode-output at Glasgow Haskell Compiler / GHC Commits: 88c0c200 by Wolfgang Jeltsch at 2026-05-30T18:52:20+03:00 A bit of wobbling - - - - - 1 changed file: - compiler/GHC/ByteCode/Show.hs Changes: ===================================== compiler/GHC/ByteCode/Show.hs ===================================== @@ -37,7 +37,12 @@ import GHC.Utils.Outputable withPprStyle, ppr ) -import GHC.ByteCode.Types (UnlinkedBCO, ByteCodeHpcInfo, CompiledByteCode (..)) +import GHC.ByteCode.Types + ( + UnlinkedBCO (UnlinkedBCO, UnlinkedStaticCon), + ByteCodeHpcInfo, + CompiledByteCode (..) + ) import GHC.ByteCode.Breakpoints (InternalModBreaks) import GHC.ByteCode.Binary (OnDiskModuleByteCode (..)) import GHC.ByteCode.Serialize (readOnDiskModuleByteCode) @@ -78,17 +83,44 @@ pprCompiledByteCode CompiledByteCode {..} pprBreakPoints bc_breaks, pprStaticPointerTableEntries bc_spt_entries, pprHPCInfo bc_hpc_info - ] + ] -- | […] pprByteCodeObjects :: [UnlinkedBCO] -> SDoc -pprByteCodeObjects = multiLineEntry (text "bytecode objects") . - vcatOrNone . +pprByteCodeObjects = multiLineEntry (text "bytecode objects:") . + vcatOrNone . map pprByteCodeObject -- | […] pprByteCodeObject :: UnlinkedBCO -> SDoc -pprByteCodeObject = pprByteCodeObject +pprByteCodeObject UnlinkedBCO {{-..-}} + = multiLineEntry (text "ordinary bytecode object:") $ + vcat [ + {- + unlinkedBCOName :: !Name, + unlinkedBCOArity :: {-# UNPACK #-} !Int, + unlinkedBCOInstrs :: !(BCOByteArray Word16), -- insns + unlinkedBCOBitmap :: !(BCOByteArray Word), -- bitmap + unlinkedBCOLits :: !(FlatBag BCONPtr), -- non-ptrs + unlinkedBCOPtrs :: !(FlatBag BCOPtr) -- ptrs + -} + ] +pprByteCodeObject UnlinkedStaticCon {{-..-}} + = multiLineEntry (text "static constructor object:") $ + vcat [ + {- + unlinkedStaticConName :: !Name, + -- ^ The name to which this static constructor is bound, not to be + -- confused with the name of the static constructor itself + -- ('unlinkedStaticConDataConName') + unlinkedStaticConDataConName :: !Name, + unlinkedStaticConLits :: !(FlatBag BCONPtr), + -- ^ non-ptrs full words, where sub-word literals have already been + -- packed into full words as needed + unlinkedStaticConPtrs :: !(FlatBag BCOPtr), -- ptrs + unlinkedStaticConIsUnlifted :: !Bool + -} + ] -- | […] pprDataConstructorInfoTables :: [(Name, ConInfoTable)] -> SDoc View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/88c0c200c4f6dc263681ea275477c92f... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/88c0c200c4f6dc263681ea275477c92f... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Wolfgang Jeltsch (@jeltsch)