From d4c26c5ea7b7452d56ccc9833eea7e93c8fd4db7 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 7 Feb 2001 11:53:00 +0000 Subject: [PATCH] [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). --- ghc/compiler/compMan/CmLink.lhs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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") -- 1.7.10.4