/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "interpreter/bytecode.hpp"
#include "interpreter/linkResolver.hpp"
#include "oops/constantPoolOop.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/fieldType.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/safepoint.hpp"
#include "runtime/signature.hpp"
// Implementation of Bytecode
#ifdef ASSERT
if (is_wide) {
}
}
// Not an offset field:
Bytecodes::_fmt_has_o));
switch (size) {
case 1: need_fmt = 0; break;
}
tty->print_cr("assert_index_size %d: bc=%d%s %d != %d", size, bc, (is_wide?"/wide":""), have_fmt, need_fmt);
}
}
switch (size) {
}
tty->print_cr("assert_offset_size %d: bc=%d%s %d != %d", size, bc, (is_wide?"/wide":""), have_fmt, need_fmt);
}
}
// Ignore any 'i' field (for iinc):
& ~Bytecodes::_fmt_has_i);
switch (size) {
}
tty->print_cr("assert_constant_size %d @%d: bc=%d%s %d != %d", size, where, bc, (is_wide?"/wide":""), have_fmt, need_fmt);
}
}
}
#endif //ASSERT
// Implementation of Bytecode_tableupswitch
}
// Implementation of Bytecode_invoke
}
}
}
}
}
methodHandle m;
LinkResolver::resolve_method_statically(m, resolved_klass, bc, constants, index(), CHECK_(methodHandle()));
return m;
}
if (cpce->has_appendix())
return Handle(); // usual case
}
// Note: Rewriter::rewrite changes the Java_u2 of an invokedynamic to a native_u4,
// at the same time it allocates per-call-site CP cache entries.
if (has_index_u4(rawc))
return get_index_u4(rawc);
else
return get_index_u2_cpcache(rawc);
}
return cpcache_entry()->constant_pool_index();
}
if (!has_index_u4(code()))
});
}
// Implementation of Bytecode_field
}
// Implementation of Bytecode_loadconstant
return get_index_u1(rawc);
else
return get_index_u2(rawc, false);
}
if (has_cache_index()) {
}
return index;
}
return tag.basic_type();
}
if (has_cache_index()) {
} else {
}
}
//------------------------------------------------------------------------------
// Non-product code
#ifndef PRODUCT
case Bytecodes::_lookupswitch:
{ int i = number_of_pairs() - 1;
while (i-- > 0) {
}
}
break;
default:
fatal("not a lookupswitch bytecode");
}
}
case Bytecodes::_tableswitch:
while (i-- > 0) {
// no special check needed
}
}
break;
default:
fatal("not a tableswitch bytecode");
}
}
#endif