Changeset 12300 for trunk/source/level-1


Ignore:
Timestamp:
Jun 25, 2009, 3:34:05 PM (10 years ago)
Author:
gz
Message:

Code coverage support

Location:
trunk/source/level-1
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-aprims.lisp

    r12210 r12300  
    994994         (nth-immediate lfun 1))))
    995995
     996
     997(defun function-entry-code-note (fn)
     998  (let ((bits (lfun-bits (setq fn (require-type fn 'function)))))
     999    (declare (fixnum bits))
     1000    (and (logbitp $lfbits-code-coverage-bit bits)
     1001         (loop for i upfrom 1 as imm = (nth-immediate fn i)
     1002               when (code-note-p imm) do (return imm)))))
    9961003
    9971004
  • trunk/source/level-1/l1-boot-2.lisp

    r12166 r12300  
    306306      (bin-load-provide "EDIT-CALLERS" "edit-callers")
    307307      (bin-load-provide "DESCRIBE" "describe")
     308      (bin-load-provide "COVER" "cover")
    308309      (bin-load-provide "LEAKS" "leaks")
    309310      (bin-load-provide "MCL-COMPAT" "mcl-compat")
  • trunk/source/level-1/l1-reader.lisp

    r12037 r12300  
    30133013(defmethod print-object ((sn source-note) stream)
    30143014  (print-unreadable-object (sn stream :type t :identity nil)
    3015     (let ((*print-length* (min (or *print-length* 3) 3)))
    3016       (format stream "~s:~s-~s ~s" (source-note-filename sn)
    3017               (source-note-start-pos sn) (source-note-end-pos sn)
    3018               (source-note.source sn)))))
     3015    (print-source-note sn stream)))
     3016
     3017(defun print-source-note (sn stream)
     3018  (let* ((file (source-note-filename sn))
     3019         (text (ignore-errors (source-note-text sn))))
     3020    ;; Should fix this when record the name.
     3021    (when (eq (pathname-version file) :newest)
     3022      (setq file (namestring (make-pathname :version nil :defaults file))))
     3023    (when text
     3024      (setq text (string-sans-most-whitespace text 121))
     3025      (when (> (length text) 120)
     3026        (setq text (concatenate 'string (subseq text 0 120) "..."))))
     3027    (format stream "~s:~s-~s ~s" file
     3028            (source-note-start-pos sn) (source-note-end-pos sn)
     3029            text)))
    30193030
    30203031(defun source-note-filename (source)
Note: See TracChangeset for help on using the changeset viewer.