From: Juho Snellman Date: Mon, 2 Oct 2006 11:34:25 +0000 (+0000) Subject: 0.9.17.5: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=68165e850aa0700741756fead44a53642194aa39;p=sbcl.git 0.9.17.5: The debugger tends to not show all variables regardless of the optimization policy. Fix the most common reason for that happening. * When compiling with a high debug quality, don't do substitution for variables that are only used once. * Except for variables introduced in DEFTRANSFORM inline lambdas, since they're not going to very interesting for the debugger. --- diff --git a/NEWS b/NEWS index 8bc1042..be6d635 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ changes in sbcl-0.9.18 (1.0.beta?) relative to sbcl-0.9.16: returns T (reported by Anton Kazennikov) * bug fix: the STORE-VALUE restart of CHECK-TYPE works correctly with non-variable places + * improvement: the debugger will now also display local variables that + are only used once, for code compiled with a DEBUG optimization quality + of 2 or higher. changes in sbcl-0.9.17 (0.9.99?) relative to sbcl-0.9.16: * feature: weak hash tables, see MAKE-HASH-TABLE documentation diff --git a/src/compiler/ir1opt.lisp b/src/compiler/ir1opt.lisp index 1fd55cd..2bdb4de 100644 --- a/src/compiler/ir1opt.lisp +++ b/src/compiler/ir1opt.lisp @@ -1126,6 +1126,17 @@ (ref (lvar-use (combination-fun call)))) (change-ref-leaf ref new-fun) (setf (combination-kind call) :full) + ;; The internal variables of a transform are not going to be + ;; interesting to the debugger, so there's no sense in + ;; suppressing the substitution of variables with only one use + ;; (the extra variables can slow down constraint propagation). + (setf (combination-lexenv call) + (make-lexenv :default (combination-lexenv call) + :policy (process-optimize-decl + '(optimize + (preserve-single-use-debug-variables 0)) + (lexenv-policy + (combination-lexenv call))))) (locall-analyze-component *current-component*)))) (values)) @@ -1505,6 +1516,9 @@ leaf var))) t))))) ((and (null (rest (leaf-refs var))) + ;; Don't substitute single-ref variables on high-debug / + ;; low speed, to improve the debugging experience. + (policy call (< preserve-single-use-debug-variables 3)) (substitute-single-use-lvar arg var))) (t (propagate-to-refs var (lvar-type arg)))))) diff --git a/src/compiler/policies.lisp b/src/compiler/policies.lisp index e68e4b0..78759f4 100644 --- a/src/compiler/policies.lisp +++ b/src/compiler/policies.lisp @@ -80,3 +80,10 @@ (define-optimization-quality compute-debug-fun debug ("no" "minimal" "yes" "yes")) + +(define-optimization-quality preserve-single-use-debug-variables + (if (and (>= debug 2) + (< speed 3)) + 3 + 0) + ("no" "no" "no" "yes")) diff --git a/version.lisp-expr b/version.lisp-expr index 3adfc5a..99ff286 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.9.17.4" +"0.9.17.5"