src/share/vm/classfile/classFileParser.cpp

changeset 8316
626f594dffa6
parent 8049
c2c7fed86a5e
child 8415
d109bda16490
     1.1 --- a/src/share/vm/classfile/classFileParser.cpp	Thu Feb 18 16:15:28 2016 +0100
     1.2 +++ b/src/share/vm/classfile/classFileParser.cpp	Tue Mar 01 12:50:37 2016 +0530
     1.3 @@ -3190,19 +3190,19 @@
     1.4  
     1.5    // Field size and offset computation
     1.6    int nonstatic_field_size = _super_klass() == NULL ? 0 : _super_klass()->nonstatic_field_size();
     1.7 -  int next_static_oop_offset;
     1.8 -  int next_static_double_offset;
     1.9 -  int next_static_word_offset;
    1.10 -  int next_static_short_offset;
    1.11 -  int next_static_byte_offset;
    1.12 -  int next_nonstatic_oop_offset;
    1.13 -  int next_nonstatic_double_offset;
    1.14 -  int next_nonstatic_word_offset;
    1.15 -  int next_nonstatic_short_offset;
    1.16 -  int next_nonstatic_byte_offset;
    1.17 -  int first_nonstatic_oop_offset;
    1.18 -  int next_nonstatic_field_offset;
    1.19 -  int next_nonstatic_padded_offset;
    1.20 +  int next_static_oop_offset = 0;
    1.21 +  int next_static_double_offset = 0;
    1.22 +  int next_static_word_offset = 0;
    1.23 +  int next_static_short_offset = 0;
    1.24 +  int next_static_byte_offset = 0;
    1.25 +  int next_nonstatic_oop_offset = 0;
    1.26 +  int next_nonstatic_double_offset = 0;
    1.27 +  int next_nonstatic_word_offset = 0;
    1.28 +  int next_nonstatic_short_offset = 0;
    1.29 +  int next_nonstatic_byte_offset = 0;
    1.30 +  int first_nonstatic_oop_offset = 0;
    1.31 +  int next_nonstatic_field_offset = 0;
    1.32 +  int next_nonstatic_padded_offset = 0;
    1.33  
    1.34    // Count the contended fields by type.
    1.35    //
    1.36 @@ -3355,14 +3355,14 @@
    1.37      ShouldNotReachHere();
    1.38    }
    1.39  
    1.40 -  int nonstatic_oop_space_count   = 0;
    1.41 -  int nonstatic_word_space_count  = 0;
    1.42 -  int nonstatic_short_space_count = 0;
    1.43 -  int nonstatic_byte_space_count  = 0;
    1.44 -  int nonstatic_oop_space_offset;
    1.45 -  int nonstatic_word_space_offset;
    1.46 -  int nonstatic_short_space_offset;
    1.47 -  int nonstatic_byte_space_offset;
    1.48 +  int nonstatic_oop_space_count    = 0;
    1.49 +  int nonstatic_word_space_count   = 0;
    1.50 +  int nonstatic_short_space_count  = 0;
    1.51 +  int nonstatic_byte_space_count   = 0;
    1.52 +  int nonstatic_oop_space_offset   = 0;
    1.53 +  int nonstatic_word_space_offset  = 0;
    1.54 +  int nonstatic_short_space_offset = 0;
    1.55 +  int nonstatic_byte_space_offset  = 0;
    1.56  
    1.57    // Try to squeeze some of the fields into the gaps due to
    1.58    // long/double alignment.
    1.59 @@ -3434,7 +3434,7 @@
    1.60      // contended instance fields are handled below
    1.61      if (fs.is_contended() && !fs.access_flags().is_static()) continue;
    1.62  
    1.63 -    int real_offset;
    1.64 +    int real_offset = 0;
    1.65      FieldAllocationType atype = (FieldAllocationType) fs.allocation_type();
    1.66  
    1.67      // pack the rest of the fields
    1.68 @@ -3567,7 +3567,7 @@
    1.69          // handle statics below
    1.70          if (fs.access_flags().is_static()) continue;
    1.71  
    1.72 -        int real_offset;
    1.73 +        int real_offset = 0;
    1.74          FieldAllocationType atype = (FieldAllocationType) fs.allocation_type();
    1.75  
    1.76          switch (atype) {

mercurial