1 ;;;; Source location tracking macros.
3 ;;;; This software is part of the SBCL system. See the README file for
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
14 #| No calls to
#'SOURCE-LOCATION must happen from this file because
:
15 ;; - it would imply lack of location information for the definition,
16 ;; since deferring the call past compile-time means we've already lost.
17 ;; - it would be a style-warning to subsequently define the compiler-macro.
18 ;; (DEFINE-COMPILER-MACRO SOURCE-LOCATION) does not itself use SOURCE-LOCATION
19 ;; but this is possibly a mistake! Ordinary DEFMACRO supplies the location
20 ;; to %DEFMACRO. Compiler macros should too. This extra form will be needed:
21 (eval-when (#+sb-xc
:compile-toplevel
)
22 (setf (sb!int
:info
:function
:compiler-macro-function
'source-location
)
24 (declare (ignore form env
))
25 (make-definition-source-location)))) |
#
27 #!+sb-source-locations
30 (define-compiler-macro source-location
()
31 (make-definition-source-location))
32 ;; We need a regular definition of SOURCE-LOCATION for calls processed
33 ;; during LOAD on a source file while *EVALUATOR-MODE* is :INTERPRET.
34 (defun source-location ()
35 #-sb-xc-host
(make-definition-source-location)))
37 #!-sb-source-locations
38 (defun source-location () nil
)