X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgeneric%2Ftarget-core.lisp;h=da4ac3c335844bc275059dfd0f592e0208f66e7f;hb=416152f084604094445a758ff399871132dff2bd;hp=7cfa60da5a1c62c7f210f51ba991d1f6b1d5dc3d;hpb=d147d512602d761a2dcdfded506dd1a8f9a140dc;p=sbcl.git diff --git a/src/compiler/generic/target-core.lisp b/src/compiler/generic/target-core.lisp index 7cfa60d..da4ac3c 100644 --- a/src/compiler/generic/target-core.lisp +++ b/src/compiler/generic/target-core.lisp @@ -1,5 +1,9 @@ ;;;; target-only code that knows how to load compiled code directly ;;;; into core +;;;; +;;;; FIXME: The filename here is confusing because "core" here means +;;;; "main memory", while elsewhere in the system it connotes a +;;;; ".core" file dumping the contents of main memory. ;;;; This software is part of the SBCL system. See the README file for ;;;; more information. @@ -45,15 +49,16 @@ (trace-table-bits (* trace-table-len tt-bits-per-entry)) (total-length (+ length (ceiling trace-table-bits sb!vm:byte-bits))) (box-num (- (length constants) sb!vm:code-trace-table-offset-slot)) - #!+x86 - (code-obj - ;; FIXME: What is this *ENABLE-DYNAMIC-SPACE-CODE* stuff? - (if (and (boundp sb!impl::*enable-dynamic-space-code*) - sb!impl::*enable-dynamic-space-code*) - (%primitive allocate-dynamic-code-object box-num total-length) - (%primitive allocate-code-object box-num total-length))) - #!-x86 (code-obj + ;; FIXME: In CMU CL the X86 behavior here depended on + ;; *ENABLE-DYNAMIC-SPACE-CODE*, but in SBCL we always use + ;; dynamic space code, so we could make + ;; ALLOCATE-DYNAMIC-CODE-OBJECT more parallel with + ;; ALLOCATE-CODE-OBJECT and remove this confusing + ;; read-macro conditionalization. + #!+x86 + (%primitive allocate-dynamic-code-object box-num total-length) + #!-x86 (%primitive allocate-code-object box-num total-length)) (fill-ptr (code-instructions code-obj))) (declare (type index box-num total-length)) @@ -98,9 +103,11 @@ (cdr const) object)) (:fdefinition (setf (code-header-ref code-obj index) - (sb!impl::fdefinition-object (cdr const) t)))))))))) + (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) @@ -161,4 +168,4 @@ (setf (code-header-ref code-obj code-obj-index) xep)))))))))) (values)) - +|# \ No newline at end of file