Changes between Version 6 and Version 7 of Commentary/Compiler/Driver


Ignore:
Timestamp:
Jan 15, 2017 10:18:41 AM (3 years ago)
Author:
takenobu
Comment:

fix broken links

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/Driver

    v6 v7  
    1515=== Dependency analysis ===
    1616
    17 Dependency analysis is carried out by the `depanal` function; the resulting `ModuleGraph` is stored into `hsc_mod_graph`. Essentially, this pass looks at all of the imports of the target modules (`hsc_targets`), and recursively pulls in all of their dependencies (stopping at package boundaries.) The resulting module graph consists of a list of `ModSummary` (defined in [[GhcFile(compiler/main/HscTypes.lhs)]]), which record various information about modules prior to compilation (recompilation checking, even), such as their module identity (the current package name plus the module name), whether or not the file is a boot file, where the source file lives. Dependency analysis inside GHC is often referred to as **downsweep**.
     17Dependency analysis is carried out by the `depanal` function; the resulting `ModuleGraph` is stored into `hsc_mod_graph`. Essentially, this pass looks at all of the imports of the target modules (`hsc_targets`), and recursively pulls in all of their dependencies (stopping at package boundaries.) The resulting module graph consists of a list of `ModSummary` (defined in [[GhcFile(compiler/main/HscTypes.hs)]]), which record various information about modules prior to compilation (recompilation checking, even), such as their module identity (the current package name plus the module name), whether or not the file is a boot file, where the source file lives. Dependency analysis inside GHC is often referred to as **downsweep**.
    1818
    1919ToDo: say something about how hs-boot files are
     
    3333Compilation, also known as **upsweep**, walks the module graph in topological order and compiles everything. Depending on whether or not we are doing parallel compilation, this implemented by `upsweep` or by `parUpsweep`.  In this section, we'll talk about the sequential upsweep.
    3434
    35 The key data structure which we are filling in as we perform compilation is the **home package table** or HPT (`hsc_HPT`, defined in [[GhcFile(compiler/main/HscTypes.lhs)]]). As its name suggests, it contains informations from the *home package*, i.e. the package we are currently compiling. Its entries, `HomeModInfo`, contain the sum total knowledge of a module after compilation: both its pre-linking interface `ModIface` as well as the post-linking details `ModDetails`.
     35The key data structure which we are filling in as we perform compilation is the **home package table** or HPT (`hsc_HPT`, defined in [[GhcFile(compiler/main/HscTypes.hs)]]). As its name suggests, it contains informations from the *home package*, i.e. the package we are currently compiling. Its entries, `HomeModInfo`, contain the sum total knowledge of a module after compilation: both its pre-linking interface `ModIface` as well as the post-linking details `ModDetails`.
    3636
    3737