Fix up source locations for methods defined via def!method.
[sbcl.git] / src / code / force-delayed-defbangmethods.lisp
blobc115e55a55dbe51988dcba04479fb3dabe20b221
1 ;;;; This software is part of the SBCL system. See the README file for
2 ;;;; more information.
3 ;;;;
4 ;;;; This software is derived from the CMU CL system, which was
5 ;;;; written at Carnegie Mellon University and released into the
6 ;;;; public domain. The software is in the public domain and is
7 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
8 ;;;; files for more information.
10 (in-package "SB-IMPL") ;(SB-IMPL, not SB!IMPL, since we're built in warm load.)
12 (macrolet ((force-delayed-def!methods ()
13 `(progn
14 ,@(mapcar (lambda (args)
15 `(progn
16 #+sb-show
17 (format t
18 "~&/about to do ~S~%"
19 '(defmethod ,@args))
20 (setf (slot-value (defmethod ,@(cdr args))
21 'sb-pcl::source)
22 ,(car args))
23 #+sb-show
24 (format t
25 "~&/done with DEFMETHOD ~S~%"
26 ',(first args))))
27 *delayed-def!method-args*)
28 ;; We're no longer needed, ordinary DEFMETHOD is enough now.
29 (makunbound '*delayed-def!method-args*))))
30 (force-delayed-def!methods))