X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fearly-source-location.lisp;h=bb2fcdab455e59341d70a8c94d8f944bff4740d6;hb=a160917364f85b38dc0826a5e3dcef87e3c4c62c;hp=022af85a17f697736f539c72f7cad3a618cdb39a;hpb=31f072311935e32751508ecf824905c6b58a1d95;p=sbcl.git diff --git a/src/code/early-source-location.lisp b/src/code/early-source-location.lisp index 022af85..bb2fcda 100644 --- a/src/code/early-source-location.lisp +++ b/src/code/early-source-location.lisp @@ -12,10 +12,18 @@ (in-package "SB!C") +;;; Used as the CDR of the code coverage instrumentation records +;;; (instead of NIL) to ensure that any well-behaving user code will +;;; not have constants EQUAL to that record. This avoids problems with +;;; the records getting coalesced with non-record conses, which then +;;; get mutated when the instrumentation runs. Note that it's +;;; important for multiple records for the same location to be +;;; coalesced. -- JES, 2008-01-02 +(defconstant +code-coverage-unmarked+ '%code-coverage-unmarked%) + (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) @@ -26,7 +34,7 @@ (symbol-value '*source-info*)) `(cons ,(make-file-info-namestring *compile-file-pathname* - (source-info-file-info (symbol-value '*source-info*))) + (sb!c:get-toplevelish-file-info (symbol-value '*source-info*))) ,(when (boundp '*current-path*) (source-path-tlf-number (symbol-value '*current-path*))))))