MTS 8: LISP and SLIP in MTS
Page Revised January 1983 June 1976
(DECLARE F =CHECK)
then when it is compiled, the generated code will include a
test to check that the correct number of arguments was passed
to the function, and various other error checks (for valid
atomic, list, or numeric arguments, etc.) will be made.
Normally, little or no error checking is performed by compiled
programs.
If the variable =CHECK is set to T, all functions will be
compiled as if they had been declared =CHECK.
Functions Known to the Compiler
The following functions have fixed definitions within compiled
code:
ABS ADD ADD1 AND APPLY APPLY1 ARG ASSOC ATOM C...R COND CONS
IDIVIDE EQ EQUAL EVAL EVEN GET GO GRAFT GREATER LAND LESS
LENGTH LIST LOR LXOR MAP MAPC MAPCAN MAPCAR MAPCON MAPLIST MAX
MEMBER MIN MINUS NOT NTH NUMBER OR PROG PROGN PUT QUOTE REMAIN
REPEAT RETURN REVERSE SELECT SET SETA SETQ SHIFT SUB SUB1
TIMES UNCONS ZERO
The following functions are declared to be fixed-link functions:
| CHECKPOINT, COPY, DECLARE, DEFUN, DISPLAY, LABEL, MODIFY,
| NEWWORLD, OBLIST, OPEN, REALWORLD, REM, REMOB, SETA2, SETQ2,
| STATUS, TRACE, UNTRACE,
Limitations and Warnings
(1) General Warning:
Compiled functions do a minimum of error checking, so users are
advised to debug their programs before compiling them. Unless
the =CHECK option is used, the normal checks for undefined
variables, bad atomic, list, and numeric arguments, array
dimensions exceeding legal limits, etc., do not occur in
compiled code.
(2) Since fixed-link functions are not executed under control of
EVAL, debugging features such as TRACE, BUG, and STEP cannot be
used with them.
(3) An APPLY of a no-spread macro or LAMBDA-expression cannot be
compiled. (Use APPLY1 instead.)
(4) Functions used as macros may not be recursive. An attempt to
compile a recursive MACRO will generate an error.
86 LISP

MTS 8: LISP and SLIP in MTS
June 1976 Page Revised January 1983
(5) Each internal block must be less than one page in length. If
the compiler finds that a block is too long, it will terminate
with an error message. The user can then break the program
downinto smaller blocks and recompile. Note: Experience indi-
cates that about 50-75 lines of LISP code (uninterrupted by
internal blocks) will compile into one page.
(6) The total number of blocks in one compiled routine cannot exceed
150.
(7) The number of bytes in the first block of a program, plus the
number of special variables, times four, must be less than 4096.
(8) The number of local variables defined at one time cannot exceed
1020.
(9) The compiler occupies 40 pages of memory, and compilation of
even a small program is likely to increase storage to 50 pages.
After EXCISing (using the =EXCISE function described above) the
compiler, the user may want to compress his core usage by
performing a CHECKPOINT.
(10) Functions which depend on calls to EVAL, such as UNEVAL and
RETURN with a second argument, may not operate in the same
manner when called from a compiled program, since many function
calls are compiled directly and do not generate calls to EVAL.
(11) The compiler does not process the LABEL function, hence the use
of LABELs in compiled programs is not recommended. If a LABEL
is encountered, the compiler generates a call to the
interpreter.
Other Special Features ______________________
The functions EDIT and DEBUG provide access to a LISP editor and
debugging package. These features are documented in the sections "The
LISP Editor" and "LISP Debugging Facilities" in this volume.
LISP 87
Previous Page Next Page