0.pre7.74:
[sbcl.git] / src / code / debug-int.lisp
index 7b49208..5e7a1fc 100644 (file)
                     (invalid-value-debug-var condition)
                     (invalid-value-frame condition)))))
 
-(define-condition ambiguous-variable-name (debug-condition)
-  ((name :reader ambiguous-variable-name-name :initarg :name)
-   (frame :reader ambiguous-variable-name-frame :initarg :frame))
+(define-condition ambiguous-var-name (debug-condition)
+  ((name :reader ambiguous-var-name-name :initarg :name)
+   (frame :reader ambiguous-var-name-frame :initarg :frame))
   (:report (lambda (condition stream)
             (format stream "~&~S names more than one valid variable in ~S."
-                    (ambiguous-variable-name-name condition)
-                    (ambiguous-variable-name-frame condition)))))
+                    (ambiguous-var-name-name condition)
+                    (ambiguous-var-name-frame condition)))))
 \f
 ;;;; errors and DEBUG-SIGNAL
 
 (defstruct (debug-var (:constructor nil)
                      (:copier nil))
   ;; the name of the variable
-  (symbol (required-argument) :type symbol)
+  (symbol (missing-arg) :type symbol)
   ;; a unique integer identification relative to other variables with the same
   ;; symbol
   (id 0 :type index)
     (if (functionp object)
        (or (fun-code-header object)
            :undefined-function)
-       (let ((lowtag (get-lowtag object)))
+       (let ((lowtag (lowtag-of object)))
          (if (= lowtag sb!vm:other-pointer-lowtag)
-             (let ((type (get-type object)))
-               (cond ((= type sb!vm:code-header-widetag)
+             (let ((widetag (widetag-of object)))
+               (cond ((= widetag sb!vm:code-header-widetag)
                       object)
-                     ((= type sb!vm:return-pc-header-widetag)
+                     ((= widetag sb!vm:return-pc-header-widetag)
                       (lra-code-header object))
                      (t
                       nil))))))))
 ;;; Return a DEBUG-FUN that represents debug information for FUN.
 (defun fun-debug-fun (fun)
   (declare (type function fun))
-  (ecase (get-type fun)
+  (ecase (widetag-of fun)
     (#.sb!vm:closure-header-widetag
      (fun-debug-fun (%closure-fun fun)))
     (#.sb!vm:funcallable-instance-header-widetag
           (debug-signal 'no-debug-blocks
                         :debug-fun debug-fun)))))
 
-;;; This returns a SIMPLE-VECTOR of DEBUG-BLOCKs or NIL. NIL indicates
-;;; there was no basic block information.
+;;; Return a SIMPLE-VECTOR of DEBUG-BLOCKs or NIL. NIL indicates there
+;;; was no basic block information.
 (defun parse-debug-blocks (debug-fun)
   (etypecase debug-fun
     (compiled-debug-fun
 ;;; this to determine if the value stored is the actual value or an
 ;;; indirection cell.
 (defun indirect-value-cell-p (x)
-  (and (= (get-lowtag x) sb!vm:other-pointer-lowtag)
-       (= (get-type x) sb!vm:value-cell-header-widetag)))
+  (and (= (lowtag-of x) sb!vm:other-pointer-lowtag)
+       (= (widetag-of x) sb!vm:value-cell-header-widetag)))
 
 ;;; Return three values reflecting the validity of DEBUG-VAR's value
 ;;; at BASIC-CODE-LOCATION:
 ;;; The returned function takes the frame to get values from as its
 ;;; argument, and it returns the values of FORM. The returned function
 ;;; can signal the following conditions: INVALID-VALUE,
-;;; AMBIGUOUS-VARIABLE-NAME, and FRAME-FUN-MISMATCH.
+;;; AMBIGUOUS-VAR-NAME, and FRAME-FUN-MISMATCH.
 (defun preprocess-for-eval (form loc)
   (declare (type code-location loc))
   (let ((n-frame (gensym))
            (:valid
             (specs `(,name (debug-var-value ',var ,n-frame))))
            (:unknown
-            (specs `(,name (debug-signal 'invalid-value :debug-var ',var
+            (specs `(,name (debug-signal 'invalid-value
+                                         :debug-var ',var
                                          :frame ,n-frame))))
            (:ambiguous
-            (specs `(,name (debug-signal 'ambiguous-variable-name :name ',name
+            (specs `(,name (debug-signal 'ambiguous-var-name
+                                         :name ',name
                                          :frame ,n-frame)))))))
       (let ((res (coerce `(lambda (,n-frame)
                            (declare (ignorable ,n-frame))
     (do ((frame frame (frame-down frame)))
        ((not frame) nil)
       (when (and (compiled-frame-p frame)
-                (eq lra
-                    (get-context-value frame lra-save-offset lra-sc-offset)))
+                 (#-x86 eq #+x86 sap=
+                 lra
+                 (get-context-value frame lra-save-offset lra-sc-offset)))
        (return t)))))
 \f
 ;;;; ACTIVATE-BREAKPOINT