From: Nikodemus Siivola Date: Fri, 1 Apr 2005 12:57:28 +0000 (+0000) Subject: 0.8.21.11: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=0220b66ca721bc9515ebf2dedab69407850ff518;p=sbcl.git 0.8.21.11: * print null lexenvs as #, making for more compact backtraces. Non-null lexenvs still print as structures. * add TYPE-WARNING to cross-conditions for comfort, and try to embarrass the next one to diddle there into solving the larger issue. --- diff --git a/NEWS b/NEWS index 90e2cb4..c74b7b0 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ changes in sbcl-0.8.22 relative to sbcl-0.8.21: * incompatible change: the --noprogrammer option, deprecated since version 0.7.5, has been removed. Please use the equivalent --disable-debugger option instead. + * Null lexical environments are now printed as #, + significantly reducing the amount of clutter in typical backtraces. * improved the startup banner. (thanks to Brian Mastenbrook and Teemu Kalvas) * optimization: REPLACE on declared (UNSIGNED-BYTE 8) vectors, as well diff --git a/src/code/cross-condition.lisp b/src/code/cross-condition.lisp index e74fc3c..5c2f821 100644 --- a/src/code/cross-condition.lisp +++ b/src/code/cross-condition.lisp @@ -31,6 +31,15 @@ (define-condition reference-condition () ((references :initarg :references :reader reference-condition-references))) +;;; KLUDGE: yet another OAOOM. +;;; +;;; FIXME: This is clearly one OAOOM KLUDGE too many in a row. When tempted +;;; to add another one invent DEF!CONDITION or whatever seems necessary, +;;; and replace these. +(define-condition type-warning (reference-condition simple-warning) + () + (:default-initargs :references (list '(:sbcl :node "Handling of Types")))) + (define-condition bug (simple-error) () (:report diff --git a/src/compiler/lexenv.lisp b/src/compiler/lexenv.lisp index 34b4a59..5eba1fa 100644 --- a/src/compiler/lexenv.lisp +++ b/src/compiler/lexenv.lisp @@ -15,7 +15,8 @@ ;;; (This is also what shows up as an ENVIRONMENT value in macroexpansion.) #!-sb-fluid (declaim (inline internal-make-lexenv)) ; only called in one place (def!struct (lexenv - (:constructor make-null-lexenv ()) + (:print-function print-lexenv) + (:constructor make-null-lexenv ()) (:constructor internal-make-lexenv (funs vars blocks tags type-restrictions @@ -69,6 +70,15 @@ (null (make-null-lexenv)) (lexenv x))) +(defun null-lexenv-p (lexenv) + (equalp (coerce-to-lexenv lexenv) (make-null-lexenv))) + +(defun print-lexenv (lexenv stream level) + (if (null-lexenv-p lexenv) + (print-unreadable-object (lexenv stream) + (write-string "NULL-LEXENV" stream)) + (default-structure-print lexenv stream level))) + (defun maybe-inline-syntactic-closure (lambda lexenv) (declare (type list lambda) (type lexenv lexenv)) (aver (eql (first lambda) 'lambda)) diff --git a/version.lisp-expr b/version.lisp-expr index 48b682f..2422444 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.21.10" +"0.8.21.11"