X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fearly-source-location.lisp;h=57af0a7e99ceb4659899cb10d4fc15e81f51264d;hb=f31bc323d5bfc205f94164b203833f35033df3cd;hp=e7018e31c64efdebf050d48d3b41300cb9f00f93;hpb=3c8b7b5089ae068f3dcdf84d7545562ac33e67be;p=sbcl.git diff --git a/src/code/early-source-location.lisp b/src/code/early-source-location.lisp index e7018e3..57af0a7 100644 --- a/src/code/early-source-location.lisp +++ b/src/code/early-source-location.lisp @@ -23,8 +23,7 @@ (defvar *source-location-thunks* nil) -;; Should get called only in unusual circumstances. Normally handled -;; by a compiler macro. +;; Will be redefined in src/code/source-location.lisp. (defun source-location () nil) @@ -33,11 +32,12 @@ (define-compiler-macro source-location () (when (and (boundp '*source-info*) (symbol-value '*source-info*)) - `(cons ,(make-file-info-namestring - *compile-file-pathname* - (source-info-file-info (symbol-value '*source-info*))) - ,(when (boundp '*current-path*) - (source-path-tlf-number (symbol-value '*current-path*)))))) + (let ((form `(cons ,(make-file-info-namestring + *compile-file-pathname* + (sb!c:get-toplevelish-file-info (symbol-value '*source-info*))) + ,(when (boundp '*current-path*) + (source-path-tlf-number (symbol-value '*current-path*)))))) + form))) ;; If the whole source location tracking machinery has been loaded ;; (detected by the type of SOURCE-LOCATION), execute BODY. Otherwise