< prev index next >

src/share/vm/classfile/classFileParser.cpp

Print this page
rev 9088 : 8139040: Fix initializations before ShouldNotReachHere() etc. and enable -Wuninitialized on linux.
Reviewed-by: stuefe, coleenp

*** 3199,3221 **** FieldLayoutInfo* info, TRAPS) { // Field size and offset computation int nonstatic_field_size = _super_klass() == NULL ? 0 : _super_klass()->nonstatic_field_size(); ! int next_static_oop_offset; ! int next_static_double_offset; ! int next_static_word_offset; ! int next_static_short_offset; ! int next_static_byte_offset; ! int next_nonstatic_oop_offset; ! int next_nonstatic_double_offset; ! int next_nonstatic_word_offset; ! int next_nonstatic_short_offset; ! int next_nonstatic_byte_offset; ! int first_nonstatic_oop_offset; ! int next_nonstatic_field_offset; ! int next_nonstatic_padded_offset; // Count the contended fields by type. // // We ignore static fields, because @Contended is not supported for them. // The layout code below will also ignore the static fields. --- 3199,3221 ---- FieldLayoutInfo* info, TRAPS) { // Field size and offset computation int nonstatic_field_size = _super_klass() == NULL ? 0 : _super_klass()->nonstatic_field_size(); ! int next_static_oop_offset = 0; ! int next_static_double_offset = 0; ! int next_static_word_offset = 0; ! int next_static_short_offset = 0; ! int next_static_byte_offset = 0; ! int next_nonstatic_oop_offset = 0; ! int next_nonstatic_double_offset = 0; ! int next_nonstatic_word_offset = 0; ! int next_nonstatic_short_offset = 0; ! int next_nonstatic_byte_offset = 0; ! int first_nonstatic_oop_offset = 0; ! int next_nonstatic_field_offset = 0; ! int next_nonstatic_padded_offset = 0; // Count the contended fields by type. // // We ignore static fields, because @Contended is not supported for them. // The layout code below will also ignore the static fields.
*** 3368,3381 **** int nonstatic_oop_space_count = 0; int nonstatic_word_space_count = 0; int nonstatic_short_space_count = 0; int nonstatic_byte_space_count = 0; ! int nonstatic_oop_space_offset; ! int nonstatic_word_space_offset; ! int nonstatic_short_space_offset; ! int nonstatic_byte_space_offset; // Try to squeeze some of the fields into the gaps due to // long/double alignment. if( nonstatic_double_count > 0 ) { int offset = next_nonstatic_double_offset; --- 3368,3381 ---- int nonstatic_oop_space_count = 0; int nonstatic_word_space_count = 0; int nonstatic_short_space_count = 0; int nonstatic_byte_space_count = 0; ! int nonstatic_oop_space_offset = 0; ! int nonstatic_word_space_offset = 0; ! int nonstatic_short_space_offset = 0; ! int nonstatic_byte_space_offset = 0; // Try to squeeze some of the fields into the gaps due to // long/double alignment. if( nonstatic_double_count > 0 ) { int offset = next_nonstatic_double_offset;
*** 3443,3453 **** if (fs.is_offset_set()) continue; // contended instance fields are handled below if (fs.is_contended() && !fs.access_flags().is_static()) continue; ! int real_offset; FieldAllocationType atype = (FieldAllocationType) fs.allocation_type(); // pack the rest of the fields switch (atype) { case STATIC_OOP: --- 3443,3453 ---- if (fs.is_offset_set()) continue; // contended instance fields are handled below if (fs.is_contended() && !fs.access_flags().is_static()) continue; ! int real_offset = 0; FieldAllocationType atype = (FieldAllocationType) fs.allocation_type(); // pack the rest of the fields switch (atype) { case STATIC_OOP:
*** 3577,3587 **** if (!fs.is_contended() || (fs.contended_group() != current_group)) continue; // handle statics below if (fs.access_flags().is_static()) continue; ! int real_offset; FieldAllocationType atype = (FieldAllocationType) fs.allocation_type(); switch (atype) { case NONSTATIC_BYTE: next_nonstatic_padded_offset = align_size_up(next_nonstatic_padded_offset, 1); --- 3577,3587 ---- if (!fs.is_contended() || (fs.contended_group() != current_group)) continue; // handle statics below if (fs.access_flags().is_static()) continue; ! int real_offset = 0; FieldAllocationType atype = (FieldAllocationType) fs.allocation_type(); switch (atype) { case NONSTATIC_BYTE: next_nonstatic_padded_offset = align_size_up(next_nonstatic_padded_offset, 1);
< prev index next >