Changes between Version 45 and Version 46 of Commentary/Compiler/HscMain


Ignore:
Timestamp:
May 4, 2011 11:37:01 PM (3 years ago)
Author:
dterei
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/HscMain

    v45 v46  
    1  
    2  
    3 Video: [http://video.google.com/videoplay?docid=5254545394467397086 Compiler Pipeline II] (10'16") 
    4  
    51= Compiling one module: !HscMain = 
    62 
     
    84There is a picture that goes with this description, which appears at the bottom of this page, but you'll probably find it easier to open [wiki:Commentary/Compiler/HscPipe this link] in another window, so you can see it at the same time as reading the text. 
    95 
    10 Look at the picture first.  The yellow boxes are compiler passes, while the blue stuff on the left gives the data type that moves from one phase to the next.  The entire pipeline for a single module is run by a module called !HscMain ([[GhcFile(compiler/main/HscMain.lhs)]]).  Each data type's representation can be dumped for further inspection using a `-ddump-*` flag.  Here are the steps it goes through: 
     6You can also watch a '''video''' of Simon Peyton-Jones explaining the compilation pipeline here: [http://video.google.com/videoplay?docid=5254545394467397086 Compiler Pipeline II] (10'16") 
     7 
     8Look at the picture first.  The yellow boxes are compiler passes, while the blue stuff on the left gives the data type that moves from one phase to the next.  The entire pipeline for a single module is run by a module called !HscMain ([[GhcFile(compiler/main/HscMain)]]).  Each data type's representation can be dumped for further inspection using a `-ddump-*` flag.  Here are the steps it goes through: 
    119 
    1210 * The '''Front End''' processes the program in the [wiki:Commentary/Compiler/HsSynType big HsSyn type]. {{{HsSyn}}} is parameterised over the types of the term variables it contains.  The first three passes (the front end) of the compiler work like this:[[BR]][[BR]]