Changes between Version 26 and Version 27 of Commentary/Compiler/HscMain


Ignore:
Timestamp:
Feb 19, 2007 3:55:47 PM (9 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/HscMain

    v26 v27  
    3737    * It is '''converted to {{{IfaceSyn}}}''' (defined in [[GhcFile(compiler/iface/IfaceSyn.lhs)]] and [[GhcFile(compiler/iface/IfaceType.lhs)]]).
    3838    * The {{{IfaceSyn}}} is '''serialised into a binary output file''' ([[GhcFile(compiler/iface/BinIface.lhs)]]).
    39   The serialisation does (pretty much) nothing except serialise.  All the intelligence is in the Core-to-IfaceSyn conversion; or, rather, in the reverse of that step.
     39  The serialisation does (pretty much) nothing except serialise.  All the intelligence is in the `Core`-to-`IfaceSyn` conversion; or, rather, in the reverse of that step.
    4040
    41   * The same, tidied Core program is now fed to the Back End.  First there is a two-stage conversion from {{{CoreSyn}}} to {{{StgSyn}}}.
    42     * 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)]].
     41  * 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].
     42    * 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)]].
    4343    * 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}}}.
    4444