Commit f3644dc3 authored by Pascal Costanza's avatar Pascal Costanza
Browse files

Fixed lack of extensible allocation kinds in Allegro Common Lisp.

darcs-hash:905164dbf83a727c6875e534c8afc7712adde1e2
parent 3d898d7b
......@@ -3,7 +3,9 @@
;; We need a new standard-class for various things.
(cl:defclass standard-class (cl:standard-class)
())
((valid-slot-allocations :initform '(:instance :class)
:accessor valid-slot-allocations
:reader excl::valid-slot-allocation-list)))
;; validate-superclass for metaclass classes is a little bit
;; more tricky than for class metaobject classes because
......@@ -34,6 +36,13 @@
`(cl:defclass ,name ,supers ,@options
(:metaclass standard-class))))
;; Allegro defines an extra check for :allocation kinds. AMOP expects any kind to be
;; permissible, though. This is corrected here.
(defmethod direct-slot-definition-class :before ((class standard-class) &key allocation &allow-other-keys)
(unless (eq (class-of class) (find-class 'standard-class))
(pushnew allocation (valid-slot-allocations class))))
;;; In Allegro, slot-boundp-using-class and slot-makunbound-using-class are specialized
;;; on slot names instead of effective slot definitions. In order to fix this,
;;; we need to rewire the slot access protocol.
......
......@@ -4,7 +4,7 @@
:defgeneric-calls-find-method-combination (no)
:defmethod-calls-make-method-lambda (no)
:dependent-protocol-for-generic-functions (fixed)
:extensible-allocation (no)
:extensible-allocation (fixed)
:function-invocation-calls-compute-applicable-methods (redef sgf)
:function-invocation-calls-compute-applicable-methods-using-classes (redef sgf)
:function-invocation-calls-compute-effective-method (redef sgf)
......@@ -25,7 +25,7 @@
:defgeneric-calls-find-method-combination (no)
:defmethod-calls-make-method-lambda (no)
:dependent-protocol-for-generic-functions (fixed)
:extensible-allocation (no)
:extensible-allocation (fixed)
:function-invocation-calls-compute-applicable-methods (redef sgf)
:function-invocation-calls-compute-applicable-methods-using-classes (redef sgf)
:function-invocation-calls-compute-effective-method (redef sgf)
......
......@@ -7,7 +7,7 @@ Allegro Common Lisp 7.0
- DEFMETHOD doesn't call MAKE-METHOD-LAMBDA. Not fixed.
- The dependent protocol for generic functions doesn't work fully. Fixed.
- The function invocation protocol doesn't call COMPUTE-APPLICABLE-METHODS, COMPUTE-APPLICABLE-METHODS-USING-CLASSES and COMPUTE-EFFECTIVE-METHOD. Not fixed.
- The :ALLOCATION type cannot be extended. Not fixed.
- The :ALLOCATION type cannot be extended. Fixed.
- MAKE-METHOD-LAMBDA is not provided. Not fixed.
- Method functions don't take parameters as specified in AMOP, but instead just the parameters that the generic function receives. Not fixed.
- The defmethod form does not accept multiple qualifiers. Not fixed.
......@@ -24,7 +24,7 @@ Allegro Common Lisp 8.0b
- DEFMETHOD doesn't call MAKE-METHOD-LAMBDA. Not fixed.
- The dependent protocol for generic functions doesn't work fully. Fixed.
- The function invocation protocol doesn't call COMPUTE-APPLICABLE-METHODS, COMPUTE-APPLICABLE-METHODS-USING-CLASSES and COMPUTE-EFFECTIVE-METHOD. Not fixed.
- The :ALLOCATION type cannot be extended. Not fixed.
- The :ALLOCATION type cannot be extended. Fixed.
- MAKE-METHOD-LAMBDA is not provided. Not fixed.
- Method functions don't take parameters as specified in AMOP, but instead just the parameters that the generic function receives. Not fixed.
- REINITIALIZE-INSTANCE doesn't determine a new discriminating function. Fixed.
......@@ -135,7 +135,7 @@ Summary:
- CLisp doesn't change a FORWARD-REFERENCED-CLASS via CHANGE-CLASS. Apart from that, FORWARD-REFERENCED-CLASS works reliably across all MOPs.
- Effective slot definitions and EFFECTIVE-SLOT-DEFINITION-CLASS don't receive :documentation in CMUCL, and no :allocation (!) in LispWorks.
- If you specialize DIRECT-SLOT-DEFINITION-CLASS, use FIX-SLOT-INITARGS in portable code.
- If you want to use :ALLOCATION types other than :CLASS or :INSTANCE, you cannot use Allegro Common Lisp, CLisp before 2.37, LispWorks or MCL. Only CLisp from 2.37 on, CMUCL, OpenMCL and SBCL support this.
- If you want to use :ALLOCATION types other than :CLASS or :INSTANCE, you cannot use CLisp before 2.37, LispWorks or MCL. Only Allegro Common Lisp, CLisp from 2.37 on, CMUCL, OpenMCL and SBCL support this.
- In Allegro, CMUCL and LispWorks, STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS are not compatible.
- The function invocation protocol only works in CMUCL, SBCL and CLisp.
- If you need to see :direct-default-initargs when classes are initialized, conditionalize on #+lispworks to receive :default-initargs instead.
......
......@@ -29,3 +29,4 @@ v0.3
- Allegro 6.2 is not supported anymore. The existing conditionalizations are still available, though, and will be retained as long as they don't stand in the way of anything else.
- The incorrect specialization of slot-boundp-using-class and slot-makunbound-using-class on symbols instead of slot definition metaobjects in Allegro is fixed.
- SBCL 0.9.7 has improved a lot wrt MOP compatibility. This required some changes in the PCL support.
- The lack of extensible :allocation kinds in Allegro is fixed. (Covers 6.2, 7.0 and 8.0. Thanks to John Foderaro for giving me the important hint on how to solve this.)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment