Version 2 (modified by ehuelsmann, 14 years ago) (diff)


Compilation phases

The compiler makes 3 passes for a full compilation:

  • precompile (applies to both the compiler and interpreter)
  • p1
  • p2

The precompiler

The precompiler does a number of source code transforms which are semantically equal, in order to reduce the number of permutations the compiler should accomodate for. By no means the list below is limitative, but these are the ones I found so far:

  • expansion of multiple SETF pairs into separate SETF statements
  • the same for SETQ
  • expansion of lambda expressions in the operator position into explicit FUNCALLs

Compilation phase 1: p1

Honestly, I have no idea what the difference is between p1 and p2, except for what is specified below.

Compilation phase 2: p2

This phase creates the compilation output. It's unclear to me whether this is a single '.cls' file or that this applies to a full file compile.