equal
deleted
inserted
replaced
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 { |