[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
EW with May Day PCL
- To: express-windows@atc
- Subject: EW with May Day PCL
- From: Stephen L. Nicoud <snicoud@atc>
- Date: Fri, 11 May 90 16:19 PDT
The version of PCL provided with EW is the AAAI Day version (August
1988). Since we have been using Victoria Day, Rainy Day, and now, May
Day PCL, we knew we were gonna have to convert EW for those versions.
Here's a (hopefully somewhat complete and accurate) list of changes we
made that make EW compatible with May Day PCL (should be fine with Rainy
Day, too; don't know about Victoria Day, though).
1. Gave ":initarg"s to all slots in all the defclass forms. The
:initarg should be a symbol in the keyword package with the same as the
name of the slot.
2. Removed use of :accessor-prefix in defclass forms, installing
":accessor" for every slot in every class. The :accessor should be a
symbol with the name of the class prepended to the name of the slot
(with an intervening hyphen).
3. In frames.lisp, define-program-framework should use :initarg and
:accessor now. So, replace
#+EW-CLOS
(defclass
,name
(,inherit-from)
,(mapcar #'(lambda (variable)
(if (consp variable)
`(,(first variable) :INITFORM ,(second variable))
variable))
state-variables)
(:accessor-prefix ,(intern (lisp-format NIL "~A-" name))))
with
#+EW-CLOS
(defclass
,name
(,inherit-from)
,(mapcar #'(lambda (variable)
(if (consp variable)
`(,(first variable)
:accessor ,(intern (lisp:format NIL "~A-~A" name (first variable))
(symbol-package name))
:initarg ,(intern (string (first variable)) :keyword)
:INITFORM ,(second variable))
variable))
state-variables))
4. Removed the &rest arguments in print-object methods in frames.lisp
and macros.lisp (and removed their corresponding (declare (ignore
ignore)) statements).
5. Added this form at the end of system.lisp in order for macros.lisp to
compile properly.
(when (boundp 'pcl::*defclass-times*)
(pushnew 'compile pcl::*defclass-times*)
(pushnew 'compile pcl::*defmethod-times*))
6. In type.lisp, lisp-window.lisp, presentation-types.lisp,
flavors-to-pcl.lisp: change PCL::IWMC-CLASS-P to PCL::STANDARD-CLASS-P.
7. In lisp-window.lisp, calls to define-lisp-command with keyword args
broke lucid3.0 (">>Trap: Bus error"). This is a PCL problem, I think.
What I did was to add an "&rest ignore" to the arglist if it has &key in
it. Basically, it just looks for &key and splices in "&rest ignore" if
it finds it there. While it seems to be only a PCL problem, it
shouldn't hurt any other CLOS's to do this (I hope).
So, in frames.lisp replace:
(defun get-argument-list (args)
(let ((args (mapcar #'(lambda (arg)
(if (symbolp arg) arg
(list (first arg) (getf (cddr arg) :DEFAULT))))
args)))
(when args
(cons '&OPTIONAL args))))
with:
(defun get-argument-list (args)
(let ((args (mapcar #'(lambda (arg)
(if (symbolp arg) arg
(list (first arg) (getf (cddr arg) :DEFAULT))))
args)))
(let ((key-position (position '&key args)))
(when key-position
(cond ((zerop key-position) (setq args (append '(&rest ignore) args)))
(t (let* ((list (append '(&rest ignore) (nthcdr key-position args))))
(setq args (rplacd (nthcdr (%1- key-position) args) list))))))
(when args
(cons '&OPTIONAL args)))))
--
Stephen L. Nicoud <snicoud@atc.boeing.com> uw-beaver!bcsaic!snicoud
Boeing Advanced Technology Center for Computer Sciences