Re: Inlined TYPEP over-optimization bug with CHANGE-CLASS
Raymond Toy <[email protected]> Sat, 11 Feb 2012 21:29:10 -0800
| Newsgroups | gmane.lisp.cmucl.general |
|---|---|
| Message-ID | <[email protected]> |
On 2/5/12 6:57 AM, Dan Corkill wrote: >>> I fully agree (and apologies for the confusion caused by my quick-and-dirty >>> example). >>> >>> The issue doesn't require being within an instance method--as the following >>> vanilla-function example shows. >>> >>> (in-package :cl-user) >>> >>> (defclass foo () ()) >>> (defclass bar () ()) >>> >>> (defun show-bug (instance) >>> (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)) >>> I placed your code in a file and compiled and loaded it with the 2012-02 snapshot. I get CL-USER> (show-bug (make-instance 'foo)) ;; Inlined TYPEP: NIL (incorrect) ;; Not-inlined TYPEP: NIL (correct) What version exactly are you using and how did you run your example to get an incorrect result? Ray _______________________________________________ cmucl-help mailing list [email protected] http://lists.zs64.net/mailman/listinfo/cmucl-help