Changes between Version 37 and Version 38 of Commentary/Compiler/HscMain


Ignore:
Timestamp:
Oct 21, 2009 11:59:10 PM (4 years ago)
Author:
guest
Comment:

Fix a link to CoreToStg?.lhs

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/HscMain

    v37 v38  
    4545  * The same, tidied Core program is now fed to the Back End.  First there is a two-stage conversion from {{{CoreSyn}}} to [wiki:Commentary/Compiler/StgSynType GHC's intermediate language, StgSyn]. 
    4646    * The first step is called '''!CorePrep''', a Core-to-Core pass that puts the program into A-normal form (ANF).  In ANF, the argument of every application is a variable or literal; more complicated arguments are let-bound.  Actually `CorePrep` does quite a bit more: there is a detailed list at the top of the file [[GhcFile(compiler/coreSyn/CorePrep.lhs)]]. 
    47     * The second step, '''!CoreToStg''', moves to the {{{StgSyn}}} data type (the code is in [[[GhcFile(stgSyn/CoreToStg.lhs)]]].  The output of !CorePrep is carefully arranged to exactly match what {{{StgSyn}}} allows (notably ANF), so there is very little work to do. However, {{{StgSyn}}} is decorated with lots of redundant information (free variables, let-no-escape indicators), which is generated on-the-fly by {{{CoreToStg}}}. 
     47    * The second step, '''!CoreToStg''', moves to the {{{StgSyn}}} data type (the code is in [[[GhcFile(compiler/stgSyn/CoreToStg.lhs)]]].  The output of !CorePrep is carefully arranged to exactly match what {{{StgSyn}}} allows (notably ANF), so there is very little work to do. However, {{{StgSyn}}} is decorated with lots of redundant information (free variables, let-no-escape indicators), which is generated on-the-fly by {{{CoreToStg}}}. 
    4848 
    4949  * Next, the '''[wiki:Commentary/Compiler/CodeGen Code Generator]''' converts the STG program to a {{{C--}}} program.  The code generator is a Big Mother, and lives in directory [[GhcFile(compiler/codeGen)]]