From f507f3a114145ef30b166db7a18a5cca4d78f80c Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Thu, 14 Apr 2005 21:12:01 +0000 Subject: [PATCH] 0.8.21.40 Add TRACE-FILE to the allowed options in build-order.lisp-expr. This causes a foo.trace file to be emitted containing grungey VOP/template/assembly/etc information which may help when debugging a backend --- src/cold/compile-cold-sbcl.lisp | 1 + src/cold/shared.lisp | 17 ++++++++++++++--- version.lisp-expr | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/cold/compile-cold-sbcl.lisp b/src/cold/compile-cold-sbcl.lisp index 62e886b..465236d 100644 --- a/src/cold/compile-cold-sbcl.lisp +++ b/src/cold/compile-cold-sbcl.lisp @@ -20,6 +20,7 @@ (do-stems-and-flags (stem flags) (unless (position :not-target flags) (push (target-compile-stem stem + :trace-file (find :trace-file flags) :assem-p (find :assem flags) :ignore-failure-p (find :ignore-failure-p flags)) diff --git a/src/cold/shared.lisp b/src/cold/shared.lisp index c6f9922..9fe9f42 100644 --- a/src/cold/shared.lisp +++ b/src/cold/shared.lisp @@ -130,6 +130,7 @@ (src-prefix "") (src-suffix ".lisp") (compile-file #'compile-file) + trace-file ignore-failure-p) (declare (type function compile-file)) @@ -184,7 +185,7 @@ ;; recognizeably a fasl file), so (when (probe-file tmp-obj) (delete-file tmp-obj)) - + ;; Try to use the compiler to generate a new temporary object file. (flet ((report-recompile-restart (stream) (format stream "Recompile file ~S" src)) @@ -193,7 +194,10 @@ (tagbody retry-compile-file (multiple-value-bind (output-truename warnings-p failure-p) - (funcall compile-file src :output-file tmp-obj) + (if trace-file + (funcall compile-file src :output-file tmp-obj + :trace-file t) + (funcall compile-file src :output-file tmp-obj )) (declare (ignore warnings-p)) (cond ((not output-truename) (error "couldn't compile ~S" src)) @@ -301,6 +305,12 @@ ;; SBCL. ("not target code" -- but still presumably host code, ;; used to support the cross-compilation process) :not-target + ;; meaning: The #'COMPILE-STEM argument :TRACE-FILE should be T. + ;; When the compiler is SBCL's COMPILE-FILE or something like it, + ;; compiling "foo.lisp" will generate "foo.trace" which contains lots + ;; of exciting low-level information about representation selection, + ;; VOPs used by the compiler, and bits of assembly. + :trace-file ;; meaning: This file is to be processed with the SBCL assembler, ;; not COMPILE-FILE. (Note that this doesn't make sense unless ;; :NOT-HOST is also set, since the SBCL assembler doesn't exist @@ -381,12 +391,13 @@ ;;; Run the cross-compiler on a file in the source directory tree to ;;; produce a corresponding file in the target object directory tree. -(defun target-compile-stem (stem &key assem-p ignore-failure-p) +(defun target-compile-stem (stem &key assem-p ignore-failure-p trace-file) (funcall *in-target-compilation-mode-fn* (lambda () (compile-stem stem :obj-prefix *target-obj-prefix* :obj-suffix *target-obj-suffix* + :trace-file trace-file :ignore-failure-p ignore-failure-p :compile-file (if assem-p *target-assemble-file* diff --git a/version.lisp-expr b/version.lisp-expr index d7e19e5..966b235 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.21.39" +"0.8.21.40" -- 1.7.10.4