Initial revision
[sbcl.git] / src / code / force-delayed-defbangmethods.lisp
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.
9
10 (in-package "SB-IMPL")
11
12 (file-comment
13   "$Header$")
14
15 (macrolet ((force-delayed-def!methods ()
16              `(progn
17                 ,@(mapcar (lambda (args)
18                             `(progn
19                                #+sb-show
20                                (format t
21                                        "~&/about to do ~S~%"
22                                        '(defmethod ,@args))
23                                (defmethod ,@args)
24                                #+sb-show
25                                (format t
26                                        "~&/done with DEFMETHOD ~S~%"
27                                        ',(first args))))
28                           *delayed-def!method-args*)
29                 (defmacro def!method (&rest args) `(defmethod ,@args))
30                 ;; We're no longer needed, ordinary DEFMETHOD is enough now.
31                 (makunbound '*delayed-def!method-args*))))
32   (force-delayed-def!methods))