1 /*
2 * Copyright (c) 1999, 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 *
230 int get_constant_cache_index() const;
231 int get_field_index();
232 int get_method_index();
233
234 // If this bytecode is a new, newarray, multianewarray, instanceof,
235 // or checkcast, get the referenced klass.
236 ciKlass* get_klass(bool& will_link);
237 int get_klass_index() const;
238
239 // If this bytecode is one of the ldc variants, get the referenced
240 // constant. Do not attempt to resolve it, since that would require
241 // execution of Java code. If it is not resolved, return an unloaded
242 // object (ciConstant.as_object()->is_loaded() == false).
243 ciConstant get_constant();
244 constantTag get_constant_pool_tag(int index) const;
245
246 // True if the klass-using bytecode points to an unresolved klass
247 bool is_unresolved_klass() const {
248 constantTag tag = get_constant_pool_tag(get_klass_index());
249 return tag.is_unresolved_klass();
250 }
251
252 // True if the klass-using bytecode points to an unresolved value type
253 bool is_unresolved_value_type() const {
254 constantTag tag = get_constant_pool_tag(get_klass_index());
255 return tag.is_unresolved_value_type();
256 }
257
258 // If this bytecode is one of get_field, get_static, put_field,
259 // or put_static, get the referenced field.
260 ciField* get_field(bool& will_link);
261
262 ciInstanceKlass* get_declared_field_holder();
263 int get_field_holder_index();
264 int get_field_signature_index();
265
266 ciMethod* get_method(bool& will_link, ciSignature* *declared_signature_result);
267 bool has_appendix();
268 ciObject* get_appendix();
269 bool has_method_type();
270 ciMethodType* get_method_type();
271 ciKlass* get_declared_method_holder();
272 int get_method_holder_index();
273 int get_method_signature_index(const constantPoolHandle& cpool);
274
275 // Get the resolved references arrays from the constant pool
|
1 /*
2 * Copyright (c) 1999, 2018, 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 *
230 int get_constant_cache_index() const;
231 int get_field_index();
232 int get_method_index();
233
234 // If this bytecode is a new, newarray, multianewarray, instanceof,
235 // or checkcast, get the referenced klass.
236 ciKlass* get_klass(bool& will_link);
237 int get_klass_index() const;
238
239 // If this bytecode is one of the ldc variants, get the referenced
240 // constant. Do not attempt to resolve it, since that would require
241 // execution of Java code. If it is not resolved, return an unloaded
242 // object (ciConstant.as_object()->is_loaded() == false).
243 ciConstant get_constant();
244 constantTag get_constant_pool_tag(int index) const;
245
246 // True if the klass-using bytecode points to an unresolved klass
247 bool is_unresolved_klass() const {
248 constantTag tag = get_constant_pool_tag(get_klass_index());
249 return tag.is_unresolved_klass();
250 }
251
252 // If this bytecode is one of get_field, get_static, put_field,
253 // or put_static, get the referenced field.
254 ciField* get_field(bool& will_link);
255
256 ciInstanceKlass* get_declared_field_holder();
257 int get_field_holder_index();
258 int get_field_signature_index();
259
260 ciMethod* get_method(bool& will_link, ciSignature* *declared_signature_result);
261 bool has_appendix();
262 ciObject* get_appendix();
263 bool has_method_type();
264 ciMethodType* get_method_type();
265 ciKlass* get_declared_method_holder();
266 int get_method_holder_index();
267 int get_method_signature_index(const constantPoolHandle& cpool);
268
269 // Get the resolved references arrays from the constant pool
|