comparison src/share/vm/prims/unsafe.cpp @ 9094:6194aefabf1a

weakened assertion in unsafe.cpp for GRAAL builds such that non-GRAAL builds still work
author Doug Simon <doug.simon@oracle.com>
date Fri, 12 Apr 2013 21:41:34 +0200
parents 0f090aa237e7
children 4d5872186e76
comparison
equal deleted inserted replaced
9093:cd22923e7ca7 9094:6194aefabf1a
116 inline void* index_oop_from_field_offset_long(oop p, jlong field_offset) { 116 inline void* index_oop_from_field_offset_long(oop p, jlong field_offset) {
117 jlong byte_offset = field_offset_to_byte_offset(field_offset); 117 jlong byte_offset = field_offset_to_byte_offset(field_offset);
118 // Don't allow unsafe to be used to read or write the header word of oops 118 // Don't allow unsafe to be used to read or write the header word of oops
119 // unless running GRAAL which wants to read the misc word for example when 119 // unless running GRAAL which wants to read the misc word for example when
120 // interpreting computeHashCode(). 120 // interpreting computeHashCode().
121 assert(p == NULL || field_offset >= oopDesc::header_size() || GRAAL, "offset must be outside of header"); 121 #ifndef GRAAL
122 assert(p == NULL || field_offset >= oopDesc::header_size(), "offset must be outside of header");
123 #endif
122 #ifdef ASSERT 124 #ifdef ASSERT
123 if (p != NULL) { 125 if (p != NULL) {
124 assert(byte_offset >= 0 && byte_offset <= (jlong)MAX_OBJECT_SIZE, "sane offset"); 126 assert(byte_offset >= 0 && byte_offset <= (jlong)MAX_OBJECT_SIZE, "sane offset");
125 if (byte_offset == (jint)byte_offset) { 127 if (byte_offset == (jint)byte_offset) {
126 void* ptr_plus_disp = (address)p + byte_offset; 128 void* ptr_plus_disp = (address)p + byte_offset;