0.pre7.94:
authorWilliam Harold Newman <william.newman@airmail.net>
Fri, 21 Dec 2001 14:09:59 +0000 (14:09 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Fri, 21 Dec 2001 14:09:59 +0000 (14:09 +0000)
more tweaking/tidying motivated by my feasibility study of
making debug names be stored in a single place...
...rewrote DEBUG-INFO-FOR-COMPONENT to make it clear
that it's working with LAMBDAs, not functions
...removed now-redundant GET-DEBUG-INFO-FUN-MAP in
favor of SB!C::COMPILED-DEBUG-INFO-FUN-MAP

src/code/debug-int.lisp
src/compiler/debug-dump.lisp
src/compiler/target-disassem.lisp
version.lisp-expr

index 7d2ba9e..071a476 100644 (file)
 \f
 ;;;; frame utilities
 
-;;; This returns a COMPILED-DEBUG-FUN for code and pc. We fetch the
+;;; This returns a COMPILED-DEBUG-FUN for COMPONENT and PC. We fetch the
 ;;; SB!C::DEBUG-INFO and run down its FUN-MAP to get a
-;;; SB!C::COMPILED-DEBUG-FUN from the pc. The result only needs to
-;;; reference the component, for function constants, and the
+;;; SB!C::COMPILED-DEBUG-FUN from the PC. The result only needs to
+;;; reference the COMPONENT, for function constants, and the
 ;;; SB!C::COMPILED-DEBUG-FUN.
 (defun debug-fun-from-pc (component pc)
   (let ((info (%code-debug-info component)))
      ((eq info :bogus-lra)
       (make-bogus-debug-fun "function end breakpoint"))
      (t
-      (let* ((fun-map (get-debug-info-fun-map info))
+      (let* ((fun-map (sb!c::compiled-debug-info-fun-map info))
             (len (length fun-map)))
        (declare (type simple-vector fun-map))
        (if (= len 1)
                     (and (sb!c::compiled-debug-fun-p x)
                          (eq (sb!c::compiled-debug-fun-name x) name)
                          (eq (sb!c::compiled-debug-fun-kind x) nil)))
-                  (get-debug-info-fun-map
+                  (sb!c::compiled-debug-info-fun-map
                    (%code-debug-info component)))))
        (if res
            (make-compiled-debug-fun res component)
                                                         save-sc-offset)
                                buffer)))))))
 \f
-;;;; unpacking minimal debug functions
-
-;;; Return a FUN-MAP for a given COMPILED-DEBUG-INFO object.
-(defun get-debug-info-fun-map (info)
-  (declare (type sb!c::compiled-debug-info info))
-  (let ((map (sb!c::compiled-debug-info-fun-map info)))
-    ;; The old CMU CL had various hairy possibilities here, but in
-    ;; SBCL we only use this one, right? 
-    (aver (simple-vector-p map))
-    ;; So it's easy..
-    map))
-\f
 ;;;; CODE-LOCATIONs
 
 ;;; If we're sure of whether code-location is known, return T or NIL.
index b12a743..fdfdd67 100644 (file)
 ;;; called after assembly so that source map information is available.
 (defun debug-info-for-component (component)
   (declare (type component component))
-  (collect ((dfuns))
-    (let ((var-locs (make-hash-table :test 'eq))
-         (*byte-buffer* (make-array 10
-                                    :element-type '(unsigned-byte 8)
-                                    :fill-pointer 0
-                                    :adjustable t)))
-      (dolist (fun (component-lambdas component))
-       (clrhash var-locs)
-       (dfuns (cons (label-position (block-label (lambda-block fun)))
-                    (compute-1-debug-fun fun var-locs))))
-      (let* ((sorted (sort (dfuns) #'< :key #'car))
-            (fun-map (compute-debug-fun-map sorted)))
-       (make-compiled-debug-info :name (component-name component)
-                                 :fun-map fun-map)))))
+  (let ((dfuns nil)
+       (var-locs (make-hash-table :test 'eq))
+       (*byte-buffer* (make-array 10
+                                  :element-type '(unsigned-byte 8)
+                                  :fill-pointer 0
+                                  :adjustable t)))
+    (dolist (lambda (component-lambdas component))
+      (clrhash var-locs)
+      (push (cons (label-position (block-label (lambda-block lambda)))
+                 (compute-1-debug-fun lambda var-locs))
+           dfuns))
+    (let* ((sorted (sort dfuns #'< :key #'car))
+          (fun-map (compute-debug-fun-map sorted)))
+      (make-compiled-debug-info :name (component-name component)
+                               :fun-map fun-map))))
 \f
 ;;; Write BITS out to BYTE-BUFFER in backend byte order. The length of
 ;;; BITS must be evenly divisible by eight.
index 600442e..0b81dd9 100644 (file)
       (values nil nil)
       (values (get-source-form loc context cache) t)))
 \f
-;;;; stuff to use debugging-info to augment the disassembly
+;;;; stuff to use debugging info to augment the disassembly
 
 (defun code-fun-map (code)
   (declare (type sb!kernel:code-component code))
-  (sb!di::get-debug-info-fun-map (sb!kernel:%code-debug-info code)))
+  (sb!c::compiled-debug-info-fun-map (sb!kernel:%code-debug-info code)))
 
 (defstruct (location-group (:copier nil))
   (locations #() :type (vector (or list fixnum))))
                        (when first-block-seen-p
                          (setf nil-block-seen-p t))))
                 (setf last-debug-fun
-                      (sb!di::make-compiled-debug-fun fmap-entry code))
-                )))))
+                      (sb!di::make-compiled-debug-fun fmap-entry code)))))))
        (let ((max-offset (code-inst-area-length code)))
          (when (and first-block-seen-p last-debug-fun)
            (add-seg last-offset
index 9eee371..6b51bf2 100644 (file)
@@ -18,4 +18,4 @@
 ;;; for internal versions, especially for internal versions off the
 ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.pre7.93"
+"0.pre7.94"