Mercurial > hg > truffle
diff src/share/vm/ci/ciInstanceKlass.cpp @ 165:437d03ea40b1
6703888: Compressed Oops: use the 32-bits gap after klass in a object
Summary: Use the gap also for a narrow oop field and a boxing object value.
Reviewed-by: coleenp, never
author | kvn |
---|---|
date | Wed, 21 May 2008 16:31:35 -0700 |
parents | ba764ed4b6f2 |
children | d1605aabd0a1 |
line wrap: on
line diff
--- a/src/share/vm/ci/ciInstanceKlass.cpp Wed May 21 13:46:23 2008 -0700 +++ b/src/share/vm/ci/ciInstanceKlass.cpp Wed May 21 16:31:35 2008 -0700 @@ -392,12 +392,12 @@ assert(!is_java_lang_Object(), "bootstrap OK"); // Size in bytes of my fields, including inherited fields. - int fsize = nonstatic_field_size() * wordSize; + int fsize = nonstatic_field_size() * heapOopSize; ciInstanceKlass* super = this->super(); GrowableArray<ciField*>* super_fields = NULL; if (super != NULL && super->has_nonstatic_fields()) { - int super_fsize = super->nonstatic_field_size() * wordSize; + int super_fsize = super->nonstatic_field_size() * heapOopSize; int super_flen = super->nof_nonstatic_fields(); super_fields = super->_nonstatic_fields; assert(super_flen == 0 || super_fields != NULL, "first get nof_fields"); @@ -438,7 +438,7 @@ // This is a minor inefficiency classFileParser.cpp. last_offset = offset + size; } - assert(last_offset <= (int)sizeof(oopDesc) + fsize, "no overflow"); + assert(last_offset <= (int)instanceOopDesc::base_offset_in_bytes() + fsize, "no overflow"); #endif _nonstatic_fields = fields;