Hannes Siebenhandl pushed to branch wip/fendor/linkable-usage at Glasgow Haskell Compiler / GHC
Commits:
-
88863e7f
by fendor at 2026-02-12T10:07:01+01:00
2 changed files:
Changes:
| ... | ... | @@ -2246,7 +2246,7 @@ mkModuleByteCode :: HscEnv -> Module -> ModLocation -> CgInteractiveGuts -> IO M |
| 2246 | 2246 | mkModuleByteCode hsc_env mod mod_location cgguts = do
|
| 2247 | 2247 | bcos <- hscGenerateByteCode hsc_env cgguts mod_location
|
| 2248 | 2248 | objs <- outputAndCompileForeign hsc_env mod mod_location (cgi_foreign_files cgguts) (cgi_foreign cgguts)
|
| 2249 | - bcos_hash <- fingerprintModuleByteCodeContents mod bcos objs
|
|
| 2249 | + !bcos_hash <- fingerprintModuleByteCodeContents mod bcos objs
|
|
| 2250 | 2250 | return $! ModuleByteCode mod bcos objs bcos_hash
|
| 2251 | 2251 | |
| 2252 | 2252 | -- | Generate a fresh 'ModuleByteCode' for a given module but do not write it to disk.
|
| ... | ... | @@ -2861,7 +2861,7 @@ hscCompileCoreExpr' hsc_env srcspan ds_expr = do |
| 2861 | 2861 | |
| 2862 | 2862 | {- load it -}
|
| 2863 | 2863 | bco_time <- getCurrentTime
|
| 2864 | - bco_hash <- fingerprintModuleByteCodeContents this_mod bcos []
|
|
| 2864 | + !bco_hash <- fingerprintModuleByteCodeContents this_mod bcos []
|
|
| 2865 | 2865 | let mbc = ModuleByteCode this_mod bcos [] bco_hash
|
| 2866 | 2866 | (mods_needed, units_needed) <- loadDecls interp hsc_env srcspan $
|
| 2867 | 2867 | Linkable bco_time this_mod $ NE.singleton (DotGBC mbc)
|
| ... | ... | @@ -457,7 +457,7 @@ data LinkablePart |
| 457 | 457 | data ModuleByteCode = ModuleByteCode { gbc_module :: Module
|
| 458 | 458 | , gbc_compiled_byte_code :: CompiledByteCode
|
| 459 | 459 | , gbc_foreign_files :: [FilePath] -- ^ Path to object files
|
| 460 | - , gbc_hash :: Fingerprint
|
|
| 460 | + , gbc_hash :: !Fingerprint
|
|
| 461 | 461 | }
|
| 462 | 462 | |
| 463 | 463 | mkModuleByteCodeLinkable :: UTCTime -> ModuleByteCode -> Linkable
|