hotspot/src/share/vm/prims/unsafe.cpp
changeset 46630 75aa3e39d02c
parent 46625 edefffab74e2
equal deleted inserted replaced
46629:8eeacdc76bf2 46630:75aa3e39d02c
   110       void* ptr_plus_disp = (address)p + byte_offset;
   110       void* ptr_plus_disp = (address)p + byte_offset;
   111       assert((void*)p->obj_field_addr<oop>((jint)byte_offset) == ptr_plus_disp,
   111       assert((void*)p->obj_field_addr<oop>((jint)byte_offset) == ptr_plus_disp,
   112              "raw [ptr+disp] must be consistent with oop::field_base");
   112              "raw [ptr+disp] must be consistent with oop::field_base");
   113     }
   113     }
   114     jlong p_size = HeapWordSize * (jlong)(p->size());
   114     jlong p_size = HeapWordSize * (jlong)(p->size());
   115     assert(byte_offset < p_size, "Unsafe access: offset " INT64_FORMAT " > object's size " INT64_FORMAT, byte_offset, p_size);
   115     assert(byte_offset < p_size, "Unsafe access: offset " INT64_FORMAT " > object's size " INT64_FORMAT, (int64_t)byte_offset, (int64_t)p_size);
   116   }
   116   }
   117 #endif
   117 #endif
   118 
   118 
   119   if (sizeof(char*) == sizeof(jint)) {   // (this constant folds!)
   119   if (sizeof(char*) == sizeof(jint)) {   // (this constant folds!)
   120     return (address)p + (jint) byte_offset;
   120     return (address)p + (jint) byte_offset;