132 lines
44 KiB
Plaintext
132 lines
44 KiB
Plaintext
1
|
||
|
||
LISP RELEASE NOTES, MEDLEY RELEASE, COMMON LISP IMPLEMENTATION
|
||
1
|
||
LISP RELEASE NOTES, MEDLEY RELEASE, COMMON LISP IMPLEMENTATION
|
||
7. COMMON LISP IMPLEMENTATION
|
||
1
|
||
|
||
7. COMMON LISP IMPLEMENTATION
|
||
1
|
||
|
||
|
||
7. COMMON LISP IMPLEMENTATION
|
||
6
|
||
|
||
|
||
This section describes new features and enhancements that implement Common Lisp into the Lisp operating environment within the Medley release. This information supplements the Common Lisp Implementation Notes, Lyric release. Medley enhancements are indicated with revision bars in the right margin.
|
||
2
|
||
|
||
New Features Since Lyric
|
||
1
|
||
|
||
The following description summarizes the new Common Lisp implementation (FEATURES NIL features NIL (7) 1 SUBNAME NEW% COMMON% LISP% SUBTEXT new% Common% Lisp% )features that have been added or changed since the Lyric release.
|
||
New compiler Interface -- The Medley compiler gives better progress reports and it is now possible to invoke the compiler on any definer (not just functions, as before).
|
||
New Implementation of Defstruct -- A new version of defstruct compiles more compactly and gives more options so that defstruct has at least as much functionality as the Interlisp record package.
|
||
Adoption of features and clarifications suggested by the Common Lisp Cleanup Committee -- Among other changes, the behavior of append on dotted lists is now better defined, and a new function xcl:row-major-aref has been added.
|
||
Common Lisp Veneer on the Interlisp record package -- A collection of macros that make the use of existing Interlisp datatypes more appealing has been added.
|
||
Performance enhancements -- A closure caching scheme now insures that repeated calls to symbol-functions of the same symbol will return EQ compiled-function objects.
|
||
New opcodes have been added for several common list functions, such as member and assoc.
|
||
Common Lisp Definers
|
||
1
|
||
|
||
The Medley release contains a new implementation of definers and a reworking of the top level of the XCL Compiler. These represent upward compatible changes that have the effect of allowing the Common Lisp compiler to print out progress reports indicating which definer is currently being compiled. To receive the full benefit of these changes, recompile any file containing a defdefiner expression.
|
||
It is now possible to compile individual definers by using any of the following forms:
|
||
Compile-Definer
|
||
1
|
||
|
||
(xcl:compile-definer(COMPILE-DEFINER (Definer) compile-definer NIL (7) 2) name type)
|
||
Compile and install the definer of type type named name .
|
||
EXAMPLE:
|
||
(xcl:compile-definer 'foo 'structures)
|
||
In this example, the definer will compile and install the structures definition of foo.
|
||
Compile-Form
|
||
1
|
||
|
||
(xcl:compile-form(COMPILE-FORM (Definer) compile-form NIL (7) 2) form)
|
||
Compile and evaluate form.
|
||
EXAMPLE:
|
||
(xcl:compile-form '(progn (defconstant c 1) (defun foo (a b) (+ c a b))))
|
||
In this example, the definer will compile and evaluate the progn using compile-file semantics.
|
||
EXAMPLE:
|
||
(xcl:compile-form '(with-collection (dotimes (i 10) (collect i))))
|
||
In this example, the definer returns:
|
||
(0 1 2 3 4 5 6 7 8 9)
|
||
|
||
Define-File-Environment
|
||
1
|
||
|
||
Rather than establishing il:makefile-environment props and il:filetypes on the root name of a file, you can define a file environment using the form:
|
||
(xcl:define-file-environment(DEFINE-FILE-ENVIRONMENT (Definer) define-file-environment NIL (7) 2) filename &key readtable package base compiler)
|
||
This produces an object of file-manager type xcl:file-environments. The filename can be either a string or a symbol. The rootname of the file is constructed by interning the filename in the Interlisp package. Puts the compiler argument (if any) under the il:filetype prop of the file rootname. Puts the readtable, package and base arguments (if any) under the il:makefile-environment prop of the file rootname. None of the arguments are evaluated. There are no defaults.
|
||
EXAMPLE:
|
||
(xcl:define-file-environment myfile :package "XCL-USER" :readtable "XCL" :compiler :compile-file)
|
||
In this example, compile-file is put under the il:filetype prop of myfile. The readtable, XCL and compile arguments are put under the il:makefile-environment prop of myfile.
|
||
NOTE: xcl:define-file-environment is a definer and hence will not be installed if il:dfnflg is il:prop or if a file is prop loaded.
|
||
Site-Name Special Uses
|
||
1
|
||
|
||
The following special variables are defined and may be set in your init file to inform Common Lisp of site information:
|
||
xcl:*short-site-name(SHORT-SITE-NAME (Variable) short-site-name NIL (7) 3)*
|
||
This variable is used in the function short-site-name.
|
||
xcl:*long-site-name(LONG-SITE-NAME (Variable) long-site-name NIL (7) 3)*
|
||
This variable is used in the function long-site-name.
|
||
EXAMPLES:
|
||
(setq xcl:*short-site-name* "AIS")
|
||
(setq xcl:*long-site-name* "Artificial Intelligence Systems")
|
||
In these examples, (short-site-name) returns "AIS" and (long-site-name) returns "Artificial Intelligence Systems".
|
||
Record Access
|
||
1
|
||
|
||
The Medley release contains several methods for accessing existing Interlisp records using Common Lisp syntax. These features help to integrate Interlisp and Common Lisp. The following sections describe these additions.
|
||
Define-Record
|
||
1
|
||
|
||
(xcl:define-record name interlisp-record-name
|
||
&key conc-name constructor predicate fast-accessors) <09><> |