X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fdefconstant.lisp;h=735f29a86c736438195c8b07e553e406ead88d0e;hb=31f072311935e32751508ecf824905c6b58a1d95;hp=403db52fc6aaa7c99064b386f6ee5c2af375d28c;hpb=c2431e2d0d0222a3cf20cfdfa48201bdcc65cd76;p=sbcl.git diff --git a/src/compiler/defconstant.lisp b/src/compiler/defconstant.lisp index 403db52..735f29a 100644 --- a/src/compiler/defconstant.lisp +++ b/src/compiler/defconstant.lisp @@ -16,10 +16,11 @@ EQL to the new value, the code is not portable (undefined behavior). The third argument is an optional documentation string for the variable." `(eval-when (:compile-toplevel :load-toplevel :execute) - (sb!c::%defconstant ',name ,value ',documentation))) + (sb!c::%defconstant ',name ,value ',documentation + (sb!c:source-location)))) ;;; the guts of DEFCONSTANT -(defun sb!c::%defconstant (name value doc) +(defun sb!c::%defconstant (name value doc source-location) (unless (symbolp name) (error "The constant name is not a symbol: ~S" name)) (about-to-modify-symbol-value name) @@ -27,6 +28,8 @@ (style-warn "defining ~S as a constant, even though the name follows~@ the usual naming convention (names like *FOO*) for special variables" name)) + (sb!c:with-source-location (source-location) + (setf (info :source-location :constant name) source-location)) (let ((kind (info :variable :kind name))) (case kind (:constant