Changes in HEAD
Modified src/org/armedbear/lisp/clos.lisp
diff --git a/src/org/armedbear/lisp/clos.lisp b/src/org/armedbear/lisp/clos.lisp
index 5d46bc1..2991acb 100644
a
|
b
|
compare the method combination name to the symbol 'standard.") |
1605 | 1605 | ;;; defgeneric |
1606 | 1606 | |
1607 | 1607 | (defmacro defgeneric (function-name lambda-list |
1608 | | &rest options-and-method-descriptions) |
| 1608 | &rest options-and-method-descriptions |
| 1609 | &environment env) |
1609 | 1610 | (let ((options ()) |
1610 | 1611 | (methods ()) |
1611 | 1612 | (declarations ()) |
1612 | | (documentation nil)) |
| 1613 | (documentation nil) |
| 1614 | (generic-function-class nil)) |
1613 | 1615 | (dolist (item options-and-method-descriptions) |
1614 | 1616 | (case (car item) |
1615 | 1617 | (declare |
… |
… |
compare the method combination name to the symbol 'standard.") |
1626 | 1628 | `(push (defmethod ,function-name ,@(cdr item)) |
1627 | 1629 | (generic-function-initial-methods (fdefinition ',function-name))) |
1628 | 1630 | methods)) |
| 1631 | (:generic-function-class |
| 1632 | (when generic-function-class |
| 1633 | (error 'program-error |
| 1634 | :format-control "Generic function class was specified twice for generic function ~S." |
| 1635 | :format-arguments (list function-name))) |
| 1636 | (setf generic-function-class (second item)) |
| 1637 | (push item options)) |
1629 | 1638 | (t |
1630 | 1639 | (push item options)))) |
1631 | 1640 | (when declarations (push (list :declarations declarations) options)) |
1632 | 1641 | (setf options (nreverse options) |
1633 | 1642 | methods (nreverse methods)) |
| 1643 | (when generic-function-class |
| 1644 | (let ((class (find-class generic-function-class t env))) |
| 1645 | (unless (typep (class-of class) 'funcallable-standard-class) |
| 1646 | (warn "Supplied generic function class ~S ~_for generic function ~S ~_is not of metaclass FUNCALLABLE-STANDARD-CLASS" |
| 1647 | generic-function-class function-name)))) |
1634 | 1648 | ;;; Since DEFGENERIC currently shares its argument parsing with |
1635 | 1649 | ;;; DEFMETHOD, we perform this check here. |
1636 | 1650 | (when (find '&aux lambda-list) |