2204N/A * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// ciExceptionHandlerStream 0N/A// Walk over some selected set of a methods exception handlers. 0N/A// ------------------------------------------------------------------ 0N/A// ciExceptionHandlerStream::count 0N/A// How many exception handlers are there in this stream? 0N/A// Implementation note: Compiler2 needs this functionality, so I had 0N/A// The class is used to iterate over the bytecodes of a method. 0N/A// providing accessors for constant pool items. 0N/A// ------------------------------------------------------------------ 1485N/A// ciBytecodeStream::next_wide_or_table 0N/A// Special handling for switch ops 1485N/A switch (
bc) {
// Check for special bytecode handling 1485N/A // Special handling for the wide bytcode 1485N/A // Get following bytecode; do not return wide 0N/A // table_base[0] is default far_dest 0N/A // Table has 2 lead elements (default, length), then pairs of u4 values. 0N/A // So load table length, and compute address at end of table 0N/A // table_base[0] is default far_dest 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::reset_to_bci 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::force_bci 0N/A// ------------------------------------------------------------------ 0N/A// Constant pool access 0N/A// ------------------------------------------------------------------ 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::get_klass_index 0N/A// If this bytecodes references a klass, return the index of the 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::get_klass 0N/A// If this bytecode is a new, newarray, multianewarray, instanceof, 0N/A// or checkcast, get the referenced klass. 0N/A// ------------------------------------------------------------------ 1522N/A// ciBytecodeStream::get_constant_raw_index 0N/A// If this bytecode is one of the ldc variants, get the index of the 0N/A// referenced constant. 1522N/A // work-alike for Bytecode_loadconstant::raw_index() 1522N/A// ------------------------------------------------------------------ 1522N/A// ciBytecodeStream::get_constant_pool_index 1522N/A// Decode any CP cache index into a regular pool index. 1522N/A // work-alike for Bytecode_loadconstant::pool_index() 1522N/A// ------------------------------------------------------------------ 1522N/A// ciBytecodeStream::get_constant_cache_index 1522N/A// Return the CP cache index, or -1 if there isn't any. 1522N/A // work-alike for Bytecode_loadconstant::cache_index() 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::get_constant 0N/A// If this bytecode is one of the ldc variants, get the referenced 0N/A// ------------------------------------------------------------------ 1522N/A// ciBytecodeStream::get_constant_pool_tag 1522N/A// If this bytecode is one of the ldc variants, get the referenced 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::get_field_index 0N/A// If this is a field access bytecode, get the constant pool 0N/A// index of the referenced field. 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::get_field 0N/A// If this bytecode is one of get_field, get_static, put_field, 0N/A// or put_static, get the referenced field. 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::get_declared_field_holder 0N/A// Get the declared holder of the currently referenced field. 0N/A// Usage note: the holder() of a ciField class returns the canonical 0N/A// holder of the field, rather than the holder declared in the 0N/A// There is no "will_link" result passed back. The user is responsible 0N/A// for checking linkability when retrieving the associated field. 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::get_field_holder_index 0N/A// Get the constant pool index of the declared holder of the field 0N/A// referenced by the current bytecode. Used for generating 0N/A// deoptimization information. 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::get_field_signature_index 0N/A// Get the constant pool index of the signature of the field 0N/A// referenced by the current bytecode. Used for generating 0N/A// deoptimization information. 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::get_method_index 0N/A// If this is a method invocation bytecode, get the constant pool 0N/A// index of the invoked method. 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::get_method 0N/A// If this is a method invocation bytecode, get the invoked method. 3984N/A// Additionally return the declared signature to get more concrete 3984N/A// type information if required (Cf. invokedynamic and invokehandle). 4048N/A // Use the MethodType stored in the CP cache to create a signature 4048N/A // with correct types (in respect to class loaders). 0N/A// ------------------------------------------------------------------ 3932N/A// ciBytecodeStream::has_appendix 3932N/A// Returns true if there is an appendix argument stored in the 3932N/A// constant pool cache at the current bci. 3932N/A// ------------------------------------------------------------------ 3932N/A// ciBytecodeStream::get_appendix 3932N/A// Return the appendix argument stored in the constant pool cache at 3932N/A// ------------------------------------------------------------------ 4048N/A// ciBytecodeStream::has_method_type 4048N/A// Returns true if there is a MethodType argument stored in the 4048N/A// constant pool cache at the current bci. 4048N/A// ------------------------------------------------------------------ 4048N/A// ciBytecodeStream::get_method_type 4048N/A// Return the MethodType stored in the constant pool cache at 4048N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::get_declared_method_holder 0N/A// Get the declared holder of the currently referenced method. 0N/A// Usage note: the holder() of a ciMethod class returns the canonical 0N/A// holder of the method, rather than the holder declared in the 0N/A// There is no "will_link" result passed back. The user is responsible 0N/A// for checking linkability when retrieving the associated method. 3932N/A // report as MethodHandle for invokedynamic, which is syntactically classless 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::get_method_holder_index 0N/A// Get the constant pool index of the declared holder of the method 0N/A// referenced by the current bytecode. Used for generating 0N/A// deoptimization information. 0N/A// ------------------------------------------------------------------ 0N/A// ciBytecodeStream::get_method_signature_index 0N/A// Get the constant pool index of the signature of the method 0N/A// referenced by the current bytecode. Used for generating 0N/A// deoptimization information. 1137N/A// ------------------------------------------------------------------ 1137N/A// ciBytecodeStream::get_cpcache 1138N/A// ------------------------------------------------------------------ 1138N/A// ciBytecodeStream::get_call_site 1138N/A // Get the CallSite from the constant pool cache. 1138N/A // Create a CallSite object and return it.