[armedbear-cvs] r11512 - trunk/abcl/src/org/armedbear/lisp
Ville Voutilainen
vvoutilainen at common-lisp.net
Tue Dec 30 14:48:53 UTC 2008
Author: vvoutilainen
Date: Tue Dec 30 14:48:53 2008
New Revision: 11512
Log:
Duplicate (clone) the ClosureTemplateFunction in
makeCompiledClosure. This is in preparation for
CTF to have per-instance context data.
Modified:
trunk/abcl/src/org/armedbear/lisp/ClosureTemplateFunction.java
trunk/abcl/src/org/armedbear/lisp/Lisp.java
Modified: trunk/abcl/src/org/armedbear/lisp/ClosureTemplateFunction.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/ClosureTemplateFunction.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/ClosureTemplateFunction.java Tue Dec 30 14:48:53 2008
@@ -52,9 +52,13 @@
}
final public ClosureTemplateFunction dup()
- throws CloneNotSupportedException
{
- return (ClosureTemplateFunction)super.clone();
+ ClosureTemplateFunction result = null;
+ try {
+ result = (ClosureTemplateFunction)super.clone();
+ } catch (CloneNotSupportedException e) {
+ }
+ return result;
}
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 Tue Dec 30 14:48:53 2008
@@ -1164,7 +1164,8 @@
LispObject[] context)
throws ConditionThrowable
{
- ClosureTemplateFunction ctf = (ClosureTemplateFunction) template;
+ ClosureTemplateFunction ctf = ((ClosureTemplateFunction) template).dup();
+ ctf.setContext(context);
CompiledClosure result = new CompiledClosure(ctf, context);
LispObject classBytes =
getf(ctf.getPropertyList(), Symbol.CLASS_BYTES, NIL);
More information about the armedbear-cvs
mailing list