6.1 About the Compiler

6.1.1 Compiling functions and files

You can compile code either by compiling an individual function in the current environment or by compiling a file of source code.

The following example shows the compilation of a simple function:

> (defun square (x)
    (* x x))
SQUARE

> (compile 'square) SQUARE

The function disassemble prints the assembly code of a compiled function. If the specified function is not compiled,disassemble first compiles the function and then disassembles the code. You can usedisassemble to check the efficiency of the Compiler's code or to debug a function.

The function uncompile replaces the compiled version of a function or macro with the original interpreted definition. The function or macro must have been compiled by a call tocompile. You might useuncompile when you are debugging a function; some debugging tools, such as the Stepper, provide more complete information for intepreted functions than for compiled functions.


The User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker