From 31b9d01c0a67edc94a762e505645926557289e85 Mon Sep 17 00:00:00 2001 From: Cheng Shao <terrorjack@type.dance> Date: Mon, 3 Feb 2025 19:21:17 +0000 Subject: [PATCH] compiler: remove unused assembleOneBCO function This patch removes the unused assembleOneBCO function from the bytecode assembler. (cherry picked from commit 02794411602e35b671b5b954457a124f37a5d44a) --- compiler/GHC/ByteCode/Asm.hs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/compiler/GHC/ByteCode/Asm.hs b/compiler/GHC/ByteCode/Asm.hs index d709c9bff82..7d2eea73f2d 100644 --- a/compiler/GHC/ByteCode/Asm.hs +++ b/compiler/GHC/ByteCode/Asm.hs @@ -8,7 +8,7 @@ -- | Bytecode assembler and linker module GHC.ByteCode.Asm ( - assembleBCOs, assembleOneBCO, + assembleBCOs, bcoFreeNames, SizedSeq, sizeSS, ssElts, iNTERP_STACK_CHECK_THRESH, @@ -34,7 +34,6 @@ import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Core.TyCon -import GHC.Data.FlatBag import GHC.Data.SizedSeq import GHC.StgToCmm.Layout ( ArgRep(..) ) @@ -168,15 +167,6 @@ mallocStrings interp ulbcos = do collectPtr (BCOPtrBCO bco) = collect bco collectPtr _ = return () - -assembleOneBCO :: Interp -> Profile -> ProtoBCO Name -> IO UnlinkedBCO -assembleOneBCO interp profile pbco = do - -- TODO: the profile should be bundled with the interpreter: the rts ways are - -- fixed for an interpreter - ubco <- assembleBCO (profilePlatform profile) pbco - UnitFlatBag ubco' <- mallocStrings interp (UnitFlatBag ubco) - return ubco' - assembleBCO :: Platform -> ProtoBCO Name -> IO UnlinkedBCO assembleBCO platform (ProtoBCO { protoBCOName = nm , protoBCOInstrs = instrs -- GitLab