This report documents internal details of the CMU Common Lisp compiler and run-time system. CMU Common Lisp is a public domain implementation of Common Lisp that runs on various Unix workstations. This document is a work in progress: neither the contents nor the presentation are completed. Nevertheless, it provides some useful background information, in particular regarding the CMUCL compiler.
Table of contents:
* I System Architecture
o Package and File Structure [ Source Tree Structure ~ Package structure ]
o System Building [ Compiling the C Startup Code ~ Compiling the Lisp Code ~ Building Core Images ]
* II Compiler Organization
o Compiler Overview
o The Implicit Continuation Representation [ Tail sets ~ Hairy function representation ~ ICR representation of non-local exits ~ Block compilation ~ Entry points ]
o ICR conversion [ Canonical forms ~ Array hackery ~ Inline functions ~ Compilation policy ~ Notes ]
o Local call analysis
o Find components
o ICR optimize [ Goals for ICR optimizations ~ Flow graph simplification ~ Forward ICR optimizations ~ ICR transformation ~ Backward ICR optimizations ]
o Type checking
o Constraint propagation
o ICR finalize
o Environment analysis
o Virtual Machine Representation Introduction
o Global TN assignment
o Local TN assignment
o Control optimization
o VMR conversion [ VMR Control representation ~ Stack analysis ~ Non-local exit ]
o Copy propagation
o Representation selection
o Lifetime analysis [ Flow analysis ~ Conflict detection ]
o Packing
o Code generation
o Assembly
o Dumping
o User Interface of the Compiler [ Error Message Utilities ~ Source Paths ]
* III Compiler Retargeting
o Retargeting the compiler
o Storage bases and classes
o Type system parameterization
o VOP Definition [ Lifetime model ~ VOP Cost model ]
o Efficiency notes
o Assembler Retargeting
o Writing Assembly Code
o Required VOPS [ Function Call ~ Registers and frame format ~ Full call ~ Unknown values return ~ External Entry Points ~ Calls ]
o Standard Primitives
o Customizing VMR Conversion [ Constant Operands ~ Supporting Multiple Hardware Configurations ~ Special-case VMR convert methods ]
* IV Run-Time System
o The Type System
o The Info Database
o The IR1 Interpreter [ Use of %PRIMITIVE ]
o Debugger Information [ The Debug-Info Structure ~ Debugger Interface ~ Variable maps ~ Stack parsing ]
o Object Format [ Tagging ~ GC Comments ~ Structures ~ Fixnums ~ Other-immediates ~ Data-Blocks and Header-Word Format ~ Data-Blocks and Other-immediates Typing ~ Strings ~ Symbols and NIL ~ Bignums ~ Code Data-Blocks ~ Closure Format ~ Function call ~ Memory Layout ~ System Pointers ]
o Memory Management [ Stacks and Globals ~ Heap Layout ~ Garbage Collection ]
o Interface to C and Assembler [ Linkage Table ]
o Low-level debugging
o Core File Format
o Fasload File Format [ General ~ Strategy ~ Fasload Language ]
Download free ebook: Design of CMU Common Lisp.pdf (122 pages pdf file, 0.5 MB).













