From: Christophe Rhodes Date: Fri, 4 Feb 2005 11:46:41 +0000 (+0000) Subject: 0.8.19.14: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=93f8ccc47e0cf6d0bb0af771a974ba20d0768704;p=sbcl.git 0.8.19.14: Merge "PCL depessimization" as in sbcl-devel 2005-02-03 --- diff --git a/NEWS b/NEWS index be8ba6d..947145f 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ changes in sbcl-0.8.20 (0.9alpha.0?) relative to sbcl-0.8.19: Euler) * optimization: sequence traversal functions use their freedom to coerce function designators to functions. + * optimization: code with many calls to CLOS methods specialized on + CLOS classes has had redundant type checks removed. * fixed some bugs related to Unicode integration: ** portions of multibyte characters at the end of buffers for character-based file input are correctly transferred to the diff --git a/src/pcl/boot.lisp b/src/pcl/boot.lisp index d1a56b4..4e3aa52 100644 --- a/src/pcl/boot.lisp +++ b/src/pcl/boot.lisp @@ -614,23 +614,28 @@ bootstrapping. ;; Otherwise, we can usually make Python very happy. (let ((type (info :type :kind specializer))) (ecase type - ((:primitive :defined :instance :forthcoming-defclass-type) - `(type ,specializer ,parameter)) - ((nil) + ((:primitive) `(type ,specializer ,parameter)) + ((:instance nil) (let ((class (find-class specializer nil))) - (if class - `(type ,(class-name class) ,parameter) - (progn - ;; we can get here, and still not have a failure - ;; case, by doing MOP programming like (PROGN - ;; (ENSURE-CLASS 'FOO) (DEFMETHOD BAR ((X FOO)) - ;; ...)). Best to let the user know we haven't - ;; been able to extract enough information: - (style-warn - "~@" - specializer - 'parameter-specializer-declaration-in-defmethod) - '(ignorable)))))))))) + (cond + (class + (if (typep class '(or built-in-class structure-class)) + `(type ,specializer ,parameter) + ;; don't declare CLOS classes as parameters; + ;; it's too expensive. + '(ignorable))) + (t + ;; we can get here, and still not have a failure + ;; case, by doing MOP programming like (PROGN + ;; (ENSURE-CLASS 'FOO) (DEFMETHOD BAR ((X FOO)) + ;; ...)). Best to let the user know we haven't + ;; been able to extract enough information: + (style-warn + "~@" + specializer + 'parameter-specializer-declaration-in-defmethod) + '(ignorable))))) + ((:forthcoming-defclass-type) '(ignorable))))))) (defun make-method-lambda-internal (method-lambda &optional env) (unless (and (consp method-lambda) (eq (car method-lambda) 'lambda)) diff --git a/version.lisp-expr b/version.lisp-expr index a69dddc..030c40b 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.19.13" +"0.8.19.14"