[Openmcl-cvs-notifications] r12550 - /trunk/source/level-1/l1-readloop.lisp

rme at clozure.com rme at clozure.com
Thu Aug 6 19:24:59 EDT 2009


Author: rme
Date: Thu Aug  6 19:24:59 2009
New Revision: 12550

Log:
macroexpand-all and labels/flet patch, from Stas Boukarev.

http://clozure.com/pipermail/openmcl-devel/2009-August/010110.html

Modified:
    trunk/source/level-1/l1-readloop.lisp

Modified: trunk/source/level-1/l1-readloop.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/level-1/l1-readloop.lisp (original)
+++ trunk/source/level-1/l1-readloop.lisp Thu Aug  6 19:24:59 2009
@@ -332,12 +332,18 @@
                    ,@(mexpand body env))))
               ((flet labels)
                (destructuring-bind-body (bindings &body) (rest form)
-                `(,(first form)
-                   ,(mapcar (lambda (binding)
-                              (list* (first binding) (cdr (macroexpand-all=
 `(lambda ,@(rest binding)) env))))
-                            bindings)
-                   , at decls
-                   ,@(mexpand body env))))
+                 (let ((augmented-env
+                        (augment-environment env :function (mapcar #'car b=
indings))))
+                  `(,(first form)
+                     ,(mapcar (lambda (binding)
+                                (list* (first binding)
+                                       (cdr (macroexpand-all `(lambda ,@(r=
est binding))
+                                                             (if (eq (firs=
t form) 'labels)
+                                                                 augmented=
-env
+                                                                 env)))))
+                              bindings)
+                     , at decls
+                     ,@(mexpand body augmented-env)))))
               (nfunction (list* 'nfunction (second form) (macroexpand-all =
(third form) env)))
               (function
                  (if (and (consp (second form))



More information about the Openmcl-cvs-notifications mailing list