Java method resolution algorithm used by JCALL extracted to a method and...

Java method resolution algorithm used by JCALL extracted to a method and exposed as the Lisp function JAVA:JRESOLVE-METHOD
parent 1006b491
......@@ -13,7 +13,7 @@
</parent>
<groupId>org.armedbear.lisp</groupId>
<artifactId>abcl</artifactId>
<version>0.25.0-SNAPSHOT</version>
<version>0.26.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>ABCL - Armed Bear Common Lisp</name>
<description>Common Lisp implementation running on the JVM</description>
......
......@@ -105,16 +105,16 @@ public class FaslClassLoader extends JavaClassLoader {
}
public LispObject loadFunction(int fnNumber) {
//Function name is fnIndex + 1
String name = baseName + "_" + (fnNumber + 1);
try {
//Function name is fnIndex + 1
String name = baseName + "_" + (fnNumber + 1);
Function f = (Function) loadClass(name).newInstance();
f.setClassBytes(getFunctionClassBytes(name));
return f;
} catch(Exception e) {
} catch(Throwable e) {
if(e instanceof ControlTransfer) { throw (ControlTransfer) e; }
Debug.trace(e);
return error(new LispError("Compiled function can't be loaded: " + baseName + "_" + (fnNumber + 1) + " " + Symbol.LOAD_TRUENAME.symbolValue()));
return error(new LispError("Compiled function can't be loaded: " + name + " from " + Symbol.LOAD_TRUENAME.symbolValue()));
}
}
......
This diff is collapsed.
......@@ -2970,7 +2970,7 @@ public class Symbol extends LispObject implements java.io.Serializable
public static final Symbol JAVA_OBJECT =
PACKAGE_JAVA.addExternalSymbol("JAVA-OBJECT");
public static final Symbol JAVA_CLASS =
PACKAGE_JAVA.addExternalSymbol("JAVA-CLASS");
PACKAGE_JAVA.addExternalSymbol("JAVA-CLASS");
public static final Symbol JCALL =
PACKAGE_JAVA.addExternalSymbol("JCALL");
public static final Symbol JCALL_RAW =
......@@ -2983,6 +2983,8 @@ public class Symbol extends LispObject implements java.io.Serializable
PACKAGE_JAVA.addExternalSymbol("JCLASS-OF");
public static final Symbol JMETHOD_RETURN_TYPE =
PACKAGE_JAVA.addExternalSymbol("JMETHOD-RETURN-TYPE");
public static final Symbol JRESOLVE_METHOD =
PACKAGE_JAVA.addExternalSymbol("JRESOLVE-METHOD");
// External symbols in SYSTEM package.
public static final Symbol _ENABLE_AUTOCOMPILE_ =
......
......@@ -42,7 +42,7 @@ public final class WrongNumberOfArgumentsException extends ProgramError
private String message;
public WrongNumberOfArgumentsException(Operator operator) {
this(operator, -1);
this(operator, -1);
}
public WrongNumberOfArgumentsException(Operator operator, int expectedArgs) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment