(in-package "SB!C")
\f
-;;;; SC-OFFSETs
-;;;;
-;;;; We represent the place where some value is stored with a SC-OFFSET,
-;;;; which is the SC number and offset encoded as an integer.
-
-(defconstant-eqx sc-offset-scn-byte (byte 5 0) #'equalp)
-(defconstant-eqx sc-offset-offset-byte (byte 22 5) #'equalp)
-(def!type sc-offset () '(unsigned-byte 27))
-
-(defmacro make-sc-offset (scn offset)
- `(dpb ,scn sc-offset-scn-byte
- (dpb ,offset sc-offset-offset-byte 0)))
-
-(defmacro sc-offset-scn (sco) `(ldb sc-offset-scn-byte ,sco))
-(defmacro sc-offset-offset (sco) `(ldb sc-offset-offset-byte ,sco))
-\f
;;;; flags for compiled debug variables
;;; FIXME: old CMU CL representation follows:
;;; Compiled debug variables are in a packed binary representation in the
-;;; DEBUG-FUN-VARIABLES:
+;;; DEBUG-FUN-VARS:
;;; single byte of boolean flags:
;;; uninterned name
;;; packaged name
;;; ...package name bytes...]
;;; [If has ID, ID as var-length integer]
;;; SC-Offset of primary location (as var-length integer)
-;;; [If has save SC, SC-Offset of save location (as var-length integer)]
+;;; [If has save SC, SC-OFFSET of save location (as var-length integer)]
;;; FIXME: The first two are no longer used in SBCL.
;;;(defconstant compiled-debug-var-uninterned #b00000001)
;;;(defconstant compiled-debug-var-packaged #b00000010)
-(defconstant compiled-debug-var-environment-live #b00000100)
-(defconstant compiled-debug-var-save-loc-p #b00001000)
-(defconstant compiled-debug-var-id-p #b00010000)
-(defconstant compiled-debug-var-minimal-p #b00100000)
-(defconstant compiled-debug-var-deleted-p #b01000000)
+(def!constant compiled-debug-var-environment-live #b00000100)
+(def!constant compiled-debug-var-save-loc-p #b00001000)
+(def!constant compiled-debug-var-id-p #b00010000)
+(def!constant compiled-debug-var-minimal-p #b00100000)
+(def!constant compiled-debug-var-deleted-p #b01000000)
\f
;;;; compiled debug blocks
;;;;
;;;; tuples...
(defconstant-eqx compiled-debug-block-nsucc-byte (byte 2 0) #'equalp)
-(defconstant compiled-debug-block-elsewhere-p #b00000100)
+(def!constant compiled-debug-block-elsewhere-p #b00000100)
(defconstant-eqx compiled-code-location-kind-byte (byte 3 0) #'equalp)
(defparameter *compiled-code-location-kinds*
;; CMU CL, there are two distinct -- but coupled -- mechanisms to
;; finding the name of a function. The slot here is one mechanism
;; (used in CMU CL to look up names in the debugger, e.g. in
- ;; BACKTRACE). The other mechanism is the the NAME slot in function
+ ;; BACKTRACE). The other mechanism is the NAME slot in function
;; primitive objects (used in CMU CL to look up names elsewhere,
;; e.g. in CL:FUNCTION-LAMBDA-EXPRESSION and in CL:DESCRIBE).
;;
;; * the variable ID, when it has one
;; * SC-offset of primary location, if it has one
;; * SC-offset of save location, if it has one
- (variables nil :type (or simple-vector null))
+ (vars nil :type (or simple-vector null))
;; a vector of the packed binary representation of the
;; COMPILED-DEBUG-BLOCKs in this function, in the order that the
;; blocks were emitted. The first block is the start of the
;; The function returns using the fixed-values convention, but
;; in order to save space, we elected not to store a vector.
(returns :fixed :type (or (simple-array * (*)) (member :standard :fixed)))
- ;; SC-Offsets describing where the return PC and return FP are kept.
+ ;; SC-OFFSETs describing where the return PC and return FP are kept.
(return-pc (missing-arg) :type sc-offset)
(old-fp (missing-arg) :type sc-offset)
- ;; SC-Offset for the number stack FP in this function, or NIL if no
+ ;; SC-OFFSET for the number stack FP in this function, or NIL if no
;; NFP allocated.
(nfp nil :type (or sc-offset null))
;; The earliest PC in this function at which the environment is properly
;;; to at least know which function is an XEP for the real function
;;; (which would be useful info anyway).
\f
-;;;; debug source
+;;;; DEBUG SOURCE
+;;; There is one per compiled file and one per function compiled at
+;;; toplevel or loaded from source.
(def!struct (debug-source #-sb-xc-host (:pure t))
;; This slot indicates where the definition came from:
;; :FILE - from a file (i.e. COMPILE-FILE)
;; :DEBUG-SOURCE-FORM is :LISP.
(start-positions nil :type (or (simple-array * (*)) null))
;; If from :LISP, this is the function whose source is form 0.
- (info nil))
+ (function nil)
+ ;; Additional information from (WITH-COMPILATION-UNIT (:SOURCE-PLIST ...))
+ (plist *source-plist*))
\f
;;;; DEBUG-INFO structures
(def!struct debug-info
;; Some string describing something about the code in this component.
- (name (missing-arg) :type simple-string)
+ (name (missing-arg) :type t)
;; A list of DEBUG-SOURCE structures describing where the code for this
;; component came from, in the order that they were read.
;;
;; *** NOTE: the offset of this slot is wired into the fasl dumper
;; *** so that it can backpatch the source info when compilation
;; *** is complete.
- (source nil :type list))
+ (source nil))
(def!struct (compiled-debug-info
(:include debug-info)