CMUCL commit: src (3 files)
Raymond Toy
rtoy at common-lisp.net
Fri Jan 22 14:36:06 CET 2010
Date: Friday, January 22, 2010 @ 08:36:06
Author: rtoy
Path: /project/cmucl/cvsroot/src
Modified: code/debug-info.lisp code/debug.lisp compiler/debug-dump.lisp
Fix handling of debug sources. When trying to read the source form
from the source file, the file is opened using the default external
format. This is not right if the file was compiled using a different
external format, and we try to read it using the default format.
compiler/debug-dump.lisp:
o Set the INFO slot to the external format used to source files.
code/debug-info.lisp:
o Add comment that the INFO slot contains the external format for
:FILES. (It was previously unused.)
code/debug.lisp:
o Open the source file with the same format as used to compile the
file.
--------------------------+
code/debug-info.lisp | 4 +++-
code/debug.lisp | 6 ++++--
compiler/debug-dump.lisp | 5 +++--
3 files changed, 10 insertions(+), 5 deletions(-)
Index: src/code/debug-info.lisp
diff -u src/code/debug-info.lisp:1.28 src/code/debug-info.lisp:1.29
--- src/code/debug-info.lisp:1.28 Thu Jun 11 12:03:57 2009
+++ src/code/debug-info.lisp Fri Jan 22 08:36:06 2010
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
- "$Header: /project/cmucl/cvsroot/src/code/debug-info.lisp,v 1.28 2009-06-11 16:03:57 rtoy Rel $")
+ "$Header: /project/cmucl/cvsroot/src/code/debug-info.lisp,v 1.29 2010-01-22 13:36:06 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
@@ -468,6 +468,8 @@
;; If from :LISP, this is the function whose source is form 0.
;; If from :STREAM, this is whatever was the :SOURCE-INFO argument to
;; COMPILE-FROM-STREAM.
+ ;; If from :FILE, this is the external format used to read from the
+ ;; file while compiling
(info nil))
Index: src/code/debug.lisp
diff -u src/code/debug.lisp:1.67 src/code/debug.lisp:1.68
--- src/code/debug.lisp:1.67 Tue Sep 15 11:47:10 2009
+++ src/code/debug.lisp Fri Jan 22 08:36:06 2010
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
- "$Header: /project/cmucl/cvsroot/src/code/debug.lisp,v 1.67 2009-09-15 15:47:10 rtoy Rel $")
+ "$Header: /project/cmucl/cvsroot/src/code/debug.lisp,v 1.68 2010-01-22 13:36:06 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
@@ -1479,7 +1479,9 @@
(pathname name)))
(setq *cached-readtable* nil)
(when *cached-source-stream* (close *cached-source-stream*))
- (setq *cached-source-stream* (open name :if-does-not-exist nil))
+ (setq *cached-source-stream*
+ (open name :if-does-not-exist nil
+ :external-format (or (c::debug-source-info d-source) :default)))
(unless *cached-source-stream*
(error "Source file no longer exists:~% ~A." (namestring name)))
(format t "~%; File: ~A~%" (namestring name)))
Index: src/compiler/debug-dump.lisp
diff -u src/compiler/debug-dump.lisp:1.47 src/compiler/debug-dump.lisp:1.48
--- src/compiler/debug-dump.lisp:1.47 Tue Apr 6 16:44:01 2004
+++ src/compiler/debug-dump.lisp Fri Jan 22 08:36:06 2010
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
- "$Header: /project/cmucl/cvsroot/src/compiler/debug-dump.lisp,v 1.47 2004-04-06 20:44:01 rtoy Rel $")
+ "$Header: /project/cmucl/cvsroot/src/compiler/debug-dump.lisp,v 1.48 2010-01-22 13:36:06 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
@@ -310,7 +310,8 @@
:start-positions
(unless (eq *byte-compile* 't)
(coerce-to-smallest-eltype
- (file-info-positions x)))))
+ (file-info-positions x)))
+ :info (source-info-external-format info)))
(name (file-info-name x)))
(etypecase name
((member :stream :lisp)
More information about the cmucl-commit
mailing list