Changeset 13167 for branches/0.24.x


Ignore:
Timestamp:
01/21/11 20:57:57 (11 years ago)
Author:
ehuelsmann
Message:

Merge r13148 and r13149: Additional changes to use reflection based
function instantiation.

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

Legend:

Unmodified
Added
Removed
  • branches/0.24.x/abcl/src/org/armedbear/lisp/FaslClassLoader.java

    r13162 r13167  
    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            }
     
    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; }
     
    129130        }
    130131
     132        @Override
     133        //TODO delete this next time the fasl version is bumbed
     134        public LispObject execute(LispObject unused1, LispObject baseName, LispObject unused2) {
     135            return execute(baseName);
     136        }
     137
    131138    };
    132139
  • branches/0.24.x/abcl/src/org/armedbear/lisp/Lisp.java

    r13108 r13167  
    12851285          if (input == null) {
    12861286                  Debug.trace("Pathname: " + name);
     1287                  Debug.trace("load: " + load);
    12871288                  Debug.trace("LOAD_TRUENAME_FASL: " + truenameFasl);
    12881289                  Debug.trace("LOAD_TRUENAME: " + truename);
  • branches/0.24.x/abcl/src/org/armedbear/lisp/Load.java

    r13064 r13167  
    343343    // ### *fasl-version*
    344344    // internal symbol
     345
     346    /* TODO when bumping the version for any reason, remember to:
     347     *  - remove the overload taking 3 args in
     348     *    FaslClassLoader.MAKE_FASL_CLASS_LOADER
     349     *  - remove the extra args (1 and 3, both NIL) passed to
     350     *    make-fasl-class-loader in compile-file.lisp
     351     *  - delete this comment :)
     352     */
    345353    static final Symbol _FASL_VERSION_ =
    346354        exportConstant("*FASL-VERSION*", PACKAGE_SYS, Fixnum.getInstance(37));
  • branches/0.24.x/abcl/src/org/armedbear/lisp/compile-file.lisp

    r13162 r13167  
    370370    (let ((*load-truename* *output-file-pathname*)
    371371    (*fasl-loader* (make-fasl-class-loader
    372                           (concatenate 'string "org.armedbear.lisp." (base-classname)))))
     372                          nil
     373                          (concatenate 'string "org.armedbear.lisp." (base-classname))
     374                          nil)))
    373375      (eval form))))
    374376
     
    612614                (write (list 'setq '*fasl-loader*
    613615                             `(sys::make-fasl-class-loader
    614                                ,(concatenate 'string "org.armedbear.lisp." (base-classname)))) :stream out))
     616                               nil
     617                               ,(concatenate 'string "org.armedbear.lisp." (base-classname))
     618                               nil)) :stream out))
    615619              (%stream-terpri out))
    616620
Note: See TracChangeset for help on using the changeset viewer.