gencgc: More precise conservatism for pointers to boxed pages.
[sbcl.git] / src / compiler / fixup.lisp
index 6fd06ca..2e98849 100644 (file)
@@ -14,8 +14,8 @@
 
 ;;; a fixup of some kind
 (defstruct (fixup
-           (:constructor make-fixup (name flavor &optional offset))
-           (:copier nil))
+            (:constructor make-fixup (name flavor &optional offset))
+            (:copier nil))
   ;; the name and flavor of the fixup. The assembler makes no
   ;; assumptions about the contents of these fields; their semantics
   ;; are imposed by the dumper.
   ;; from the beginning of the current code block.
   offset)
 
-;;; KLUDGE: Despite its name, this is not a list of FIXUP objects, but rather a
-;;; list of `(,KIND ,FIXUP ,POSN). Perhaps this non-mnemonicity could be
-;;; reduced by naming what's currently a FIXUP structure a FIXUP-REQUEST, and
-;;; then renaming *FIXUPS* to *NOTED-FIXUPS*.-- WHN 19990905
-(defvar *fixups*)
+(defstruct (fixup-note
+             (:constructor make-fixup-note (kind fixup position))
+             (:copier nil))
+  kind
+  fixup
+  position)
+
+(defvar *fixup-notes*)
 
 ;;; Setting this variable lets you see what's going on as items are
 ;;; being pushed onto *FIXUPS*.
 ;;; they find themselves trying to deal with a fixup.
 (defun note-fixup (segment kind fixup)
   (sb!assem:emit-back-patch segment
-                           0
-                           (lambda (segment posn)
-                             (declare (ignore segment))
-                             ;; Why use EMIT-BACK-PATCH to cause this PUSH to
-                             ;; be done later, instead of just doing it now?
-                             ;; I'm not sure. Perhaps there's some concern
-                             ;; that POSN isn't known accurately now? Perhaps
-                             ;; there's a desire for all fixing up to go
-                             ;; through EMIT-BACK-PATCH whether it needs to or
-                             ;; not? -- WHN 19990905
-                             (push (list kind fixup posn) *fixups*)))
+                            0
+                            (lambda (segment posn)
+                              (declare (ignore segment))
+                              ;; Why use EMIT-BACK-PATCH to cause this PUSH to
+                              ;; be done later, instead of just doing it now?
+                              ;; I'm not sure. Perhaps there's some concern
+                              ;; that POSN isn't known accurately now? Perhaps
+                              ;; there's a desire for all fixing up to go
+                              ;; through EMIT-BACK-PATCH whether it needs to or
+                              ;; not? -- WHN 19990905
+                              #!+sb-show
+                              (when *show-fixups-being-pushed-p*
+                                (/show "PUSHING FIXUP" kind fixup posn))
+                              (push (make-fixup-note kind fixup posn) *fixup-notes*)))
   (values))