[movitz-cvs] CVS update: movitz/compiler.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Thu Jan 15 16:38:53 UTC 2004


Update of /project/movitz/cvsroot/movitz
In directory common-lisp.net:/tmp/cvs-serv29669

Modified Files:
	compiler.lisp 
Log Message:
Added function movitz-macro-expander-make-function which is supposed
to take care of compiling (or not) all macro-expander code.

Date: Thu Jan 15 11:38:52 2004
Author: ffjeld

Index: movitz/compiler.lisp
diff -u movitz/compiler.lisp:1.1.1.1 movitz/compiler.lisp:1.2
--- movitz/compiler.lisp:1.1.1.1	Tue Jan 13 06:04:59 2004
+++ movitz/compiler.lisp	Thu Jan 15 11:38:52 2004
@@ -8,7 +8,7 @@
 ;;;; Created at:    Wed Oct 25 12:30:49 2000
 ;;;; Distribution:  See the accompanying file COPYING.
 ;;;;                
-;;;; $Id: compiler.lisp,v 1.1.1.1 2004/01/13 11:04:59 ffjeld Exp $
+;;;; $Id: compiler.lisp,v 1.2 2004/01/15 16:38:52 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -107,6 +107,16 @@
     (when (slot-boundp object 'name)
       (write (movitz-funobj-name object) :stream stream)))
   object)
+
+(defun movitz-macro-expander-make-function (lambda-form
+				       &key (name (gensym "macro-expander-"))
+					    (type :unknown))
+  "Make a lambda-form that is a macro-expander into a proper function."
+  (declare (ignore type))
+  (check-type name symbol)
+  (if *compiler-compile-macro-expanders*
+      (compile name lambda-form)
+    (coerce lambda-form 'function)))
 
 (defun make-compiled-funobj (&rest args)
   (handler-bind (((or warning error)





More information about the Movitz-cvs mailing list