- (dolist (fixups *load-time-code-fixups*)
- (let ((code-object (first fixups))
- (offset (second fixups))
- (value (third fixups))
- (kind (fourth fixups)))
- (cold-push (cold-cons
- (cold-intern :load-time-code-fixup)
- (cold-cons
- code-object
- (cold-cons
- (number-to-core offset)
- (cold-cons
- (number-to-core value)
- (cold-cons
- (cold-intern kind)
- *nil-descriptor*)))))
- *current-reversed-cold-toplevels*))))
+ (maphash
+ (lambda (code-object-address fixup-offsets)
+ (let ((fixup-vector
+ (allocate-vector-object
+ *dynamic* sb-vm:n-word-bits (length fixup-offsets)
+ sb!vm:simple-array-unsigned-byte-32-widetag)))
+ (do ((index sb!vm:vector-data-offset (1+ index))
+ (fixups fixup-offsets (cdr fixups)))
+ ((null fixups))
+ (write-wordindexed fixup-vector index
+ (make-random-descriptor (car fixups))))
+ ;; KLUDGE: The fixup vector is stored as the first constant,
+ ;; not as a separately-named slot.
+ (write-wordindexed (make-random-descriptor code-object-address)
+ sb!vm:code-constants-offset
+ fixup-vector)))
+ *load-time-code-fixups*))