Mercurial > hg > graal-compiler
changeset 12448:930eb01324ec
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 16 Oct 2013 03:53:40 +0200 |
parents | 97fe8342a90f (current diff) 39308acea2f7 (diff) |
children | c0fa3796819b |
files | |
diffstat | 4 files changed, 18 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/HotSpotMethodSubstitutionTest.java Wed Oct 16 03:11:19 2013 +0200 +++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/HotSpotMethodSubstitutionTest.java Wed Oct 16 03:53:40 2013 +0200 @@ -33,6 +33,11 @@ */ public class HotSpotMethodSubstitutionTest extends MethodSubstitutionTest { + /* + * We have to ignore this test for now because currently there is no way to read uncompressed + * pointers in a compressed world via JNI. + */ + @Ignore @Test public void testObjectSubstitutions() { test("getClass0"); @@ -54,6 +59,11 @@ return obj.hashCode(); } + /* + * We have to ignore this test for now because currently there is no way to read uncompressed + * pointers in a compressed world via JNI. + */ + @Ignore @Test public void testClassSubstitutions() { test("getModifiers"); @@ -112,6 +122,11 @@ return clazz.getComponentType(); } + /* + * We have to ignore this test for now because currently there is no way to read uncompressed + * pointers in a compressed world via JNI. + */ + @Ignore @Test public void testThreadSubstitutions() { test("currentThread");
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectType.java Wed Oct 16 03:11:19 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectType.java Wed Oct 16 03:53:40 2013 +0200 @@ -105,7 +105,7 @@ */ public static ResolvedJavaType fromMetaspaceKlass(long metaspaceKlass) { assert metaspaceKlass != 0; - Class javaClass = (Class) unsafe.getObject(null, metaspaceKlass + runtime().getConfig().classMirrorOffset); + Class javaClass = (Class) runtime().getCompilerToVM().readUnsafeUncompressedPointer(null, metaspaceKlass + runtime().getConfig().classMirrorOffset); assert javaClass != null; return fromClass(javaClass); }
--- a/graal/com.oracle.graal.word/src/com/oracle/graal/word/Word.java Wed Oct 16 03:11:19 2013 +0200 +++ b/graal/com.oracle.graal.word/src/com/oracle/graal/word/Word.java Wed Oct 16 03:53:40 2013 +0200 @@ -657,9 +657,7 @@ @Override @Operation(opcode = Opcode.READ) - public Object readObject(WordBase offset, LocationIdentity locationIdentity) { - return unsafe.getObject(null, add((Word) offset).unbox()); - } + public native Object readObject(WordBase offset, LocationIdentity locationIdentity); @Override @Operation(opcode = Opcode.READ)
--- a/src/share/vm/prims/unsafe.cpp Wed Oct 16 03:11:19 2013 +0200 +++ b/src/share/vm/prims/unsafe.cpp Wed Oct 16 03:53:40 2013 +0200 @@ -173,9 +173,7 @@ #define GET_OOP_FIELD(obj, offset, v) \ oop p = JNIHandles::resolve(obj); \ oop v; \ - /* Uncompression is not performed to unsafeAccess with null object. \ - * This concerns accesses to the metaspace such as the classMirrorOffset in Graal which is not compressed.*/ \ - if (UseCompressedOops GRAAL_ONLY(&& p != NULL && offset >= oopDesc::header_size())) { \ + if (UseCompressedOops) { \ narrowOop n = *(narrowOop*)index_oop_from_field_offset_long(p, offset); \ v = oopDesc::decode_heap_oop(n); \ } else { \