[armedbear-cvs] r12055 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Fri Jul 24 19:24:24 UTC 2009
Author: ehuelsmann
Date: Fri Jul 24 15:24:12 2009
New Revision: 12055
Log:
Avoid stack save/restore operations in routines not modifying the stack.
Modified:
trunk/abcl/src/org/armedbear/lisp/Do.java
trunk/abcl/src/org/armedbear/lisp/Primitives.java
trunk/abcl/src/org/armedbear/lisp/dolist.java
trunk/abcl/src/org/armedbear/lisp/dotimes.java
Modified: trunk/abcl/src/org/armedbear/lisp/Do.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Do.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Do.java Fri Jul 24 15:24:12 2009
@@ -93,7 +93,6 @@
varlist = varlist.cdr();
}
final LispThread thread = LispThread.currentThread();
- final LispObject stack = thread.getStack();
final SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
// Process declarations.
@@ -170,7 +169,6 @@
if (binding != null && binding.value != null)
{
remaining = binding.value;
- thread.setStack(stack);
continue;
}
throw go;
@@ -234,7 +232,6 @@
{
if (ret.getTag() == NIL)
{
- thread.setStack(stack);
return ret.getResult();
}
throw ret;
Modified: trunk/abcl/src/org/armedbear/lisp/Primitives.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Primitives.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Primitives.java Fri Jul 24 15:24:12 2009
@@ -3509,7 +3509,6 @@
localTags = new Cons(current, localTags);
}
final LispThread thread = LispThread.currentThread();
- final LispObject stack = thread.getStack();
LispObject remaining = args;
while (remaining != NIL)
{
@@ -3546,7 +3545,6 @@
if (binding != null && binding.value != null)
{
remaining = binding.value;
- thread.setStack(stack);
continue;
}
}
@@ -3597,7 +3595,6 @@
ext.addBlock(tag, block);
LispObject result = NIL;
final LispThread thread = LispThread.currentThread();
- final LispObject stack = thread.getStack();
try
{
return progn(body, ext, thread);
@@ -3606,7 +3603,6 @@
{
if (ret.getBlock() == block)
{
- thread.setStack(stack);
return ret.getResult();
}
throw ret;
@@ -3660,7 +3656,6 @@
thread.pushCatchTag(tag);
LispObject body = args.cdr();
LispObject result = NIL;
- final LispObject stack = thread.getStack();
try
{
return progn(body, env, thread);
@@ -3669,7 +3664,6 @@
{
if (t.tag == tag)
{
- thread.setStack(stack);
return t.getResult(thread);
}
throw t;
Modified: trunk/abcl/src/org/armedbear/lisp/dolist.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/dolist.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/dolist.java Fri Jul 24 15:24:12 2009
@@ -52,7 +52,6 @@
final LispThread thread = LispThread.currentThread();
LispObject resultForm = args.cdr().cdr().car();
SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
- final LispObject stack = thread.getStack();
// Process declarations.
LispObject bodyAndDecls = parseBody(bodyForm, false);
LispObject specials = parseSpecials(bodyAndDecls.NTH(1));
@@ -134,7 +133,6 @@
if (b != null && b.value != null)
{
body = b.value;
- thread.setStack(stack);
continue;
}
throw go;
@@ -157,7 +155,6 @@
{
if (ret.getTag() == NIL)
{
- thread.setStack(stack);
return ret.getResult();
}
throw ret;
Modified: trunk/abcl/src/org/armedbear/lisp/dotimes.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/dotimes.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/dotimes.java Fri Jul 24 15:24:12 2009
@@ -51,7 +51,6 @@
final LispThread thread = LispThread.currentThread();
LispObject resultForm = args.cdr().cdr().car();
SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
- final LispObject stack = thread.getStack();
LispObject bodyAndDecls = parseBody(bodyForm, false);
LispObject specials = parseSpecials(bodyAndDecls.NTH(1));
@@ -144,7 +143,6 @@
if (b != null && b.value != null)
{
body = b.value;
- thread.setStack(stack);
continue;
}
}
@@ -205,7 +203,6 @@
if (b != null && b.value != null)
{
body = b.value;
- thread.setStack(stack);
continue;
}
}
@@ -232,7 +229,6 @@
{
if (ret.getTag() == NIL)
{
- thread.setStack(stack);
return ret.getResult();
}
throw ret;
More information about the armedbear-cvs
mailing list