[armedbear-cvs] r11323 - trunk/j/src/org/armedbear/lisp
ehuelsmann at common-lisp.net
ehuelsmann at common-lisp.net
Thu Sep 18 20:48:23 UTC 2008
Author: ehuelsmann
Date: Thu Sep 18 16:48:17 2008
New Revision: 11323
Modified:
trunk/j/src/org/armedbear/lisp/Closure.java
Log:
Cleanup patch provided by Ville.
Patch by: Ville Voutilianen <ville.voutilainen at gmail dot com>
Modified: trunk/j/src/org/armedbear/lisp/Closure.java
==============================================================================
--- trunk/j/src/org/armedbear/lisp/Closure.java (original)
+++ trunk/j/src/org/armedbear/lisp/Closure.java Thu Sep 18 16:48:17 2008
@@ -411,15 +411,8 @@
{
if (arity == 0)
{
- final LispThread thread = LispThread.currentThread();
- LispObject result = NIL;
- LispObject prog = body;
- while (prog != NIL)
- {
- result = eval(prog.car(), environment, thread);
- prog = prog.cdr();
- }
- return result;
+ return progn(body, environment,
+ LispThread.currentThread());
}
else
return execute(new LispObject[0]);
@@ -444,21 +437,14 @@
}
if (auxVars != null)
bindAuxVars(ext, thread);
- LispObject result = NIL;
- LispObject prog = body;
try
{
- while (prog != NIL)
- {
- result = eval(prog.car(), ext, thread);
- prog = prog.cdr();
- }
+ return progn(body, ext, thread);
}
finally
{
thread.lastSpecialBinding = lastSpecialBinding;
}
- return result;
}
else
{
@@ -489,21 +475,14 @@
}
if (auxVars != null)
bindAuxVars(ext, thread);
- LispObject result = NIL;
- LispObject prog = body;
try
{
- while (prog != NIL)
- {
- result = eval(prog.car(), ext, thread);
- prog = prog.cdr();
- }
+ return progn(body, ext, thread);
}
finally
{
thread.lastSpecialBinding = lastSpecialBinding;
}
- return result;
}
else
{
@@ -537,21 +516,14 @@
}
if (auxVars != null)
bindAuxVars(ext, thread);
- LispObject result = NIL;
- LispObject prog = body;
try
{
- while (prog != NIL)
- {
- result = eval(prog.car(), ext, thread);
- prog = prog.cdr();
- }
+ return progn(body, ext, thread);
}
finally
{
thread.lastSpecialBinding = lastSpecialBinding;
}
- return result;
}
else
{
@@ -587,21 +559,14 @@
}
if (auxVars != null)
bindAuxVars(ext, thread);
- LispObject result = NIL;
- LispObject prog = body;
try
{
- while (prog != NIL)
- {
- result = eval(prog.car(), ext, thread);
- prog = prog.cdr();
- }
+ return progn(body, ext, thread);
}
finally
{
thread.lastSpecialBinding = lastSpecialBinding;
}
- return result;
}
else
{
@@ -640,21 +605,14 @@
}
if (auxVars != null)
bindAuxVars(ext, thread);
- LispObject result = NIL;
- LispObject prog = body;
try
{
- while (prog != NIL)
- {
- result = eval(prog.car(), ext, thread);
- prog = prog.cdr();
- }
+ return progn(body, ext, thread);
}
finally
{
thread.lastSpecialBinding = lastSpecialBinding;
}
- return result;
}
else
{
@@ -695,21 +653,14 @@
}
if (auxVars != null)
bindAuxVars(ext, thread);
- LispObject result = NIL;
- LispObject prog = body;
try
{
- while (prog != NIL)
- {
- result = eval(prog.car(), ext, thread);
- prog = prog.cdr();
- }
+ return progn(body, ext, thread);
}
finally
{
thread.lastSpecialBinding = lastSpecialBinding;
}
- return result;
}
else
{
@@ -753,21 +704,14 @@
}
if (auxVars != null)
bindAuxVars(ext, thread);
- LispObject result = NIL;
- LispObject prog = body;
try
{
- while (prog != NIL)
- {
- result = eval(prog.car(), ext, thread);
- prog = prog.cdr();
- }
+ return progn(body, ext, thread);
}
finally
{
thread.lastSpecialBinding = lastSpecialBinding;
}
- return result;
}
else
{
@@ -818,21 +762,14 @@
}
if (auxVars != null)
bindAuxVars(ext, thread);
- LispObject result = NIL;
- LispObject prog = body;
try
{
- while (prog != NIL)
- {
- result = eval(prog.car(), ext, thread);
- prog = prog.cdr();
- }
+ return progn(body, ext, thread);
}
finally
{
thread.lastSpecialBinding = lastSpecialBinding;
}
- return result;
}
else
{
More information about the armedbear-cvs
mailing list