[armedbear-cvs] r12311 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Mon Dec 28 23:11:39 UTC 2009
Author: ehuelsmann
Date: Mon Dec 28 18:11:35 2009
New Revision: 12311
Log:
Followup to r12306: "unbreak" Slime, at least partially.
Modified:
trunk/abcl/src/org/armedbear/lisp/AutoloadedFunctionProxy.java
trunk/abcl/src/org/armedbear/lisp/LispObject.java
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
Modified: trunk/abcl/src/org/armedbear/lisp/AutoloadedFunctionProxy.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/AutoloadedFunctionProxy.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/AutoloadedFunctionProxy.java Mon Dec 28 18:11:35 2009
@@ -68,6 +68,12 @@
this.fType = ft;
}
+ /** Resolve this instance by returning the function we're proxy for */
+ @Override
+ public LispObject resolve() {
+ return load();
+ }
+
final private synchronized Function load() {
if (fun != null)
return fun;
@@ -249,6 +255,9 @@
LispObject pack = Symbol._PACKAGE_.symbolValue(thread);
if (cache instanceof Nil)
+ // during EVAL-WHEN :compile-toplevel, this function will
+ // be called without a caching environment; we'll need to
+ // forward to the compiled function loader
return loadCompiledFunction(name.getStringValue());
else {
fun = new AutoloadedFunctionProxy(sym, name, cache, pack,
Modified: trunk/abcl/src/org/armedbear/lisp/LispObject.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/LispObject.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/LispObject.java Mon Dec 28 18:11:35 2009
@@ -38,6 +38,16 @@
public class LispObject //extends Lisp
{
+
+ /** Function to allow objects to return the value
+ * "they stand for". Used by AutoloadedFunctionProxy to return
+ * the function it is proxying.
+ */
+ public LispObject resolve()
+ {
+ return this;
+ }
+
public LispObject typeOf()
{
return T;
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 Mon Dec 28 18:11:35 2009
@@ -2048,6 +2048,10 @@
"getSymbolSetfFunctionOrDie"
"getSymbolFunctionOrDie")
nil +lisp-object+)
+ ;; make sure we're not cacheing a proxied function
+ ;; (AutoloadedFunctionProxy) by allowing it to resolve itself
+ (emit-invokevirtual +lisp-object-class+
+ "resolve" nil +lisp-object+)
(emit 'putstatic *this-class* f +lisp-object+)
(if *declare-inline*
(setf saved-code *code*)
More information about the armedbear-cvs
mailing list