Mercurial > hg > truffle
comparison src/share/vm/classfile/classFileParser.hpp @ 8031:927a311d00f9
8007320: NPG: move method annotations
Summary: allocate method annotations and attach to ConstMethod if present
Reviewed-by: dcubed, jiangli, sspitsyn, iklam
author | coleenp |
---|---|
date | Mon, 11 Feb 2013 14:06:22 -0500 |
parents | 4a916f2ce331 |
children | c8b31b461e1a |
comparison
equal
deleted
inserted
replaced
8030:f989aff6946f | 8031:927a311d00f9 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
197 // Method parsing | 197 // Method parsing |
198 methodHandle parse_method(ClassLoaderData* loader_data, | 198 methodHandle parse_method(ClassLoaderData* loader_data, |
199 constantPoolHandle cp, | 199 constantPoolHandle cp, |
200 bool is_interface, | 200 bool is_interface, |
201 AccessFlags* promoted_flags, | 201 AccessFlags* promoted_flags, |
202 AnnotationArray** method_annotations, | |
203 AnnotationArray** method_parameter_annotations, | |
204 AnnotationArray** method_default_annotations, | |
205 AnnotationArray** method_type_annotations, | |
206 TRAPS); | 202 TRAPS); |
207 Array<Method*>* parse_methods(ClassLoaderData* loader_data, | 203 Array<Method*>* parse_methods(ClassLoaderData* loader_data, |
208 constantPoolHandle cp, | 204 constantPoolHandle cp, |
209 bool is_interface, | 205 bool is_interface, |
210 AccessFlags* promoted_flags, | 206 AccessFlags* promoted_flags, |
211 bool* has_final_method, | 207 bool* has_final_method, |
212 Array<AnnotationArray*>** methods_annotations, | |
213 Array<AnnotationArray*>** methods_parameter_annotations, | |
214 Array<AnnotationArray*>** methods_default_annotations, | |
215 Array<AnnotationArray*>** methods_type_annotations, | |
216 bool* has_default_method, | 208 bool* has_default_method, |
217 TRAPS); | 209 TRAPS); |
218 Array<int>* sort_methods(ClassLoaderData* loader_data, | 210 Array<int>* sort_methods(ClassLoaderData* loader_data, |
219 Array<Method*>* methods, | 211 Array<Method*>* methods, |
220 Array<AnnotationArray*>* methods_annotations, | 212 TRAPS); |
221 Array<AnnotationArray*>* methods_parameter_annotations, | |
222 Array<AnnotationArray*>* methods_default_annotations, | |
223 Array<AnnotationArray*>* methods_type_annotations, | |
224 TRAPS); | |
225 u2* parse_exception_table(ClassLoaderData* loader_data, | 213 u2* parse_exception_table(ClassLoaderData* loader_data, |
226 u4 code_length, u4 exception_table_length, | 214 u4 code_length, u4 exception_table_length, |
227 constantPoolHandle cp, TRAPS); | 215 constantPoolHandle cp, TRAPS); |
228 void parse_linenumber_table( | 216 void parse_linenumber_table( |
229 u4 code_attribute_length, u4 code_length, | 217 u4 code_attribute_length, u4 code_length, |
375 return (EnableInvokeDynamic | 363 return (EnableInvokeDynamic |
376 ? cp->tag_at(index).is_klass_or_reference() | 364 ? cp->tag_at(index).is_klass_or_reference() |
377 : cp->tag_at(index).is_klass_reference()); | 365 : cp->tag_at(index).is_klass_reference()); |
378 } | 366 } |
379 | 367 |
368 void copy_localvariable_table(ConstMethod* cm, int lvt_cnt, | |
369 u2* localvariable_table_length, | |
370 u2** localvariable_table_start, | |
371 int lvtt_cnt, | |
372 u2* localvariable_type_table_length, | |
373 u2** localvariable_type_table_start, | |
374 TRAPS); | |
375 | |
376 void copy_method_annotations(ClassLoaderData* loader_data, | |
377 ConstMethod* cm, | |
378 u1* runtime_visible_annotations, | |
379 int runtime_visible_annotations_length, | |
380 u1* runtime_invisible_annotations, | |
381 int runtime_invisible_annotations_length, | |
382 u1* runtime_visible_parameter_annotations, | |
383 int runtime_visible_parameter_annotations_length, | |
384 u1* runtime_invisible_parameter_annotations, | |
385 int runtime_invisible_parameter_annotations_length, | |
386 u1* runtime_visible_type_annotations, | |
387 int runtime_visible_type_annotations_length, | |
388 u1* runtime_invisible_type_annotations, | |
389 int runtime_invisible_type_annotations_length, | |
390 u1* annotation_default, | |
391 int annotation_default_length, | |
392 TRAPS); | |
393 | |
380 public: | 394 public: |
381 // Constructor | 395 // Constructor |
382 ClassFileParser(ClassFileStream* st) { set_stream(st); } | 396 ClassFileParser(ClassFileStream* st) { set_stream(st); } |
383 | 397 |
384 // Parse .class file and return new Klass*. The Klass* is not hooked up | 398 // Parse .class file and return new Klass*. The Klass* is not hooked up |