;;;; files for more information.
(in-package "SB!C")
-
-(file-comment
- "$Header$")
\f
-(defvar *do-assembly* nil
- #!+sb-doc "If non-NIL, emit assembly code. If NIL, emit VOP templates.")
-
-(defvar *lap-output-file* nil
- #!+sb-doc "the FASL file currently being output to")
+;;; If non-NIL, emit assembly code. If NIL, emit VOP templates.
+(defvar *do-assembly* nil)
-(defvar *entry-points* nil
- #!+sb-doc "a list of (name . label) for every entry point")
+;;; a list of (NAME . LABEL) for every entry point
+(defvar *entry-points* nil)
-(defvar *assembly-optimize* t
- #!+sb-doc
- "Set this to NIL to inhibit assembly-level optimization. For compiler
- debugging, rather than policy control.")
+;;; Set this to NIL to inhibit assembly-level optimization. (For
+;;; compiler debugging, rather than policy control.)
+(defvar *assembly-optimize* t)
-;;; Note: You might think from the name that this would act like COMPILE-FILE,
-;;; but in fact it's arguably more like LOAD, even down to the return
-;;; convention. It LOADs a file, then writes out any assembly code created
-;;; by the process.
+;;; Note: You might think from the name that this would act like
+;;; COMPILE-FILE, but in fact it's arguably more like LOAD, even down
+;;; to the return convention. It LOADs a file, then writes out any
+;;; assembly code created by the process.
(defun assemble-file (name
&key
(output-file (make-pathname :defaults name
;; FIXME: Consider nuking the filename defaulting logic here.
(let* ((*do-assembly* t)
(name (pathname name))
- (*lap-output-file* (open-fasl-file (pathname output-file) name))
+ ;; the fasl file currently being output to
+ (lap-fasl-output (open-fasl-output (pathname output-file) name))
(*entry-points* nil)
(won nil)
(*code-segment* nil)
(let ((*features* (cons :sb-assembling *features*)))
(init-assembler)
(load (merge-pathnames name (make-pathname :type "lisp")))
- (fasl-dump-cold-load-form `(in-package ,(package-name *package*))
- *lap-output-file*)
+ (fasl-dump-cold-load-form `(in-package ,(package-name
+ (sane-package)))
+ lap-fasl-output)
(sb!assem:append-segment *code-segment* *elsewhere*)
(setf *elsewhere* nil)
(let ((length (sb!assem:finalize-segment *code-segment*)))
length
*fixups*
*entry-points*
- *lap-output-file*))
+ lap-fasl-output))
(setq won t))
- (close-fasl-file *lap-output-file* (not won)))
+ (close-fasl-output lap-fasl-output (not won)))
won))
-(defstruct reg-spec
+(defstruct (reg-spec (:copier nil))
(kind :temp :type (member :arg :temp :res))
(name nil :type symbol)
(temp nil :type symbol)