[armedbear-cvs] r11644 - trunk/abcl/src/org/armedbear/lisp

Ville Voutilainen vvoutilainen at common-lisp.net
Sun Feb 8 14:00:05 UTC 2009


Author: vvoutilainen
Date: Sun Feb  8 14:00:03 2009
New Revision: 11644

Log:
Further cleanup for p1-flet/labels.


Modified:
   trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp	(original)
+++ trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp	Sun Feb  8 14:00:03 2009
@@ -407,6 +407,12 @@
 						  :parent *current-compiland*)))
 		  , at body1)))
 	    (setf ,local-functions-var (nreverse ,local-functions-var))
+	    ;; Make the local functions visible.
+	    (dolist (local-function ,local-functions-var)
+	      (push local-function *local-functions*)
+	      (let ((variable (local-function-variable local-function)))
+		(when variable
+		  (push variable *visible-variables*))))
 	    , at body2)))
 
 (defun p1-flet (form)
@@ -430,13 +436,7 @@
 	     (setf (local-function-variable local-function) variable)
 	     (push variable *all-variables*)))
 	 (push local-function local-functions)))
-      ;; Make the local functions visible.
-      ((dolist (local-function local-functions)
-	 (push local-function *local-functions*)
-	 (let ((variable (local-function-variable local-function)))
-	   (when variable
-	     (push variable *visible-variables*))))
-       (with-saved-compiler-policy
+      ((with-saved-compiler-policy
 	   (process-optimization-declarations (cddr form))
 	 (list* (car form) local-functions (p1-body (cddr form)))))))
 
@@ -453,11 +453,7 @@
 		 `(lambda ,lambda-list , at decls (block ,name , at body))))
 	 (push variable *all-variables*)
 	 (push local-function local-functions)))
-      ;; Make the local functions visible.
       ((dolist (local-function local-functions)
-	 (push local-function *local-functions*)
-	 (push (local-function-variable local-function) *visible-variables*))
-       (dolist (local-function local-functions)
 	 (let ((*visible-variables* *visible-variables*)
 	       (*current-compiland* (local-function-compiland local-function)))
 	   (p1-compiland (local-function-compiland local-function))))




More information about the armedbear-cvs mailing list