Changeset 12382


Ignore:
Timestamp:
01/17/10 20:53:21 (11 years ago)
Author:
vvoutilainen
Message:

Backport r12376-r12379 and r12381. This fixes maxima,
adds support for disassembling proxied functions, and
adds fixes to printing java objects.

Location:
branches/0.18.x/abcl/src/org/armedbear/lisp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/0.18.x/abcl/src/org/armedbear/lisp/AutoloadedFunctionProxy.java

    r12364 r12382  
    8282    }
    8383
     84
    8485    final private synchronized Function load() {
    8586        if (fun != null)
     
    9192        for (int i = 0; i < symsToSave.length; i++)
    9293            thread.bindSpecial(symsToSave[i], savedSyms[i]);
     94
     95        // set a specific reader environment, because we may be triggered in
     96        // any undefined dynamic environment; we want something predictable
     97        thread.bindSpecial(Symbol.READ_SUPPRESS, NIL);
     98        thread.bindSpecial(Symbol.READ_EVAL, T);
     99        thread.bindSpecial(Symbol.READ_BASE, LispInteger.getInstance(10));
     100        // don't need to bind *READ-DEFAULT-FLOAT-FORMAT*,
     101        // because DUMP-FORM sets it to NIL, forcing exponent markers everywhere
    93102
    94103        byte[] classbytes =
     
    276285            fun = new AutoloadedFunctionProxy(sym, name, cache,
    277286                                              cachedSyms, fType);
    278 
     287            fun.setClassBytes((byte[])((Hashtable)cache.javaInstance())
     288                              .get(name.getStringValue()));
    279289        }
    280290
  • branches/0.18.x/abcl/src/org/armedbear/lisp/JavaClass.java

    r12288 r12382  
    4141
    4242  private JavaClass(Class<?> javaClass) {
    43     this.javaClass = javaClass;
    44     setDirectSuperclass(BuiltInClass.JAVA_OBJECT);
     43      super(new Symbol(javaClass.getCanonicalName()));
     44      this.javaClass = javaClass;
     45      setDirectSuperclass(BuiltInClass.JAVA_OBJECT);
    4546  }
    4647
  • branches/0.18.x/abcl/src/org/armedbear/lisp/LispStackFrame.java

    r12298 r12382  
    120120     final String LISP_STACK_FRAME = "LISP-STACK-FRAME";
    121121     try {
    122        result =  unreadableString(LISP_STACK_FRAME + " "
    123           + toLispString().getStringValue());
     122   result = Symbol.PRIN1_TO_STRING.execute(this.toLispList()).writeToString();
    124123     } catch (Throwable t) { // error while printing stack
    125124       Debug.trace("Serious printing error: ");
  • branches/0.18.x/abcl/src/org/armedbear/lisp/print-object.lisp

    r11590 r12382  
    5050    (format stream "~S" (class-name (class-of object))))
    5151  object)
     52
     53(defmethod print-object ((obj java:java-object) stream)
     54  (write-string (%write-to-string obj) stream))
    5255
    5356(defmethod print-object ((class java:java-class) stream)
Note: See TracChangeset for help on using the changeset viewer.