From: Nikodemus Siivola Date: Sat, 13 Aug 2011 11:31:17 +0000 (+0300) Subject: fix DESCRIBE on compiled closures from EVAL X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=d5ec4e5681e0dbe44b3fbd5f35df9f9bde5ee337;p=sbcl.git fix DESCRIBE on compiled closures from EVAL lp#824974 --- diff --git a/NEWS b/NEWS index 53f446f..c41f93f 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,7 @@ changes relative to sbcl-1.0.50: forms. (lp#823014) * bug fix: OPEN :IF-EXISTS :APPEND now returns correct FILE-POSITION before first write (lp#561642). + * bug fix: compiled closures from EVAL could not be DESCRIBEd. (lp#824974) changes in sbcl-1.0.50 relative to sbcl-1.0.49: * enhancement: errors from FD handlers now provide a restart to remove diff --git a/src/code/describe.lisp b/src/code/describe.lisp index cfee036..4f36a91 100644 --- a/src/code/describe.lisp +++ b/src/code/describe.lisp @@ -512,9 +512,7 @@ (format stream "~@:_Source file: ~A" namestring)) ((sb-di:debug-source-form source) (format stream "~@:_Source form:~@:_ ~S" - (sb-di:debug-source-form source))) - (t (bug "Don't know how to use a DEBUG-SOURCE without ~ - a namestring or a form.")))))))) + (sb-di:debug-source-form source))))))))) #+sb-eval (let ((source (sb-eval:interpreted-function-source-location function))) (when source diff --git a/tests/interface.impure.lisp b/tests/interface.impure.lisp index 2de5766..ac4776a 100644 --- a/tests/interface.impure.lisp +++ b/tests/interface.impure.lisp @@ -83,15 +83,20 @@ ;;; support for DESCRIBE tests (defstruct to-be-described a b) (defclass forward-describe-class (forward-describe-ref) (a)) +(let ((sb-ext:*evaluator-mode* :compile)) + (eval `(let (x) (defun closure-to-describe () (incf x))))) ;;; DESCRIBE should run without signalling an error. -(describe (make-to-be-described)) -(describe 12) -(describe "a string") -(describe 'symbolism) -(describe (find-package :cl)) -(describe '(a list)) -(describe #(a vector)) +(with-test (:name (describe :no-error)) + (describe (make-to-be-described)) + (describe 12) + (describe "a string") + (describe 'symbolism) + (describe (find-package :cl)) + (describe '(a list)) + (describe #(a vector)) +;; bug 824974 + (describe 'closure-to-describe)) ;;; The DESCRIBE-OBJECT methods for built-in CL stuff should do ;;; FRESH-LINE and TERPRI neatly.