diff --git a/sgx-jvm/avian/classpath/avian/Classes.java b/sgx-jvm/avian/classpath/avian/Classes.java index 0d414184dc..b827ab2c71 100644 --- a/sgx-jvm/avian/classpath/avian/Classes.java +++ b/sgx-jvm/avian/classpath/avian/Classes.java @@ -41,8 +41,6 @@ public class Classes { public static native boolean isAssignableFrom(VMClass a, VMClass b); - public static native VMClass getVMClass(Object o); - public static native VMClass toVMClass(Class c); public static native VMMethod toVMMethod(Method m); diff --git a/sgx-jvm/avian/classpath/java/lang/Class.java b/sgx-jvm/avian/classpath/java/lang/Class.java index 5cba3cd7e0..6b3729b8dc 100644 --- a/sgx-jvm/avian/classpath/java/lang/Class.java +++ b/sgx-jvm/avian/classpath/java/lang/Class.java @@ -564,7 +564,7 @@ public final class Class public static boolean isInstance(VMClass c, Object o) { return o != null && Classes.isAssignableFrom - (c, Classes.getVMClass(o)); + (c, o.getVMClass()); } public boolean isInstance(Object o) { diff --git a/sgx-jvm/avian/classpath/java/lang/Object.java b/sgx-jvm/avian/classpath/java/lang/Object.java index 0ad1b78e82..6c0710fa0d 100644 --- a/sgx-jvm/avian/classpath/java/lang/Object.java +++ b/sgx-jvm/avian/classpath/java/lang/Object.java @@ -28,10 +28,10 @@ public class Object { protected void finalize() throws Throwable { } public final Class getClass() { - return avian.SystemClassLoader.getClass(getVMClass(this)); + return avian.SystemClassLoader.getClass(getVMClass()); } - private static native avian.VMClass getVMClass(Object o); + native avian.VMClass getVMClass(); public native int hashCode(); diff --git a/sgx-jvm/avian/makefile b/sgx-jvm/avian/makefile index a554b06eba..9e946619ee 100755 --- a/sgx-jvm/avian/makefile +++ b/sgx-jvm/avian/makefile @@ -807,7 +807,7 @@ ifeq ($(kernel),darwin) platform-dir = $(developer-dir)/Platforms/$(target).platform sdk-dir = $(platform-dir)/Developer/SDKs - ios-version := $(shell for x in 10.0 9.3 9.2 9.1 9.0 8.3 8.2 8.1 8.0; \ + ios-version := $(shell for x in 10.3 10.2 10.1 10.0 9.3 9.2 9.1 9.0 8.3 8.2 8.1 8.0; \ do if test -d $(sdk-dir)/$(target)$$x.sdk \ -o -L $(sdk-dir)/$(target)$$x.sdk; \ then echo $$x; break; fi; done) diff --git a/sgx-jvm/avian/src/machine.cpp b/sgx-jvm/avian/src/machine.cpp index 84cc9ca599..1792a43aef 100644 --- a/sgx-jvm/avian/src/machine.cpp +++ b/sgx-jvm/avian/src/machine.cpp @@ -4883,13 +4883,7 @@ GcClass* resolveSystemClass(Thread* t, ACQUIRE(t, t->m->classLock); - GcClass* class_ = cast(t, - hashMapFind(t, - cast(t, loader->map()), - spec, - byteArrayHash, - byteArrayEqual)); - + GcClass* class_ = findLoadedClass(t, loader, spec); if (class_ == 0) { PROTECT(t, class_);