hotspot/src/share/vm/oops/constMethod.cpp
changeset 46619 a3919f5e8d2b
parent 45240 e804b9d60859
child 46625 edefffab74e2
equal deleted inserted replaced
46618:d503911aa948 46619:a3919f5e8d2b
   126     extra_bytes += sizeof(u2);
   126     extra_bytes += sizeof(u2);
   127     extra_bytes += sizes->method_parameters_length() * sizeof(MethodParametersElement);
   127     extra_bytes += sizes->method_parameters_length() * sizeof(MethodParametersElement);
   128   }
   128   }
   129 
   129 
   130   // Align sizes up to a word.
   130   // Align sizes up to a word.
   131   extra_bytes = align_size_up(extra_bytes, BytesPerWord);
   131   extra_bytes = align_up(extra_bytes, BytesPerWord);
   132 
   132 
   133   // One pointer per annotation array
   133   // One pointer per annotation array
   134   if (sizes->method_annotations_length() > 0) {
   134   if (sizes->method_annotations_length() > 0) {
   135     extra_bytes += sizeof(AnnotationArray*);
   135     extra_bytes += sizeof(AnnotationArray*);
   136   }
   136   }
   142   }
   142   }
   143   if (sizes->default_annotations_length() > 0) {
   143   if (sizes->default_annotations_length() > 0) {
   144     extra_bytes += sizeof(AnnotationArray*);
   144     extra_bytes += sizeof(AnnotationArray*);
   145   }
   145   }
   146 
   146 
   147   int extra_words = align_size_up(extra_bytes, BytesPerWord) / BytesPerWord;
   147   int extra_words = align_up(extra_bytes, BytesPerWord) / BytesPerWord;
   148   assert(extra_words == extra_bytes/BytesPerWord, "should already be aligned");
   148   assert(extra_words == extra_bytes/BytesPerWord, "should already be aligned");
   149   return align_metadata_size(header_size() + extra_words);
   149   return align_metadata_size(header_size() + extra_words);
   150 }
   150 }
   151 
   151 
   152 Method* ConstMethod::method() const {
   152 Method* ConstMethod::method() const {