Mercurial > hg > graal-compiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
10535:ddc756cd065d | 10536:26c69598db3e |
---|---|
1166 VMThread::execute(&op); | 1166 VMThread::execute(&op); |
1167 } | 1167 } |
1168 C2V_END | 1168 C2V_END |
1169 | 1169 |
1170 | 1170 |
1171 C2V_VMENTRY(jobject, readUnsafeUncompressedPointer, (JNIEnv *env, jobject, jobject o, jlong offset)) | |
1172 oop resolved_o = JNIHandles::resolve(o); | |
1173 jlong address = offset + (jlong)resolved_o; | |
1174 return JNIHandles::make_local(*((oop*)address)); | |
1175 C2V_END | |
1176 | |
1177 | |
1171 #define CC (char*) /*cast a literal from (const char*)*/ | 1178 #define CC (char*) /*cast a literal from (const char*)*/ |
1172 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(c2v_ ## f)) | 1179 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(c2v_ ## f)) |
1173 | 1180 |
1174 #define RESOLVED_TYPE "Lcom/oracle/graal/api/meta/ResolvedJavaType;" | 1181 #define RESOLVED_TYPE "Lcom/oracle/graal/api/meta/ResolvedJavaType;" |
1175 #define TYPE "Lcom/oracle/graal/api/meta/JavaType;" | 1182 #define TYPE "Lcom/oracle/graal/api/meta/JavaType;" |
1244 {CC"getLineNumberTable", CC"("HS_RESOLVED_METHOD")[J", FN_PTR(getLineNumberTable)}, | 1251 {CC"getLineNumberTable", CC"("HS_RESOLVED_METHOD")[J", FN_PTR(getLineNumberTable)}, |
1245 {CC"getLocalVariableTable", CC"("HS_RESOLVED_METHOD")["LOCAL, FN_PTR(getLocalVariableTable)}, | 1252 {CC"getLocalVariableTable", CC"("HS_RESOLVED_METHOD")["LOCAL, FN_PTR(getLocalVariableTable)}, |
1246 {CC"getFileName", CC"("HS_RESOLVED_JAVA_TYPE")"STRING, FN_PTR(getFileName)}, | 1253 {CC"getFileName", CC"("HS_RESOLVED_JAVA_TYPE")"STRING, FN_PTR(getFileName)}, |
1247 {CC"reprofile", CC"("METASPACE_METHOD")V", FN_PTR(reprofile)}, | 1254 {CC"reprofile", CC"("METASPACE_METHOD")V", FN_PTR(reprofile)}, |
1248 {CC"invalidateInstalledCode", CC"("HS_INSTALLED_CODE")V", FN_PTR(invalidateInstalledCode)}, | 1255 {CC"invalidateInstalledCode", CC"("HS_INSTALLED_CODE")V", FN_PTR(invalidateInstalledCode)}, |
1256 {CC"readUnsafeUncompressedPointer", CC"("OBJECT"J)"OBJECT, FN_PTR(readUnsafeUncompressedPointer)}, | |
1249 }; | 1257 }; |
1250 | 1258 |
1251 int CompilerToVM_methods_count() { | 1259 int CompilerToVM_methods_count() { |
1252 return sizeof(CompilerToVM_methods) / sizeof(JNINativeMethod); | 1260 return sizeof(CompilerToVM_methods) / sizeof(JNINativeMethod); |
1253 } | 1261 } |