-
-;;; 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)))))
-
- (setf (code-header-ref code-obj sb!vm:code-trace-table-offset-slot)
- nil)
- (dolist (noise xeps)
- (let ((xep (cdr noise)))
- (setf (byte-function-component xep) code-obj)
- (initialize-byte-compiled-function xep)
- (note-function (lambda-info (car noise)) xep object)))
-
- (dotimes (index num-constants)
- (let ((const (aref constants index))
- (code-obj-index (+ index sb!vm:code-constants-offset)))
- (etypecase const
- (null)
- (constant
- (setf (code-header-ref code-obj code-obj-index)
- (constant-value const)))
- (list
- (ecase (car const)
- (:entry
- (reference-core-function code-obj code-obj-index (cdr const)
- object))
- (:fdefinition
- (setf (code-header-ref code-obj code-obj-index)
- (sb!impl::fdefinition-object (cdr const) t)))
- (:type-predicate
- (let ((*unparse-function-type-simplify* t))
- (setf (code-header-ref code-obj code-obj-index)
- (load-type-predicate (type-specifier (cdr const))))))
- (:xep
- (let ((xep (cdr (assoc (cdr const) xeps :test #'eq))))
- (aver xep)
- (setf (code-header-ref code-obj code-obj-index) xep))))))))))
-
- (values))
-|#
\ No newline at end of file