X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fmethods.lisp;h=13bc885a07cd75927a3ab7e00cefc365952fde1f;hb=d335afdcf50b641a0aafd32741e0777d4e12a59b;hp=bbbf4995cf6e34b4088ad4e2cb5b301839786756;hpb=90c4b36715e7173e12fe4af1079a347b2e6fd14b;p=sbcl.git diff --git a/src/pcl/methods.lisp b/src/pcl/methods.lisp index bbbf499..13bc885 100644 --- a/src/pcl/methods.lisp +++ b/src/pcl/methods.lisp @@ -554,7 +554,6 @@ (warn "~@" mc-name method qualifiers)))))) - (unless skip-dfun-update-p (update-ctors 'add-method :generic-function generic-function @@ -616,11 +615,11 @@ ;; 7.6.4 point 5 probably entails that if any method says ;; &allow-other-keys then the gf should be construed to ;; accept any key. - (let ((allowp (or gf.allowp - (find '&allow-other-keys methods - :test #'find - :key #'method-lambda-list)))) - (setf (info :function :type name) + (let* ((allowp (or gf.allowp + (find '&allow-other-keys methods + :test #'find + :key #'method-lambda-list))) + (ftype (specifier-type `(function (,@(mapcar tfun gf.required) @@ -644,10 +643,11 @@ `(&key)) ,@(when allowp `(&allow-other-keys))) - *)) + *)))) + (setf (info :function :type name) ftype (info :function :where-from name) :defined-method - (gf-info-needs-update gf) nil)))))) - (values))) + (gf-info-needs-update gf) nil) + ftype))))))) (defun compute-applicable-methods-function (generic-function arguments) (values (compute-applicable-methods-using-types @@ -1183,35 +1183,6 @@ (class-eq (cadr type)) (class (cadr type))))) -(defun precompute-effective-methods (gf caching-p &optional classes-list-p) - (let* ((arg-info (gf-arg-info gf)) - (methods (generic-function-methods gf)) - (precedence (arg-info-precedence arg-info)) - (*in-precompute-effective-methods-p* t) - (classes-list nil)) - (generate-discrimination-net-internal - gf methods nil - (lambda (methods known-types) - (when methods - (when classes-list-p - (push (mapcar #'class-from-type known-types) classes-list)) - (let ((no-eql-specls-p (not (methods-contain-eql-specializer-p - methods)))) - (map-all-orders - methods precedence - (lambda (methods) - (get-secondary-dispatch-function1 - gf methods known-types - nil caching-p no-eql-specls-p)))))) - (lambda (position type true-value false-value) - (declare (ignore position type true-value false-value)) - nil) - (lambda (type) - (if (and (consp type) (eq (car type) 'eql)) - `(class-eq ,(class-of (cadr type))) - type))) - classes-list)) - ;;; We know that known-type implies neither new-type nor `(not ,new-type). (defun augment-type (new-type known-type) (if (or (eq known-type t) @@ -1570,15 +1541,15 @@ (defun slot-value-using-class-dfun (class object slotd) (declare (ignore class)) - (function-funcall (slot-definition-reader-function slotd) object)) + (funcall (slot-info-reader (slot-definition-info slotd)) object)) (defun setf-slot-value-using-class-dfun (new-value class object slotd) (declare (ignore class)) - (function-funcall (slot-definition-writer-function slotd) new-value object)) + (funcall (slot-info-writer (slot-definition-info slotd)) new-value object)) (defun slot-boundp-using-class-dfun (class object slotd) (declare (ignore class)) - (function-funcall (slot-definition-boundp-function slotd) object)) + (funcall (slot-info-boundp (slot-definition-info slotd)) object)) (defun special-case-for-compute-discriminating-function-p (gf) (or (eq gf #'slot-value-using-class)