The declarations (,
TYPE type variable ...)(,
are ignored by both the interpreter and the compiler.FTYPE type function ...)
SPECIALDeclaration EXT:NOTSPECIAL. Declarations (
and PROCLAIM '(SPECIAL variable))DEFCONSTANT are undone by the ( declaration. This declaration can be used only in
global PROCLAIM '(EXT:NOTSPECIAL
variable))PROCLAIM and DECLAIM forms, not in local DECLARE forms.
Of course, you cannot expect miracles: functions compiled before the
EXT:NOTSPECIAL proclamation was issued will still be treating variable as
special even after the EXT:NOTSPECIAL proclamation.
Function EXT:SPECIAL-VARIABLE-P. You can use the function ( to check whether the symbol is a
special variable. EXT:SPECIAL-VARIABLE-P symbol
&OPTIONAL environment)environment of NIL or omitted means use the global environment.
You can also obtain the current lexical environment using the macro
EXT:THE-ENVIRONMENT (interpreted code only).
This function will always return T for global special
variables and constant variables.
SAFETYDeclaration (
results in “safe” compiled code: function calls are never
eliminated. This guarantees the semantics described in [ANSI CL standard]
Section 3.5.
OPTIMIZE (SAFETY 3))
(COMPILE)The declaration (COMPILE) has the effect that the current
form is compiled prior to execution. Examples:
(LOCALLY(DECLARE(compile))form)
executes a compiled version of form.
(LET((x 0)) (FLET((inc () (DECLARE(compile)) (INCFx)) (dec () (DECFx))) (VALUES#'inc #'dec)))
returns two functions. The first is compiled and increments x, the
second is interpreted (slower) and decrements the same x.
SPACEThe declaration determines what metadata is recorded in the function object:
| These notes document CLISP version 2.44 | Last modified: 2008-02-02 |