X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgeneric%2Ftarget-core.lisp;h=da4ac3c335844bc275059dfd0f592e0208f66e7f;hb=416152f084604094445a758ff399871132dff2bd;hp=8e6013904c5d400add75faef13ebf8ad73b19480;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/compiler/generic/target-core.lisp b/src/compiler/generic/target-core.lisp index 8e60139..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. @@ -12,9 +16,6 @@ (in-package "SB!C") -(file-comment - "$Header$") - ;;; Make a function entry, filling in slots from the ENTRY-INFO. (defun make-function-entry (entry code-obj object) (declare (type entry-info entry) (type core-object object)) @@ -48,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)) @@ -101,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) @@ -160,8 +164,8 @@ (load-type-predicate (type-specifier (cdr const)))))) (:xep (let ((xep (cdr (assoc (cdr const) xeps :test #'eq)))) - (assert xep) + (aver xep) (setf (code-header-ref code-obj code-obj-index) xep)))))))))) (values)) - +|# \ No newline at end of file