Changeset 8545


Ignore:
Timestamp:
Feb 21, 2008, 3:23:51 PM (12 years ago)
Author:
mb
Message:

dropped *compiler-record-source* (use *save-source-locations* since
that's what we really mean).

Location:
branches/mb-coverage-merge
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/mb-coverage-merge/compiler/X86/x862.lisp

    r8521 r8545  
    592592                       (when (or (afunc-lfun-info afunc)
    593593                                 lambda-form
    594                                  (and *compiler-record-source* *definition-source-note*)
    595594                                 *x862-recorded-symbols*
    596                                  (and *compiler-record-source*
     595                                 (and *fasl-save-source-locations*
    597596                                      *x862-emitted-source-notes*
    598597                                      *definition-source-note*))
     
    611610                                      (when lambda-form
    612611                                        (list 'function-debugging-info lambda-form))
    613                                       (when (and *compiler-record-source* *definition-source-note*)
    614                                         (list 'function-source-note 
    615                                               (source-note-for-%lfun-info *definition-source-note* :form nil :subform-notes nil)))
    616612                                      (when *x862-recorded-symbols*
    617613                                        (list 'function-symbol-map (x862-digest-symbols)))
    618                                       (when (and *compiler-record-source*
    619                                                  *x862-emitted-source-notes*
     614                                      (when (and *x862-emitted-source-notes*
    620615                                                 *definition-source-note*)
    621616                                        (list 'pc-source-map
     
    686681
    687682(defun x862-generate-pc-source-map (definition-source-note emitted-source-notes)
    688   (when *compiler-record-source*
     683  (when *fasl-save-source-locations*
    689684    (let ((def-start (source-note-start-pos definition-source-note))
    690685          (vec (make-array (length emitted-source-notes))))
  • branches/mb-coverage-merge/compiler/nx0.lisp

    r8521 r8545  
    12611261                      (%ilogand $vrefmask
    12621262                                (%i+ (%i- boundtocount 1) varcount)))))))))
    1263 
    1264 (defvar *compiler-record-source* t
    1265   "When T we record source location for compiled forms.")
    12661263
    12671264(defvar *nx1-source-note-map* nil
     
    16311628
    16321629(defun record-source-location-on-stream-p (stream)
    1633   (and *compiler-record-source*
     1630  (and *fasl-save-source-locations*
    16341631       *fcomp-stream*
    16351632       (eq *fcomp-stream* stream)))
     
    16611658(defun nx1-source-note (nx1-code)
    16621659  "Return the source-note for the form which generated NX1-CODE."
    1663   (and *compiler-record-source*
     1660  (and *fasl-save-source-locations*
    16641661       *nx1-source-note-map*
    16651662       (gethash nx1-code *nx1-source-note-map*)))
    16661663
    16671664(defun form-source-note (source-form)
    1668   (and *compiler-record-source*
     1665  (and *fasl-save-source-locations*
    16691666       *form-source-note-map*
    16701667       (gethash source-form *form-source-note-map*)))
     
    17291726                     (nx1-symbol form env)
    17301727                     (nx1-immediate (nx-unquote constant-value)))))))
    1731     (if *compiler-record-source*
     1728    (if *fasl-save-source-locations*
    17321729        (destructuring-bind (nx1-form . values)
    17331730            (multiple-value-list (main))
     
    21402137
    21412138(defun record-form-to-nx1-transformation (form nx1)
    2142   (when (and *compiler-record-source* (form-source-note form))
     2139  (when (and *fasl-save-source-locations* (form-source-note form))
    21432140    (setf (gethash nx1 *nx1-source-note-map*) (form-source-note form))))
    21442141
    21452142(defun record-nx1-source-equivalent (original new)
    2146   (when (and *compiler-record-source*
     2143  (when (and *fasl-save-source-locations*
    21472144             (nx1-source-note original)
    21482145             (not (nx1-source-note new)))
     
    21512148
    21522149(defun record-form-source-equivalent (original new)
    2153   (when (and *compiler-record-source*
     2150  (when (and *fasl-save-source-locations*
    21542151             (form-source-note original)
    21552152             (not (form-source-note new)))
  • branches/mb-coverage-merge/level-1/l1-reader.lisp

    r8521 r8545  
    24072407              (or dot-ok
    24082408                  (signal-reader-error stream "Dot context error in ~s." (%string-from-token tb)))
    2409               (signal-reader-error stream "Illegal symbol syntax in ~s. (%string-from-token tb)"))
     2409              (signal-reader-error stream "Illegal symbol syntax in ~s." (%string-from-token tb)))
    24102410            ;; Something other than a buffer full of dots.  Thank god.
    24112411            (let* ((num (if (null escapes)
     
    30163016          (when text
    30173017            (let ((source (source-note-source note)))
    3018               (%fast-compact
    3019                (etypecase source
    3020                  (string source)
    3021                  (source-note (source-note-source source))
    3022                  (code-note (code-note-source source))))))
     3018              (list :%text
     3019                    (%fast-compact
     3020                     (etypecase source
     3021                       (string source)
     3022                       (source-note (source-note-source source))
     3023                       (code-note (code-note-source source)))))))
    30233024          (when form  (list :form (source-note-form  note)))
    30243025          (when subform-notes (list :subform-notes (source-note-subform-notes note)))
     
    30303031                       :start-pos (getf note-plist :start)
    30313032                       :end-pos (getf note-plist :end)
    3032                        :text (%fast-uncompact (getf note-plist :%text))
     3033                       :source (%fast-uncompact (getf note-plist :%text))
    30333034                       )))
    30343035
     
    31033104             (setf (source-note-source source-note) text)))
    31043105         (values form source-note))))
    3105     (t (let* ((start (file-position stream))
    3106               (form (read-internal stream nil eofval nil)))
    3107          (values form (and (neq form eofval)
    3108                            (%make-source-note :form form
    3109                                               :file-name file-name
    3110                                               :start-pos (+ (or start-offset 0) start)
    3111                                               :end-pos (+ (or start-offset 0) (file-position stream)))))))))
     3106    ((eql t)
     3107     (let* ((start (file-position stream))
     3108            (form (read-internal stream nil eofval nil)))
     3109       (values form (and (neq form eofval)
     3110                         (%make-source-note :form form
     3111                                            :file-name file-name
     3112                                            :start-pos (+ (or start-offset 0) start)
     3113                                            :end-pos (+ (or start-offset 0) (file-position stream)))))))))
    31123114
    31133115(defun make-source-note (&key form stream start-pos end-pos subform-notes)
  • branches/mb-coverage-merge/lib/nfcomp.lisp

    r8521 r8545  
    116116                     *.fasl-pathname*)
    117117                   pathname))
    118 (defvar *fasl-save-source-locations*)
     118(defvar *fasl-save-source-locations* nil
     119  "This controls whether we save source inforamiotn when
     120  compiling. This variable should not be set directly, see
     121  *save-source-locations*.")
    119122
    120123(defun compile-file (src &key output-file
     
    415418           (*fcomp-toplevel-forms* '())
    416419           (*loading-file-source-file* (namestring orig-file)) ; why orig-file???
    417            (*fcomp-source-note-map* (and (or *record-pc-mapping* *compile-code-coverage*)
     420           (*fcomp-source-note-map* (and (or *save-source-locations* *record-pc-mapping* *compile-code-coverage*)
    418421                                         (make-hash-table)))
    419422           (*fcomp-covered-functions* nil)
     
    452455                                           :file-name (or *compile-file-original-truename* *loading-file-source-file*)
    453456                                           :start-offset (or *compile-file-original-buffer-offset* 0)
    454                                            :map (or *fcomp-source-note-map*
    455                                                     (and *fasl-save-source-locations* t)))))))
     457                                           :map (or *fcomp-source-note-map* (and *fasl-save-source-locations* t)))))))
    456458            (when (eq eofval form) (return))
    457459            (fcomp-form form env processing-mode source-note)
     
    858860                          ,@forms)))))
    859861      (dolist (form forms)
    860         (record-form-source-equivalent lambda forms))
     862        (record-form-source-equivalent lambda form))
    861863      (setq *fcomp-toplevel-forms* '())
    862864      ;(format t "~& Random toplevel form: ~s" lambda)
     
    864866                     $fasl-lfuncall
    865867                     env
    866                      (fcomp-named-function lambda nil env))
     868                     (fcomp-named-function lambda nil env nil))
    867869        (compiler-function-overflow ()
    868870          (if (null (cdr forms))
Note: See TracChangeset for help on using the changeset viewer.