From: simonmar Date: Wed, 7 Feb 2001 11:53:00 +0000 (+0000) Subject: [project @ 2001-02-07 11:53:00 by simonmar] X-Git-Tag: Approximately_9120_patches~2724 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d4c26c5ea7b7452d56ccc9833eea7e93c8fd4db7;p=ghc-hetmet.git [project @ 2001-02-07 11:53:00 by simonmar] Don't re-link interpreted modules if they haven't changed. Now :r is almost instantaneous when nothing changes (as it should be). --- diff --git a/ghc/compiler/compMan/CmLink.lhs b/ghc/compiler/compMan/CmLink.lhs index 9ea08da..c363761 100644 --- a/ghc/compiler/compMan/CmLink.lhs +++ b/ghc/compiler/compMan/CmLink.lhs @@ -232,9 +232,11 @@ isLoaded l pls = Just m -> linkableTime l == linkableTime m linkInterpretedCode [] ul_trees pls = linkFinish pls ul_trees -linkInterpretedCode (LM _ m uls : ls) ul_trees pls +linkInterpretedCode (l@(LM _ m uls) : ls) ul_trees pls | all isInterpretable uls = - linkInterpretedCode ls (uls++ul_trees) pls + if isLoaded l pls then linkInterpretedCode ls ul_trees pls else + linkInterpretedCode ls (uls++ul_trees) + pls{objects_loaded = l : objects_loaded pls} | any isObject uls = throwDyn (OtherError "can't link object code that depends on interpreted code")