Chapter 5. d2c Internals Guide

Table of Contents
The Compiler-Base library
The Compiler-Parser library
The Compiler-Front library
The Compiler-Convert library
The Compiler-Optimize Library
The Compiler-CBack Library
The Compiler-Main Library
The Dylan Runtime Library

The d2c compiler was developed by the Gwydion Project at CMU. This chapter explains the structure of d2c and gives a brief overview of how the various components interact.

d2c compiles one library at a time. Each library contains one or more modules. A module may be implemented by one or more files. Each file contains one or more source records, the logical unit of Dylan compilation.

By compiling many source records at once, d2c produces more efficient code at the cost of using more memory. In addition to processing an entire library's worth of source records, d2c also performs interlibrary optimizations by looking at certain information from previously compiled libraries.

In its current configuration, d2c is not well-suited to developing new Dylan code. It is, however, well-suited to building production versions of libraries. Obvious future projects include reducing the granularity of compilation and implementing a selectively-incremental compiler that can modify the object code of a running program. The basic architecture was designed with these projects in mind.

The actual compilation process procedes roughly as follows: