Mercurial > hg > graal-compiler
diff src/share/vm/graal/graalCompilerToVM.cpp @ 10536:26c69598db3e
Fix bug in canonicalization of non-compressed object pointers.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 25 Jun 2013 19:48:16 +0200 |
parents | 7943479d36f3 |
children | 554f67e4ff3f |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompilerToVM.cpp Tue Jun 25 14:59:57 2013 +0200 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Tue Jun 25 19:48:16 2013 +0200 @@ -1168,6 +1168,13 @@ C2V_END +C2V_VMENTRY(jobject, readUnsafeUncompressedPointer, (JNIEnv *env, jobject, jobject o, jlong offset)) + oop resolved_o = JNIHandles::resolve(o); + jlong address = offset + (jlong)resolved_o; + return JNIHandles::make_local(*((oop*)address)); +C2V_END + + #define CC (char*) /*cast a literal from (const char*)*/ #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(c2v_ ## f)) @@ -1246,6 +1253,7 @@ {CC"getFileName", CC"("HS_RESOLVED_JAVA_TYPE")"STRING, FN_PTR(getFileName)}, {CC"reprofile", CC"("METASPACE_METHOD")V", FN_PTR(reprofile)}, {CC"invalidateInstalledCode", CC"("HS_INSTALLED_CODE")V", FN_PTR(invalidateInstalledCode)}, + {CC"readUnsafeUncompressedPointer", CC"("OBJECT"J)"OBJECT, FN_PTR(readUnsafeUncompressedPointer)}, }; int CompilerToVM_methods_count() {