[commit: ghc] master: Deduplicate one-shot/make compile paths. (427f8a1)
git at git.haskell.org
git at git.haskell.org
Tue Oct 6 02:16:17 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/427f8a15c385de486d479989ecfbb6f82699f405/ghc
>---------------------------------------------------------------
commit 427f8a15c385de486d479989ecfbb6f82699f405
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date: Fri Oct 2 22:05:24 2015 -0700
Deduplicate one-shot/make compile paths.
Summary:
We had a duplicate copy of the code for --make and for -c
which was a pain. The call graph looked something like this:
compileOne -> genericHscCompileGetFrontendResult -> genericHscFrontend
hscCompileOneShot ---^
with genericHscCompileGetFrontendResult and hscCompileOneShot
duplicating logic for deciding whether or not recompilation
was needed.
This patchset fixes it, so now everything goes through this call-chain:
compileOne (--make entry point)
Calls hscIncrementCompile, invokes the pipeline to do codegen
and sets up linkables.
hscIncrementalCompile (-c entry point)
Calls hscIncrementalFrontend, and then simplifying,
desugaring, and writing out the interface.
hscIncrementalFrontend
Performs recompilation avoidance, if recompilation needed,
does parses typechecking.
I also cleaned up some of the MergeBoot nonsense by introducing
a FrontendResult type.
NB: this BREAKS #8101 again, because I can't unconditionally desugar
due to Haddock barfing on lint, see #10600
Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, bgamari, simonmar, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1302
>---------------------------------------------------------------
427f8a15c385de486d479989ecfbb6f82699f405
compiler/main/DriverPipeline.hs | 257 ++++++++++++---------------------
compiler/main/Hooks.hs | 5 +-
compiler/main/HscMain.hs | 310 +++++++++++++++++++++-------------------
compiler/typecheck/TcRnTypes.hs | 7 +
testsuite/tests/driver/all.T | 2 +-
5 files changed, 261 insertions(+), 320 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 427f8a15c385de486d479989ecfbb6f82699f405
More information about the ghc-commits
mailing list