update to more recent version of Android class library

Lots has changed since we forked Android's libcore, so merging the
latest upstream code has required extensive changes to the
Avian/Android port.

One big change is that we now use Avian's versions of
java.lang.Object, java.lang.Class, java.lang.ClassLoader, some
java.lang.reflect.* classes, etc. instead of the Android versions.
The main reason is that the Android versions have become very
Dex/Dalvik-specific, and since Avian is based on Java class files, not
dex archives, that code doesn't make sense here.  This has the side
benefit that we can share more native code with classpath-avian.cpp
and reduce the amount of Java/C++ code duplication.
This commit is contained in:
Joel Dice
2014-08-21 13:09:42 -06:00
parent ba808a8589
commit b96cc3c575
21 changed files with 556 additions and 1393 deletions

View File

@ -57,13 +57,13 @@ public class Field<T> extends AccessibleObject {
}
public static String getName(VMField vmField) {
return new String(vmField.name, 0, vmField.name.length - 1, false);
return Classes.makeString(vmField.name, 0, vmField.name.length - 1);
}
public Class getType() {
return Classes.forCanonicalName
(vmField.class_.loader,
new String(vmField.spec, 0, vmField.spec.length - 1, false));
Classes.makeString(vmField.spec, 0, vmField.spec.length - 1));
}
public Type getGenericType() {