Re: Inlined TYPEP over-optimization issue with CHANGE-CLASS
Christophe Rhodes <[email protected]> Sun, 12 Feb 2012 13:58:29 +0000
| Newsgroups | gmane.lisp.cmucl.general |
|---|---|
| Message-ID | <[email protected]> |
Dan Corkill <[email protected]> writes: > (defun %show-issue (instance) > (change-class instance 'bar) > (format t "~&;; Inlined TYPEP: ~s (~:*~:[correct~;incorrect~])~ > ~%;; Not-inlined TYPEP: ~s (~:*~:[correct~;incorrect~])~%" > (typep instance 'foo) > (locally (declare (notinline typep)) > (typep instance 'foo)))) Here's a related test case: (defun %show-issue (instance) (when (typep instance 'foo) (change-class instance 'bar) (format t "~&;; Inlined TYPEP: ~s (~:*~:[correct~;incorrect~])~ ~%;; Not-inlined TYPEP: ~s (~:*~:[correct~;incorrect~])~%" (typep instance 'foo) (locally (declare (notinline typep)) (typep instance 'foo))))) (%show-issue (make-instance 'foo)) I don't know whether that passes or fails on CMUCL, but it does reveal a too-optimistic inlining (or maybe constraint propagation) on SBCL -- so it might be worth checking. Best, Christophe _______________________________________________ cmucl-help mailing list [email protected] http://lists.zs64.net/mailman/listinfo/cmucl-help