CMUCL commit: src (3 files)

Raymond Toy rtoy at common-lisp.net
Fri Apr 23 15:23:29 CEST 2010


    Date: Friday, April 23, 2010 @ 09:23:29
  Author: rtoy
    Path: /project/cmucl/cvsroot/src

Modified: code/defstruct.lisp code/macros.lisp compiler/globaldb.lisp

Add source location info for defstructs and deftypes.

code/defstruct.lisp:
o Save source info for defstructs

code/macros.lisp:
o Save source info for deftypes.

compiler/globaldb.lisp:
o Add comments that the info type source-location defvar also includes
  defparameter, defconstant, defstruct, and deftype.


------------------------+
 code/defstruct.lisp    |    4 +++-
 code/macros.lisp       |    3 ++-
 compiler/globaldb.lisp |    8 +++++---
 3 files changed, 10 insertions(+), 5 deletions(-)


Index: src/code/defstruct.lisp
diff -u src/code/defstruct.lisp:1.101 src/code/defstruct.lisp:1.102
--- src/code/defstruct.lisp:1.101	Tue Apr 20 13:57:44 2010
+++ src/code/defstruct.lisp	Fri Apr 23 09:23:29 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/defstruct.lisp,v 1.101 2010-04-20 17:57:44 rtoy Exp $")
+  "$Header: /project/cmucl/cvsroot/src/code/defstruct.lisp,v 1.102 2010-04-23 13:23:29 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -487,6 +487,7 @@
 	     ,@(define-raw-accessors defstruct)
 	     ,@(define-constructors defstruct)
 	     ,@(define-class-methods defstruct)
+	     (lisp::set-defvar-source-location ',name (c::source-location))
 	   ',name))
 	`(progn
 	   (eval-when (compile load eval)
@@ -495,6 +496,7 @@
 	   ,@(define-predicate defstruct)
 	   ,@(define-accessors defstruct)
 	   ,@(define-copier defstruct)
+	   (lisp::set-defvar-source-location ',name (c::source-location))
 	   ',name))))
 	   
 
Index: src/code/macros.lisp
diff -u src/code/macros.lisp:1.117 src/code/macros.lisp:1.118
--- src/code/macros.lisp:1.117	Tue Apr 20 13:57:44 2010
+++ src/code/macros.lisp	Fri Apr 23 09:23:29 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/macros.lisp,v 1.117 2010-04-20 17:57:44 rtoy Exp $")
+  "$Header: /project/cmucl/cvsroot/src/code/macros.lisp,v 1.118 2010-04-23 13:23:29 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -242,6 +242,7 @@
       (when doc
 	(intl::note-translatable intl::*default-domain* doc))
       `(eval-when (:compile-toplevel :load-toplevel :execute)
+	 (set-defvar-source-location ',name (c::source-location))
 	 (%deftype ',name
 		   #'(lambda (,whole)
 		       , at local-decs
Index: src/compiler/globaldb.lisp
diff -u src/compiler/globaldb.lisp:1.56 src/compiler/globaldb.lisp:1.57
--- src/compiler/globaldb.lisp:1.56	Tue Apr 20 13:57:46 2010
+++ src/compiler/globaldb.lisp	Fri Apr 23 09:23:29 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/globaldb.lisp,v 1.56 2010-04-20 17:57:46 rtoy Exp $")
+  "$Header: /project/cmucl/cvsroot/src/compiler/globaldb.lisp,v 1.57 2010-04-23 13:23:29 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1168,8 +1168,10 @@
 (define-info-class random-documentation)
 (define-info-type random-documentation stuff list ())
 
-;;; Used to record the source-location of definitions.
-;;;
+;;; Used to record the source-location of definitions.  Despite the
+;;; type name of "defvar", this holds the location information for
+;;; defvar, defparameter, and defconstant.  It also has the source
+;;; location for defstruct and deftype.
 (define-info-class source-location)
 (define-info-type source-location defvar (or form-numbers null) nil)
 



More information about the cmucl-commit mailing list