[armedbear-cvs] r11320 - trunk/j/src/org/armedbear/lisp

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Wed Sep 17 20:19:30 UTC 2008


Author: ehuelsmann
Date: Wed Sep 17 16:19:25 2008
New Revision: 11320

Modified:
   trunk/j/src/org/armedbear/lisp/SpecialOperators.java
Log:
Change some inline simulated progn()s to progn() calls
(which is final anyway, ready to be inlined).

Modified: trunk/j/src/org/armedbear/lisp/SpecialOperators.java
==============================================================================
--- trunk/j/src/org/armedbear/lisp/SpecialOperators.java	(original)
+++ trunk/j/src/org/armedbear/lisp/SpecialOperators.java	Wed Sep 17 16:19:25 2008
@@ -204,7 +204,6 @@
       {
         LispObject varList = checkList(args.car());
         final LispThread thread = LispThread.currentThread();
-        LispObject result = NIL;
         if (varList != NIL)
           {
             SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
@@ -234,12 +233,7 @@
                           obj.writeToString()));
                       }
                   }
-                LispObject body = args.cdr();
-                while (body != NIL)
-                  {
-                    result = eval(body.car(), ext, thread);
-                    body = body.cdr();
-                  }
+                return progn(args.cdr(), ext, thread);
               }
             finally
               {
@@ -248,14 +242,8 @@
           }
         else
           {
-            LispObject body = args.cdr();
-            while (body != NIL)
-              {
-                result = eval(body.car(), env, thread);
-                body = body.cdr();
-              }
+            return progn(args.cdr(), ext, thread);
           }
-        return result;
       }
     };
 
@@ -462,14 +450,7 @@
             // Set up the new bindings.
             progvBindVars(symbols, values, thread);
             // Implicit PROGN.
-            LispObject result = NIL;
-            LispObject body = args.cdr().cdr();
-            while (body != NIL)
-              {
-                result = eval(body.car(), env, thread);
-                body = body.cdr();
-              }
-            return result;
+            return progn(args.cdr().cdr(), env, thread);
           }
         finally
           {



More information about the armedbear-cvs mailing list