Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
9973:80cff15f7721 | 9974:01dd93600d02 |
---|---|
186 } | 186 } |
187 #else | 187 #else |
188 #define GET_OOP_FIELD(obj, offset, v) \ | 188 #define GET_OOP_FIELD(obj, offset, v) \ |
189 oop p = JNIHandles::resolve(obj); \ | 189 oop p = JNIHandles::resolve(obj); \ |
190 oop v; \ | 190 oop v; \ |
191 /* Uncompression is not performed to unsafeAccess with null object. | |
192 * This concerns accesses to the metaspace such as the classMirrorOffset which is not compressed.*/ \ | |
191 if (UseCompressedOops && p!=NULL && offset>=oopDesc::header_size()) { \ | 193 if (UseCompressedOops && p!=NULL && offset>=oopDesc::header_size()) { \ |
192 narrowOop n = *(narrowOop*)index_oop_from_field_offset_long(p, offset); \ | 194 narrowOop n = *(narrowOop*)index_oop_from_field_offset_long(p, offset); \ |
193 v = oopDesc::decode_heap_oop(n); \ | 195 v = oopDesc::decode_heap_oop(n); \ |
194 } else { \ | 196 } else { \ |
195 v = *(oop*)index_oop_from_field_offset_long(p, offset); \ | 197 v = *(oop*)index_oop_from_field_offset_long(p, offset); \ |