[armedbear-cvs] r11881 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Sat May 16 09:24:52 UTC 2009
Author: ehuelsmann
Date: Sat May 16 05:24:51 2009
New Revision: 11881
Log:
Stop using CompiledClosure as a proxy for
ClosureTemplateFunctions: they instances
hold a copy of the closure array already.
Modified:
trunk/abcl/src/org/armedbear/lisp/Lisp.java
trunk/abcl/src/org/armedbear/lisp/Primitives.java
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
Modified: trunk/abcl/src/org/armedbear/lisp/Lisp.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Lisp.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Lisp.java Sat May 16 05:24:51 2009
@@ -1189,14 +1189,7 @@
ClosureBinding[] context)
throws ConditionThrowable
{
- ClosureTemplateFunction ctf = ((ClosureTemplateFunction) template).dup();
- ctf.setContext(context);
- CompiledClosure result = new CompiledClosure(ctf, context);
- LispObject classBytes =
- getf(ctf.getPropertyList(), Symbol.CLASS_BYTES, NIL);
- if (classBytes != NIL)
- result.setPropertyList(list(Symbol.CLASS_BYTES, classBytes));
- return result;
+ return ((ClosureTemplateFunction)template).dup().setContext(context);
}
public static final String safeWriteToString(LispObject obj)
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 Sat May 16 05:24:51 2009
@@ -2439,6 +2439,13 @@
LispObject name = ((CompiledClosure)arg).getLambdaName();
value3 = name != null ? name : NIL;
}
+ else if (arg instanceof ClosureTemplateFunction)
+ {
+ value1 = NIL;
+ value2 = T;
+ LispObject name = ((ClosureTemplateFunction)arg).getLambdaName();
+ value3 = name != null ? name : NIL;
+ }
else if (arg instanceof Closure && !(arg instanceof CompiledFunction))
{
Closure closure = (Closure) arg;
Modified: trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp (original)
+++ trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp Sat May 16 05:24:51 2009
@@ -241,7 +241,6 @@
(defconstant +lisp-return-class+ "org/armedbear/lisp/Return")
(defconstant +lisp-go-class+ "org/armedbear/lisp/Go")
(defconstant +lisp-ctf-class+ "org/armedbear/lisp/ClosureTemplateFunction")
-(defconstant +lisp-compiled-closure-class+ "org/armedbear/lisp/CompiledClosure")
(defconstant +lisp-compiled-function-class+ "org/armedbear/lisp/CompiledFunction")
(defconstant +lisp-primitive-class+ "org/armedbear/lisp/Primitive")
(defconstant +lisp-hash-table-class+ "org/armedbear/lisp/HashTable")
@@ -4984,8 +4983,7 @@
(duplicate-closure-array *current-compiland*)
(emit-invokestatic +lisp-class+ "makeCompiledClosure"
(list +lisp-object+ +closure-binding-array+)
- +lisp-object+)
- (emit 'checkcast +lisp-compiled-closure-class+))
+ +lisp-object+))
; Stack: compiled-closure
(t
(aver nil))) ;; Shouldn't happen.
More information about the armedbear-cvs
mailing list