X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fsource-location.lisp;h=be1abd233a30d001278c63dcce581af4fd9f89ef;hb=18dc0069cd514c976042766ab9a785c970fe1603;hp=0d39ac359e28b51c35dc73778bb31d5a28119f31;hpb=556fa08244211057b003401daf76edf0c8754232;p=sbcl.git diff --git a/src/code/source-location.lisp b/src/code/source-location.lisp index 0d39ac3..be1abd2 100644 --- a/src/code/source-location.lisp +++ b/src/code/source-location.lisp @@ -16,10 +16,11 @@ ;; Namestring of the source file that the definition was compiled from. ;; This is null if the definition was not compiled from a file. (namestring - (when (and (boundp '*source-info*) - *source-info*) - (make-file-info-namestring *compile-file-pathname* - (sb!c:get-toplevelish-file-info *source-info*))) + (or *source-namestring* + (when (and (boundp '*source-info*) + *source-info*) + (make-file-info-namestring *compile-file-pathname* + (sb!c:get-toplevelish-file-info *source-info*)))) :type (or string null)) ;; Toplevel form index (toplevel-form-number @@ -52,19 +53,15 @@ nil)))) #!+sb-source-locations -(define-compiler-macro source-location (&optional name &environment env) +(define-compiler-macro source-location (&environment env) (declare (ignore env)) - #-sb-xc-host - (let ((loc (make-definition-source-location))) - (when (eq 'replace name) - (break "source location ~S" loc)) - loc)) + #-sb-xc-host (make-definition-source-location)) ;; We need a regular definition of SOURCE-LOCATION for calls processed ;; during LOAD on a source file while *EVALUATOR-MODE* is :INTERPRET. #!+sb-source-locations (setf (symbol-function 'source-location) - (lambda (&optional name) (declare (ignore name)) (make-definition-source-location))) + (lambda () (make-definition-source-location))) (/show0 "/Processing source location thunks") #!+sb-source-locations