Changeset 13007
- Timestamp:
- 11/06/10 12:37:25 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/FaslClassLoader.java
r12754 r13007 53 53 } catch(Exception e) { 54 54 //e.printStackTrace(); 55 Debug.trace("useLoaderFunction = true but couldn't fully init FASL loader , will fall back to reflection!");55 Debug.trace("useLoaderFunction = true but couldn't fully init FASL loader ("+baseName+"), will fall back to reflection!"); 56 56 } 57 57 } 58 58 } 59 59 60 @Override 61 protected Class<?> loadClass(String name, boolean resolve) 62 throws ClassNotFoundException { 63 /* First we check if we should load the class ourselves, 64 * allowing the default handlers to kick in if we don't... 65 * 66 * This strategy eliminates ClassNotFound exceptions inside 67 * the inherited loadClass() eliminated ~80k exceptions during 68 * Maxima compilation. Generally, creation of an exception object 69 * is a pretty heavy operation, because it processes the call stack, 70 * which - in ABCL - is pretty deep, most of the time. 71 */ 72 if (name.startsWith(baseName + "_")) { 73 String internalName = "org/armedbear/lisp/" + name; 74 Class<?> c = this.findLoadedClass(internalName); 75 76 if (c == null) 77 c = findClass(name); 78 79 if (c != null) { 80 if (resolve) 81 resolveClass(c); 82 83 return c; 84 } 85 } 86 87 // Fall through to our super's default handling 88 return super.loadClass(name, resolve); 89 } 90 91 @Override 60 92 protected Class<?> findClass(String name) throws ClassNotFoundException { 61 93 try {
Note: See TracChangeset
for help on using the changeset viewer.