Inlined TYPEP over-optimization bug with CHANGE-CLASS

Dan Corkill <[email protected]> Sun, 5 Feb 2012 06:18:21 -0500
Newsgroups gmane.lisp.cmucl.general
Message-ID <[email protected]>
Recent CMUCL releases (including the current one), incorrectly over-optimize TYPEP and
miss the class change resulting from CHANGE-CLASS. 

The following example, when placed in a file and compiled, shows the issue:

(in-package :cl-user)

(defclass foo () ())
(defclass bar () ())

(defmethod show-bug ((instance foo))
 (change-class instance 'bar)
 (format t "~&;; Inlined TYPEP: ~s (incorrect)~%;; Not-inlined TYPEP: ~s (correct)~%"
         (typep instance 'foo)
         (locally (declare (notinline typep))
           (typep instance 'foo))))

(show-bug (make-instance 'foo))

-- Dan

_______________________________________________
cmucl-help mailing list
[email protected]
http://lists.zs64.net/mailman/listinfo/cmucl-help