Mercurial > hg > truffle
comparison src/share/vm/prims/unsafe.cpp @ 6976:8aaef2cee3b2
Merge
author | minqi |
---|---|
date | Thu, 08 Nov 2012 16:48:01 -0800 |
parents | e81a8af10cd9 |
children | 070d523b96a7 |
comparison
equal
deleted
inserted
replaced
6975:64812523d72e | 6976:8aaef2cee3b2 |
---|---|
122 if (byte_offset == (jint)byte_offset) { | 122 if (byte_offset == (jint)byte_offset) { |
123 void* ptr_plus_disp = (address)p + byte_offset; | 123 void* ptr_plus_disp = (address)p + byte_offset; |
124 assert((void*)p->obj_field_addr<oop>((jint)byte_offset) == ptr_plus_disp, | 124 assert((void*)p->obj_field_addr<oop>((jint)byte_offset) == ptr_plus_disp, |
125 "raw [ptr+disp] must be consistent with oop::field_base"); | 125 "raw [ptr+disp] must be consistent with oop::field_base"); |
126 } | 126 } |
127 jlong p_size = HeapWordSize * (jlong)(p->size()); | |
128 assert(byte_offset < p_size, err_msg("Unsafe access: offset " INT64_FORMAT " > object's size " INT64_FORMAT, byte_offset, p_size)); | |
127 } | 129 } |
128 #endif | 130 #endif |
129 if (sizeof(char*) == sizeof(jint)) // (this constant folds!) | 131 if (sizeof(char*) == sizeof(jint)) // (this constant folds!) |
130 return (address)p + (jint) byte_offset; | 132 return (address)p + (jint) byte_offset; |
131 else | 133 else |