Mercurial > hg > graal-jvmci-8
diff src/share/vm/classfile/classFileParser.cpp @ 1846:d55217dc206f
6829194: JSR 292 needs to support compressed oops
Reviewed-by: kvn, jrose
author | twisti |
---|---|
date | Mon, 11 Oct 2010 04:18:58 -0700 |
parents | 0e35fa8ebccd |
children | a932f331ef90 |
line wrap: on
line diff
--- a/src/share/vm/classfile/classFileParser.cpp Fri Oct 08 02:42:17 2010 -0700 +++ b/src/share/vm/classfile/classFileParser.cpp Mon Oct 11 04:18:58 2010 -0700 @@ -2702,13 +2702,15 @@ // Adjust the field type from byte to an unmanaged pointer. assert(fac_ptr->nonstatic_byte_count > 0, ""); fac_ptr->nonstatic_byte_count -= 1; - (*fields_ptr)->ushort_at_put(i + instanceKlass::signature_index_offset, - word_sig_index); - fac_ptr->nonstatic_word_count += 1; + + (*fields_ptr)->ushort_at_put(i + instanceKlass::signature_index_offset, word_sig_index); + if (UseCompressedOops) fac_ptr->nonstatic_double_count += 1; + else fac_ptr->nonstatic_word_count += 1; FieldAllocationType atype = (FieldAllocationType) (*fields_ptr)->ushort_at(i + instanceKlass::low_offset); assert(atype == NONSTATIC_BYTE, ""); - FieldAllocationType new_atype = NONSTATIC_WORD; + FieldAllocationType new_atype = (wordSize == longSize) ? NONSTATIC_DOUBLE : NONSTATIC_WORD; + assert(wordSize == longSize || wordSize == jintSize, "ILP32 or LP64"); (*fields_ptr)->ushort_at_put(i + instanceKlass::low_offset, new_atype); found_vmentry = true;