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

Ville Voutilainen vvoutilainen at common-lisp.net
Thu Apr 23 20:46:30 UTC 2009


Author: vvoutilainen
Date: Thu Apr 23 16:46:27 2009
New Revision: 11778

Log:
Fix declaration of free specials for non-array execute.


Modified:
   trunk/abcl/src/org/armedbear/lisp/Closure.java

Modified: trunk/abcl/src/org/armedbear/lisp/Closure.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Closure.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Closure.java	Thu Apr 23 16:46:27 2009
@@ -398,6 +398,7 @@
         bindParameterDefaults(keywordParameters, ext, thread);
       }
     bindAuxVars(ext, thread);
+    declareFreeSpecials(ext);
     try
       {
         return progn(executionBody, ext, thread);
@@ -558,6 +559,24 @@
       }
   }
 
+  private final void declareFreeSpecials(Environment ext)
+    throws ConditionThrowable
+  {
+    LispObject s = specials;
+    special:
+    while (s != NIL) {
+      Symbol special = (Symbol)s.car();
+      s = s.cdr();
+      for (Symbol var : variables)
+	if (special == var)
+          continue special;
+      for (Parameter parameter : auxVars)
+        if (special == parameter.var)
+          continue special;
+      ext.declareSpecial(special);
+    }
+  }
+
   @Override
   public LispObject execute(LispObject[] args) throws ConditionThrowable
   {
@@ -579,19 +598,7 @@
         bindArg(specials, sym, args[i], ext, thread);
       }
     bindAuxVars(ext, thread);
-    LispObject s = specials;
-    special:
-    while (s != NIL) {
-      Symbol special = (Symbol)s.car();
-      s = s.cdr();
-      for (Symbol var : variables)
-        if (special == var)
-          continue special;
-      for (Parameter parameter : auxVars)
-        if (special == parameter.var)
-          continue special;
-      ext.declareSpecial(special);
-    }
+    declareFreeSpecials(ext);
     try
       {
         return progn(executionBody, ext, thread);




More information about the armedbear-cvs mailing list