X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fassembly%2Fassemfile.lisp;h=7de12e5bdc0a391aa6425eab1984f747d3c3aff3;hb=be9eb6c67b5f43a095c3de17bea945c309d662e4;hp=a4e9faf5315383955b792095139a614bc66251cf;hpb=02ce4b1b927f1312c300047bd5a0db6663a1d2c6;p=sbcl.git diff --git a/src/assembly/assemfile.lisp b/src/assembly/assemfile.lisp index a4e9faf..7de12e5 100644 --- a/src/assembly/assemfile.lisp +++ b/src/assembly/assemfile.lisp @@ -12,24 +12,20 @@ (in-package "SB!C") -(defvar *do-assembly* nil - #!+sb-doc "If non-NIL, emit assembly code. If NIL, emit VOP templates.") +;;; If non-NIL, emit assembly code. If NIL, emit VOP templates. +(defvar *do-assembly* nil) -(defvar *lap-output-file* nil - #!+sb-doc "the FASL file currently being output to") +;;; a list of (NAME . LABEL) for every entry point +(defvar *entry-points* nil) -(defvar *entry-points* nil - #!+sb-doc "a list of (name . label) for every entry point") +;;; Set this to NIL to inhibit assembly-level optimization. (For +;;; compiler debugging, rather than policy control.) +(defvar *assembly-optimize* t) -(defvar *assembly-optimize* t - #!+sb-doc - "Set this to NIL to inhibit assembly-level optimization. For compiler - debugging, rather than policy control.") - -;;; 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 @@ -37,7 +33,8 @@ ;; 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) @@ -50,7 +47,7 @@ (load (merge-pathnames name (make-pathname :type "lisp"))) (fasl-dump-cold-load-form `(in-package ,(package-name (sane-package))) - *lap-output-file*) + lap-fasl-output) (sb!assem:append-segment *code-segment* *elsewhere*) (setf *elsewhere* nil) (let ((length (sb!assem:finalize-segment *code-segment*))) @@ -58,12 +55,12 @@ 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)