[armedbear-devel] [armedbear-cvs] r12311 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuels at gmail.com
Mon Dec 28 23:29:18 UTC 2009


While the fix below does seem to fix slime - on my system, it doesn't
fix all cases of what we're seeing: infinite recursion in clos.lisp,
related to initial-discriminating-function.

My own application suffers from the same issue, even after this fix.

(just to let you know what our progress is)

Bye,

Erik.

On Tue, Dec 29, 2009 at 12:11 AM, Erik Huelsmann
<ehuelsmann at common-lisp.net> wrote:
> 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*)
>
> _______________________________________________
> armedbear-cvs mailing list
> armedbear-cvs at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-cvs
>




More information about the armedbear-devel mailing list