From 4da7c01c1cd31a730308f1e610cf636569109aeb Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Mon, 11 May 2009 19:41:48 +0000 Subject: [PATCH] 1.0.28.39: more error reporting tweakery * Now that *CURRENT-PATH* is bound first by PROCESS-TOPLEVEL-FORM make FIND-ERROR-CONTEXT prefer NODE-SOURCE-PATH *CURRENT-PATH* -- otherwise the more accurate source path in the node is never used. (Experimentally it seems that *CURRENT-PATH* is never more accurate.) Everything seems OK, but the whole source path mechanism could probably us an audit, and possibly some refactoring. * ADD-TEST-CONSTRAINTS should bind *COMPILER-ERROR-CONTEXT* around the call to SPECIALIZER-TYPE in case of undefined types. (Left out from last patch by accident.) --- src/compiler/constraint.lisp | 3 ++- src/compiler/ir1report.lisp | 6 ++---- version.lisp-expr | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/compiler/constraint.lisp b/src/compiler/constraint.lisp index 3718a3b..5a4c627 100644 --- a/src/compiler/constraint.lisp +++ b/src/compiler/constraint.lisp @@ -468,7 +468,8 @@ (ok-lvar-lambda-var (first args) constraints) (if (ctype-p val) val - (specifier-type val)) + (let ((*compiler-error-context* use)) + (specifier-type val))) nil))))) ((eq eql) (let* ((arg1 (first args)) diff --git a/src/compiler/ir1report.lisp b/src/compiler/ir1report.lisp index 72f0fa2..25a7f57 100644 --- a/src/compiler/ir1report.lisp +++ b/src/compiler/ir1report.lisp @@ -182,10 +182,8 @@ (let ((context *compiler-error-context*)) (if (compiler-error-context-p context) (values context t) - (let* ((path (or (and (boundp '*current-path*) *current-path*) - (if context - (node-source-path context) - nil))) + (let* ((path (or (and (node-p context) (node-source-path context)) + (and (boundp '*current-path*) *current-path*))) (old (find (when path (source-path-original-source path)) (remove-if #'null old-contexts) diff --git a/version.lisp-expr b/version.lisp-expr index 6241eb7..6d17690 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".) -"1.0.28.38" +"1.0.28.39" -- 1.7.10.4