Changes between Version 4 and Version 5 of Commentary

Show
Ignore:
Timestamp:
08/17/09 11:11:38 (5 years ago)
Author:
benl (IP: 150.203.160.45)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary

    v4 v5  
    44 
    55These pages give an overview of how the compiler fits together, and record notes on the implementation. 
     6[[br]] 
    67 
    7 == Main Components == 
     8== Intermediate Languages (IRs) == 
     9 
     10The compiler uses four intermediate languages. 
     11 
     12 * '''Source Language'''[[br]] 
     13   Representation of the source program that preserves all the syntactic structure of the original. 
     14 
     15 * '''Desugared Language'''[[br]] 
     16   We currently desugar the source language before extracting type constraints. This makes the compiler easier to change and maintain, at the cost of not being able to produce type error messages as nice as the ones in GHC (which does type inference directly on the source). We extract type constraints from the desugared program, then solve them, which gives us enough information to convert the program to the core language. 
     17 
     18 * '''Core Language'''[[br]] 
     19   A System-F style core language, complete with type abstraction and application. Most optimizations are performed in the core language. 
     20 
     21 * '''Sea Language''' [[br]] 
     22   An abstract-C like language. Serves as a target for the Core -> Sea transform. It'd probably be better to replace this with a third-party back-end language like C-- or LLVM. The Sea program is pretty printed into ANSI C code, which is compiled into object code by GCC. 
     23 
     24== Compiler Stages == 
    825 
    926 * Lexer