Changeset 13148


Ignore:
Timestamp:
01/14/11 20:24:18 (11 years ago)
Author:
astalla
Message:

Restored disassembly for compiled functions loaded from FASLs by always storing the class bytes greedily.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/FaslClassLoader.java

    r13135 r13148  
    4040public class FaslClassLoader extends JavaClassLoader {
    4141
    42     private String baseName;
    43     private LispObject loader; //The function used to load FASL functions by number
     42    private final String baseName;
    4443    private final JavaObject boxedThis = new JavaObject(this);
    4544
     
    6463            Class<?> c = this.findLoadedClass(internalName);
    6564
    66             if (c == null)
     65            if (c == null) {
    6766                c = findClass(name);
    68 
     67            }
    6968            if (c != null) {
    70                 if (resolve)
     69                if (resolve) {
    7170                    resolveClass(c);
    72 
     71                }
    7372                return c;
    7473            }
     
    9594        return readFunctionBytes(pathname);
    9695    }
    97    
     96
    9897    public byte[] getFunctionClassBytes(Class<?> functionClass) {
    9998        return getFunctionClassBytes(functionClass.getName());
     
    109108        try {
    110109            //Function name is fnIndex + 1
    111             LispObject o = (LispObject) loadClass(baseName + "_" + (fnNumber + 1)).newInstance();
    112             return o;
     110            String name = baseName + "_" + (fnNumber + 1);
     111            Function f = (Function) loadClass(name).newInstance();
     112            f.setClassBytes(getFunctionClassBytes(name));
     113            return f;
    113114        } catch(Exception e) {
    114115            if(e instanceof ControlTransfer) { throw (ControlTransfer) e; }
Note: See TracChangeset for help on using the changeset viewer.