Mercurial > hg > graal-compiler
diff src/share/vm/prims/unsafe.cpp @ 9974:01dd93600d02
Add comments in unsafe access of uncompressed pointers
author | Christos Kotselidis <christos.kotselidis@oracle.com> |
---|---|
date | Mon, 10 Jun 2013 12:18:36 +0200 |
parents | 4d5872186e76 |
children | 836a62f43af9 |
line wrap: on
line diff
--- a/src/share/vm/prims/unsafe.cpp Mon Jun 10 12:11:47 2013 +0200 +++ b/src/share/vm/prims/unsafe.cpp Mon Jun 10 12:18:36 2013 +0200 @@ -188,6 +188,8 @@ #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 which is not compressed.*/ \ if (UseCompressedOops && p!=NULL && offset>=oopDesc::header_size()) { \ narrowOop n = *(narrowOop*)index_oop_from_field_offset_long(p, offset); \ v = oopDesc::decode_heap_oop(n); \