X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fmethods.lisp;h=f4fca4f910d35b6cc3ce53f5efd1e957a63d8594;hb=872175cd9cb5b4966a36d4bd92421cc407a0355b;hp=93717ec6d9a4f6fb5c154eeef646f973598598ba;hpb=d5aafdd8ab6387e12bac187048ed322bc96fb79a;p=sbcl.git diff --git a/src/pcl/methods.lisp b/src/pcl/methods.lisp index 93717ec..f4fca4f 100644 --- a/src/pcl/methods.lisp +++ b/src/pcl/methods.lisp @@ -23,22 +23,6 @@ (in-package "SB-PCL") -(defmethod shared-initialize :after ((slotd standard-slot-definition) - slot-names &key) - (declare (ignore slot-names)) - (with-slots (allocation class) - slotd - (setq allocation (if (eq allocation :class) class allocation)))) - -(defmethod shared-initialize :after ((slotd structure-slot-definition) - slot-names - &key (allocation :instance)) - (declare (ignore slot-names)) - (unless (eq allocation :instance) - (error "Structure slots must have :INSTANCE allocation."))) - -(defmethod inform-type-system-about-class ((class structure-class) (name t)) - nil) ;;; methods ;;; @@ -603,6 +587,12 @@ t))) #'(lambda (&rest args) (funcall mf args nil)))) + +(defun error-need-at-least-n-args (function n) + (error "~@" + function + n)) + (defun types-from-arguments (generic-function arguments &optional type-modifier) (multiple-value-bind (nreq applyp metatypes nkeys arg-info) @@ -612,9 +602,8 @@ (dotimes-fixnum (i nreq) i (unless arguments - (error "The function ~S requires at least ~D arguments" - (generic-function-name generic-function) - nreq)) + (error-need-at-least-n-args (generic-function-name generic-function) + nreq)) (let ((arg (pop arguments))) (push (if type-modifier `(,type-modifier ,arg) arg) types-rev))) (values (nreverse types-rev) arg-info))))