1 /*
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
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
21 * questions.
22 *
155 ConstantPool* cp,
156 TRAPS);
157
158 void prepend_host_package_name(const InstanceKlass* host_klass, TRAPS);
159 void fix_anonymous_class_name(TRAPS);
160
161 void fill_instance_klass(InstanceKlass* ik, bool cf_changed_in_CFLH, TRAPS);
162 void set_klass(InstanceKlass* instance);
163
164 void set_class_synthetic_flag(bool x) { _synthetic_flag = x; }
165 void set_class_sourcefile_index(u2 x) { _sourcefile_index = x; }
166 void set_class_generic_signature_index(u2 x) { _generic_signature_index = x; }
167 void set_class_sde_buffer(const char* x, int len) { _sde_buffer = x; _sde_length = len; }
168
169 void create_combined_annotations(TRAPS);
170 void apply_parsed_class_attributes(InstanceKlass* k); // update k
171 void apply_parsed_class_metadata(InstanceKlass* k, int fields_count, TRAPS);
172 void clear_class_metadata();
173
174 // Constant pool parsing
175 void parse_constant_pool_entries(const ClassFileStream* const stream,
176 ConstantPool* cp,
177 const int length,
178 TRAPS);
179
180 void parse_constant_pool(const ClassFileStream* const cfs,
181 ConstantPool* const cp,
182 const int length,
183 TRAPS);
184
185 // Interface parsing
186 void parse_interfaces(const ClassFileStream* const stream,
187 const int itfs_len,
188 ConstantPool* const cp,
189 bool* has_nonstatic_concrete_methods,
190 TRAPS);
191
192 const InstanceKlass* parse_super_class(ConstantPool* const cp,
193 const int super_class_index,
194 const bool need_verify,
195 TRAPS);
196
197 // Field parsing
198 void parse_field_attributes(const ClassFileStream* const cfs,
199 u2 attributes_count,
200 bool is_static,
|
1 /*
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
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
21 * questions.
22 *
155 ConstantPool* cp,
156 TRAPS);
157
158 void prepend_host_package_name(const InstanceKlass* host_klass, TRAPS);
159 void fix_anonymous_class_name(TRAPS);
160
161 void fill_instance_klass(InstanceKlass* ik, bool cf_changed_in_CFLH, TRAPS);
162 void set_klass(InstanceKlass* instance);
163
164 void set_class_synthetic_flag(bool x) { _synthetic_flag = x; }
165 void set_class_sourcefile_index(u2 x) { _sourcefile_index = x; }
166 void set_class_generic_signature_index(u2 x) { _generic_signature_index = x; }
167 void set_class_sde_buffer(const char* x, int len) { _sde_buffer = x; _sde_length = len; }
168
169 void create_combined_annotations(TRAPS);
170 void apply_parsed_class_attributes(InstanceKlass* k); // update k
171 void apply_parsed_class_metadata(InstanceKlass* k, int fields_count, TRAPS);
172 void clear_class_metadata();
173
174 // Constant pool parsing
175
176 // Besides parsing the constant pool entries, if class file version is >= 53
177 // then this function returns either 19 or 20 if it finds a constant pool
178 // entry with either value. Otherwise, it returns zero.
179 int parse_constant_pool_entries(const ClassFileStream* const stream,
180 ConstantPool* cp,
181 const int length,
182 TRAPS);
183
184 // Besides parsing the constant pool, if class file version is >= 53 then
185 // this function returns either 19 or 20 if an entry with that value is
186 // found in the constant pool. Otherwise, it returns zero.
187 int parse_constant_pool(const ClassFileStream* const cfs,
188 ConstantPool* const cp,
189 const int length,
190 TRAPS);
191
192 // Interface parsing
193 void parse_interfaces(const ClassFileStream* const stream,
194 const int itfs_len,
195 ConstantPool* const cp,
196 bool* has_nonstatic_concrete_methods,
197 TRAPS);
198
199 const InstanceKlass* parse_super_class(ConstantPool* const cp,
200 const int super_class_index,
201 const bool need_verify,
202 TRAPS);
203
204 // Field parsing
205 void parse_field_attributes(const ClassFileStream* const cfs,
206 u2 attributes_count,
207 bool is_static,
|