* In `clos-cpl', distinguish the `class' argument to the outer
function from the lambda-bound `c'. This makes the lambda short
enough to un-miser the `merge-class-lists' call.
* in `dylan-cpl', hoist the `cpls' calculation into the `let', to
match `c3-cpl' below. Again, this lets us un-miser.
(remove-duplicates (cons class
(mappend #'superclasses
direct-supers))))))
(remove-duplicates (cons class
(mappend #'superclasses
direct-supers))))))
- (merge-class-lists
- (mapcar (lambda (class)
- (cons class (sod-class-direct-superclasses class)))
- (superclasses class))
- #'clos-tiebreaker)))
+ (merge-class-lists (mapcar (lambda (c)
+ (cons c (sod-class-direct-superclasses c)))
+ (superclasses class))
+ #'clos-tiebreaker)))
(export 'dylan-cpl)
(defun dylan-cpl (class)
(export 'dylan-cpl)
(defun dylan-cpl (class)
assuming that the superclass CPLs are already monotonic. If they aren't,
you're going to lose anyway."
assuming that the superclass CPLs are already monotonic. If they aren't,
you're going to lose anyway."
- (let ((direct-supers (sod-class-direct-superclasses class)))
- (merge-class-lists
- (cons (cons class direct-supers)
- (mapcar #'sod-class-precedence-list direct-supers))
- #'clos-tiebreaker)))
+ (let* ((direct-supers (sod-class-direct-superclasses class))
+ (cpls (mapcar #'sod-class-precedence-list direct-supers)))
+ (merge-class-lists (cons (cons class direct-supers) cpls)
+ #'clos-tiebreaker)))
(export 'c3-cpl)
(defun c3-cpl (class)
(export 'c3-cpl)
(defun c3-cpl (class)