X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fir1tran.lisp;h=1dff082cd57bfe87a2c32c77dbc7fb36605de50e;hb=2e5263a05f55e2b56a3194ad7853e9ae18ad69af;hp=6a8bedefbfdc41099c5b7a7c2bfbffb4cc1eb040;hpb=8ae4206d774745ea928fc89a13ebf34de506aa6e;p=sbcl.git diff --git a/src/compiler/ir1tran.lisp b/src/compiler/ir1tran.lisp index 6a8bede..1dff082 100644 --- a/src/compiler/ir1tran.lisp +++ b/src/compiler/ir1tran.lisp @@ -43,6 +43,18 @@ (when (source-form-has-path-p form) (gethash form *source-paths*))) +(defun simplify-source-path-form (form) + (if (consp form) + (let ((op (car form))) + ;; In the compiler functions can be directly represented + ;; by leaves. Having leaves in the source path is pretty + ;; hard on the poor user, however, so replace with the + ;; source-name when possible. + (if (and (leaf-p op) (leaf-has-source-name-p op)) + (cons (leaf-source-name op) (cdr form)) + form)) + form)) + (defun note-source-path (form &rest arguments) (when (source-form-has-path-p form) (setf (gethash form *source-paths*) @@ -551,7 +563,8 @@ (defun ir1-convert (start next result form) (ir1-error-bailout (start next result form) (let* ((*current-path* (or (get-source-path form) - (cons form *current-path*))) + (cons (simplify-source-path-form form) + *current-path*))) (start (instrument-coverage start nil form))) (cond ((atom form) (cond ((and (symbolp form) (not (keywordp form)))