Table of Contents
Chapter 1 An overview of the
Moby
implementation
1.1 The
Moby
compiler
1.2 The
Moby
run-time system
1.3 Roadmap
Chapter 2 Lexing and parsing
2.1 The lexer
2.2 The prelude parser
2.3 The
Moby
parser
Chapter 3 The typed abstract syntax tree
Chapter 4 Environments
4.1 The environments
4.1.1 Global environments
4.1.2 Top-level environments
4.1.3 Signature environments
4.1.4 Type environments
4.1.5 Expression environments
4.2 Compilation environments
Chapter 5 The
Moby
typechecker
5.1 Checking Types
5.1.1 CompareTy
5.1.2 ChkType
5.1.3 ChkTyDcl
5.2 Sig and Module Checking
5.2.1 ChkSignature
5.2.2 ChkModule
5.2.3 ChkCompUnit
5.3 Signature Manipulation
5.3.1 ChkExport
5.3.2 MatchSig
5.3.3 RenameSig
Chapter 6 The BOL representation
6.1 BOL types
6.1.1 Kinds
6.2 BOL terms
Chapter 7 Translation from typed AST to BOL
7.1 The translation environment
7.2 Translating types
7.3 Exception handling
7.4 Translating classes and objects
7.4.1 Class linkage
7.4.2 Translating methods
7.4.3 Translating makers
7.4.4 Translating
initially
clauses
7.4.5 Translating method dispatch
7.4.6 Translating field operations
7.4.7 Translating
new
Chapter 8 Compiling
Moby
patterns
8.1 Pattern matching in
Moby
8.2 Pettersson's algorithm
8.2.1 Step 1 --- pattern canonicalization
8.2.2 Step 2 --- DFA construction
8.2.3 Step 3 --- DFA optimization
8.3 Extensions to the basic algorithm
8.3.1 Or-patterns
8.3.2 When clauses
8.3.3 Abstract value constructors
8.3.4 Tagtype constructors
8.3.5 Negative pattens
8.4 Choosing the column
8.5 Related work
Chapter 9 Optimization of the BOL representation
9.1 Variable substitutions
9.2 Census
9.3 Denesting
9.4 Contraction
9.5 Cross-module inlining
9.6 Eta splitting
9.7 Useless varible elimination
9.8 Small constant copying
9.9 Cluster conversion
Chapter 10 Code generation
10.1 Calling conventions
10.1.1 Classifying functions
10.1.2 Classifying call sites
10.1.3 Choosing a calling convention
10.1.4 Notation
10.1.5 Escaping functions
10.1.6 Known functions
10.1.7 Goto
10.1.8 C function calls
10.1.9
C
callable functions
10.2 Leaf-procedure optimization
10.3 Generating PC maps
10.3.1 Table Organization
10.3.2 Binary Encoding
10.3.3 Run-time Use
Chapter 11 PC maps
11.1 The PC map representation
11.1.1 The cluster level
11.1.2 The block level
11.1.3 The instruction level
11.2 Generating the PC map
11.3 Interpreting the PC map
Chapter 12 The
Moby
run-time system
12.1 Run-time representations
12.1.1 Function closures
12.1.2 Objects and method suites
12.1.3 Tagtypes
12.1.4 Arrays and vectors
12.2 Runtime system data structures
12.3 Garbage collection
12.4 Multithreading
Chapter 13 The
Moby
compilation environment
13.1 Groups and the filemap
13.2 MBI files
13.3 MBX files
13.3.1 Basic structure of an MBX file
13.3.2 Overloading specifications
13.3.3 Specifying types
13.3.4 Specifying BOL types
13.3.5 Value bindings
13.3.6 Specifying BOL code
13.3.7 The
comp-env
library
13.3.8 The
gen-mbi
tool
13.3.9 Future directions
Chapter 14 The code-generator generator
14.1 The specification language
14.2 Generating the rewriting rules
Chapter 15 The
gen-mbi
tool
15.1 Overview
15.2 Parsing
15.3 Translation
15.4 Output