Introduction
The transformation from human readable source code to an executable
requires a number of steps. Together these steps constitute the process
of compilation. The compilation process produces an abstract syntax tree (for
an example, see page ??) and a sequence of instructions
for a cpu or virtual machine.
In Objective CAML, the product of compilation is linked with the Objective CAML
runtime library. The library is
provided with the compiler distribution and is adapted to different host environments (operating system and CPU). The runtime library contains primitive
functions such as operations over numbers, the interface to the operating
system, and memory management.
Objective CAML has two compilers. The first compiler produces bytecode for the
Objective CAML virtual machine. The second compiler
generates instructions for a number of ``real'' processors, such as the Intel,
Motorola, SPARC, HP-PA, Power-PC
and Alpha CPUs. The Objective CAML bytecode compiler produces compact portable code, while the
native-code compiler generates high performance architecture dependent code. The
Objective CAML toplevel system,
which appeared in the first part of this book, uses the bytecode compiler; each user input
is compiled and executed in the symbolic environment defined by the current interactive session.