[Git][ghc/ghc][wip/rm-assembleOneBCO] compiler: remove unused assembleOneBCO function

Cheng Shao (@TerrorJack) gitlab at gitlab.haskell.org
Mon Feb 3 19:40:37 UTC 2025



Cheng Shao pushed to branch wip/rm-assembleOneBCO at Glasgow Haskell Compiler / GHC


Commits:
b0f12e08 by Cheng Shao at 2025-02-03T19:40:25+00:00
compiler: remove unused assembleOneBCO function

This patch removes the unused assembleOneBCO function from the
bytecode assembler.

- - - - -


1 changed file:

- compiler/GHC/ByteCode/Asm.hs


Changes:

=====================================
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



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b0f12e08c399615ef16450bf4385a1356f2596c2

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b0f12e08c399615ef16450bf4385a1356f2596c2
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20250203/9aa2a642/attachment-0001.html>


More information about the ghc-commits mailing list