comparison src/share/vm/classfile/classFileParser.hpp @ 2044:06f017f7daa7

Merge.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Fri, 07 Jan 2011 18:18:08 +0100
parents dad31fc330cd
children 3582bf76420e
comparison
equal deleted inserted replaced
1942:00bc9eaf0e24 2044:06f017f7daa7
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 * 22 *
23 */ 23 */
24
25 #ifndef SHARE_VM_CLASSFILE_CLASSFILEPARSER_HPP
26 #define SHARE_VM_CLASSFILE_CLASSFILEPARSER_HPP
27
28 #include "classfile/classFileStream.hpp"
29 #include "memory/resourceArea.hpp"
30 #include "oops/oop.inline.hpp"
31 #include "oops/typeArrayOop.hpp"
32 #include "runtime/handles.inline.hpp"
33 #include "utilities/accessFlags.hpp"
24 34
25 // Parser for for .class files 35 // Parser for for .class files
26 // 36 //
27 // The bytes describing the class file structure is read from a Stream object 37 // The bytes describing the class file structure is read from a Stream object
28 38
38 48
39 bool _has_finalizer; 49 bool _has_finalizer;
40 bool _has_empty_finalizer; 50 bool _has_empty_finalizer;
41 bool _has_vanilla_constructor; 51 bool _has_vanilla_constructor;
42 52
53 int _max_bootstrap_specifier_index;
54
43 enum { fixed_buffer_size = 128 }; 55 enum { fixed_buffer_size = 128 };
44 u_char linenumbertable_buffer[fixed_buffer_size]; 56 u_char linenumbertable_buffer[fixed_buffer_size];
45 57
46 ClassFileStream* _stream; // Actual input stream 58 ClassFileStream* _stream; // Actual input stream
47 59
53 65
54 // Constant pool parsing 66 // Constant pool parsing
55 void parse_constant_pool_entries(constantPoolHandle cp, int length, TRAPS); 67 void parse_constant_pool_entries(constantPoolHandle cp, int length, TRAPS);
56 68
57 constantPoolHandle parse_constant_pool(TRAPS); 69 constantPoolHandle parse_constant_pool(TRAPS);
58
59 static int start_operand_group(GrowableArray<int>* &operands, int op_count, TRAPS);
60 static void store_operand_array(GrowableArray<int>* operands, constantPoolHandle cp, TRAPS);
61 70
62 // Interface parsing 71 // Interface parsing
63 objArrayHandle parse_interfaces(constantPoolHandle cp, 72 objArrayHandle parse_interfaces(constantPoolHandle cp,
64 int length, 73 int length,
65 Handle class_loader, 74 Handle class_loader,
118 u2 parse_classfile_inner_classes_attribute(constantPoolHandle cp, 127 u2 parse_classfile_inner_classes_attribute(constantPoolHandle cp,
119 instanceKlassHandle k, TRAPS); 128 instanceKlassHandle k, TRAPS);
120 void parse_classfile_attributes(constantPoolHandle cp, instanceKlassHandle k, TRAPS); 129 void parse_classfile_attributes(constantPoolHandle cp, instanceKlassHandle k, TRAPS);
121 void parse_classfile_synthetic_attribute(constantPoolHandle cp, instanceKlassHandle k, TRAPS); 130 void parse_classfile_synthetic_attribute(constantPoolHandle cp, instanceKlassHandle k, TRAPS);
122 void parse_classfile_signature_attribute(constantPoolHandle cp, instanceKlassHandle k, TRAPS); 131 void parse_classfile_signature_attribute(constantPoolHandle cp, instanceKlassHandle k, TRAPS);
132 void parse_classfile_bootstrap_methods_attribute(constantPoolHandle cp, instanceKlassHandle k, u4 attribute_length, TRAPS);
123 133
124 // Annotations handling 134 // Annotations handling
125 typeArrayHandle assemble_annotations(u1* runtime_visible_annotations, 135 typeArrayHandle assemble_annotations(u1* runtime_visible_annotations,
126 int runtime_visible_annotations_length, 136 int runtime_visible_annotations_length,
127 u1* runtime_invisible_annotations, 137 u1* runtime_invisible_annotations,
284 static void check_super_class_access(instanceKlassHandle this_klass, TRAPS); 294 static void check_super_class_access(instanceKlassHandle this_klass, TRAPS);
285 static void check_super_interface_access(instanceKlassHandle this_klass, TRAPS); 295 static void check_super_interface_access(instanceKlassHandle this_klass, TRAPS);
286 static void check_final_method_override(instanceKlassHandle this_klass, TRAPS); 296 static void check_final_method_override(instanceKlassHandle this_klass, TRAPS);
287 static void check_illegal_static_method(instanceKlassHandle this_klass, TRAPS); 297 static void check_illegal_static_method(instanceKlassHandle this_klass, TRAPS);
288 }; 298 };
299
300 #endif // SHARE_VM_CLASSFILE_CLASSFILEPARSER_HPP