- (push info (core-object-debug-info object))
- (setf (%code-debug-info code-obj) info))
-
- (setf (code-header-ref code-obj sb!vm:code-trace-table-offset-slot) length)
- (copy-to-system-area trace-table
- (* sb!vm:vector-data-offset sb!vm:word-bits)
- fill-ptr
- 0
- trace-table-bits)
-
- (do ((index sb!vm:code-constants-offset (1+ index)))
- ((>= index (length constants)))
- (let ((const (aref constants index)))
- (etypecase const
- (null)
- (constant
- (setf (code-header-ref code-obj index)
- (constant-value const)))
- (list
- (ecase (car const)
- (:entry
- (reference-core-function code-obj index
- (cdr const) object))
- (:fdefinition
- (setf (code-header-ref code-obj index)
- (fdefinition-object (cdr const) t))))))))))
- (values))
-
-;;; FIXME: byte compiler to go away completely
-#|
-(defun make-core-byte-component (segment length constants xeps object)
- (declare (type sb!assem:segment segment)
- (type index length)
- (type vector constants)
- (type list xeps)
- (type core-object object))
- (without-gcing
- (let* ((num-constants (length constants))
- ;; KLUDGE: On the X86, using ALLOCATE-CODE-OBJECT is
- ;; supposed to make the result non-relocatable, which is
- ;; probably not what we want. Could this be made into
- ;; ALLOCATE-DYNAMIC-CODE-OBJECT? Is there some other fix?
- ;; Am I just confused? -- WHN 19990916
- (code-obj (%primitive allocate-code-object
- (the index (1+ num-constants))
- length))
- (fill-ptr (code-instructions code-obj)))
- (declare (type index length)
- (type system-area-pointer fill-ptr))
- (sb!assem:on-segment-contents-vectorly
- segment
- (lambda (v)
- (declare (type (simple-array sb!assem:assembly-unit 1) v))
- (copy-byte-vector-to-system-area v fill-ptr)
- (setf fill-ptr (sap+ fill-ptr (length v)))))