15.11 Implementation Details

The output from the compiler is a list of instructions in the order which they will be executed. Each instruction is a list, an operation followed by as many items as are required by that operation. The compiled code may be executed by simulating the actions of the machine on each element of the sequence. In the interest of efficiency, the compiler ouput is translated into a sequence of actual machine instructions. An area of memory (which is not garbage collected), is allocated to receive the processed compiler output. This area is called the Binary Program Space or BPS. The function lap translates the output from the compiler into machine instructions.

The functions faslout, faslend, and faslabort are used by Compile-file-aux to compile files. It should not be necessary for you to used these functions, they are included for completeness. Evaluation of

(faslout name)

will cause the message

FASLOUT: (DSKIN files) or type in expressions
When all done execute (FASLEND)

to be displayed. Subsequent expressions, typed in or read from files, are not processed in the normal fashion. The following piece of code demonstrates how this feature is implemented.

  (de toploop  
    (cond ((not ⋆defn) (top-loop-eval-and-print input-value))  
          (dfprint⋆ (funcall dfprint⋆ input-value))  
          (t (prettyprint input-value)))  
      ... )

When the switch *defn is nil the input is evaluated and the result is printed. Setting *defn to t and associating a function with the global dfprint* allows for the redefinition of what is meant by evaluating the input and printing the result of that evaluation. It the function bound to dfprint* which is responsible for the compilation of expressions. Faslend is provided to discontinue compilation, faslabort is used to abort the compilation. The only context in which the application of these functions makes sense is when a previous invocation of faslout has not been terminated.

⋆⋆⋆⋆⋆ FASLEND not within FASLOUT