diff -r 2954744d7bba -r 04d2e26e6d69 hotspot/src/share/vm/oops/instanceOop.hpp --- a/hotspot/src/share/vm/oops/instanceOop.hpp Wed May 21 13:46:23 2008 -0700 +++ b/hotspot/src/share/vm/oops/instanceOop.hpp Wed May 21 16:31:35 2008 -0700 @@ -39,14 +39,7 @@ static bool contains_field_offset(int offset, int nonstatic_field_size) { int base_in_bytes = base_offset_in_bytes(); - if (UseCompressedOops) { - return (offset >= base_in_bytes && - // field can be embedded in header, or is after header. - (offset < (int)sizeof(instanceOopDesc) || - (offset-(int)sizeof(instanceOopDesc))/wordSize < nonstatic_field_size)); - } else { - return (offset >= base_in_bytes && - (offset-base_in_bytes)/wordSize < nonstatic_field_size); - } + return (offset >= base_in_bytes && + (offset-base_in_bytes) < nonstatic_field_size * heapOopSize); } };