From 6f1e01e1a5b76ab0cf1c2f1c06c633389a64b0ce Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Wed, 5 Aug 2015 00:39:50 +0300 Subject: [PATCH] Better source locations for spliced in forms inside backqoute. Look inside sb-int:comma-expr. Fixes lp#1361502. --- NEWS | 3 ++- src/code/debug-int.lisp | 2 ++ src/compiler/ir1report.lisp | 4 +++- src/compiler/ir1tran.lisp | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index e778d1d9a..2aa8e8b05 100644 --- a/NEWS +++ b/NEWS @@ -7,9 +7,10 @@ changes relative to sbcl-1.2.14: section of the manual. * enhancement: ASDF updated to 3.1.5. (lp#1476867) * enhancement: definitions within PROGN get proper source locations when - compiled (needs latest Slime to take advantage of this). + compiled (needs latest Slime to take advantage of this). (lp#1473147) * bug fix: better source location in the presence of quoted forms. (lp#1370561) + * bug fix: better source locations inside backqoute. (lp#1361502) * bug fix: HANDLER-BIND requires that the handler-function be a function designator at the time of binding establishment. (lp#1480679) diff --git a/src/code/debug-int.lisp b/src/code/debug-int.lisp index 6e1eb252c..6ff6e0009 100644 --- a/src/code/debug-int.lisp +++ b/src/code/debug-int.lisp @@ -2569,6 +2569,8 @@ register." '(progn (when (atom subform) (return)) (let ((fm (car subform))) + (when (sb!int:comma-p fm) + (setf fm (sb!int:comma-expr fm))) (cond ((consp fm) (translate1 fm (cons pos path))) ((eq 'quote fm) diff --git a/src/compiler/ir1report.lisp b/src/compiler/ir1report.lisp index f7d57d60f..6add1c059 100644 --- a/src/compiler/ir1report.lisp +++ b/src/compiler/ir1report.lisp @@ -152,7 +152,9 @@ (let ((form root) (current (rest rpath))) (loop - (when (atom form) + (when (sb!int:comma-p form) + (setf form (sb!int:comma-expr form))) + (when (atom form) (aver (null current)) (return)) (let ((head (first form))) diff --git a/src/compiler/ir1tran.lisp b/src/compiler/ir1tran.lisp index 76d0d186f..35270ffcd 100644 --- a/src/compiler/ir1tran.lisp +++ b/src/compiler/ir1tran.lisp @@ -530,6 +530,8 @@ `(progn (when (atom subform) (return)) (let ((fm (car subform))) + (when (sb!int:comma-p fm) + (setf fm (sb!int:comma-expr fm))) (cond ((consp fm) ;; If it's a cons, recurse. (sub-find-source-paths fm (cons pos path))) -- 2.11.4.GIT