[Git][ghc/ghc][wip/bytecode-serialize] also test hscCompileCoreExpr'

Cheng Shao (@TerrorJack) gitlab at gitlab.haskell.org
Tue Feb 18 19:20:45 UTC 2025



Cheng Shao pushed to branch wip/bytecode-serialize at Glasgow Haskell Compiler / GHC


Commits:
48c741e8 by Cheng Shao at 2025-02-18T19:20:22+00:00
also test hscCompileCoreExpr'

- - - - -


1 changed file:

- compiler/GHC/Driver/Main.hs


Changes:

=====================================
compiler/GHC/Driver/Main.hs
=====================================
@@ -2807,20 +2807,22 @@ hscCompileCoreExpr' hsc_env srcspan ds_expr = do
 
     _ -> do
       {- Convert to BCOs -}
-      bcos <- byteCodeGen hsc_env
+      bcos' <- byteCodeGen hsc_env
                 this_mod
                 stg_binds
                 []
                 Nothing -- modbreaks
                 [] -- spt entries
 
+      bcos <- testBinByteCode hsc_env bcos'
+
       {- load it -}
       bco_time <- getCurrentTime
       (fv_hvs, mods_needed, units_needed) <- loadDecls interp hsc_env srcspan $
         Linkable bco_time this_mod $ NE.singleton $ BCOs bcos
       {- Get the HValue for the root -}
       return (expectJust "hscCompileCoreExpr'"
-         $ lookup (idName binding_id) fv_hvs, mods_needed, units_needed)
+         $ lookup (occName binding_id) [(occName fv, hv) | (fv, hv) <- fv_hvs], mods_needed, units_needed)
 
 
 



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/48c741e8462fb13245b1abf7eb8fefa55a49cb0b
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/20250218/b166de3b/attachment-0001.html>


More information about the ghc-commits mailing list