1612N/A/*
1879N/A * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
1612N/A * Copyright 2008, 2009, 2010 Red Hat, Inc.
1612N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1612N/A *
1612N/A * This code is free software; you can redistribute it and/or modify it
1612N/A * under the terms of the GNU General Public License version 2 only, as
1612N/A * published by the Free Software Foundation.
1612N/A *
1612N/A * This code is distributed in the hope that it will be useful, but WITHOUT
1612N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1612N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1612N/A * version 2 for more details (a copy is included in the LICENSE file that
1612N/A * accompanied this code).
1612N/A *
1612N/A * You should have received a copy of the GNU General Public License version
1612N/A * 2 along with this work; if not, write to the Free Software Foundation,
1612N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1612N/A *
1612N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1612N/A * or visit www.oracle.com if you need additional information or have any
1612N/A * questions.
1612N/A *
1612N/A */
1612N/A
1879N/A#include "precompiled.hpp"
1879N/A#include "interpreter/bytecodes.hpp"
1879N/A#include "shark/llvmHeaders.hpp"
1879N/A#include "shark/llvmValue.hpp"
1879N/A#include "shark/sharkBlock.hpp"
1879N/A#include "shark/sharkBuilder.hpp"
1879N/A#include "shark/sharkConstant.hpp"
1879N/A#include "shark/sharkState.hpp"
1879N/A#include "shark/sharkValue.hpp"
1879N/A#include "shark/shark_globals.hpp"
1879N/A#include "utilities/debug.hpp"
1612N/A
1612N/Ausing namespace llvm;
1612N/A
1612N/Avoid SharkBlock::parse_bytecode(int start, int limit) {
1612N/A SharkValue *a, *b, *c, *d;
1612N/A int i;
1612N/A
1612N/A // Ensure the current state is initialized before we emit any code,
1612N/A // so that any setup code for the state is at the start of the block
1612N/A current_state();
1612N/A
1612N/A // Parse the bytecodes
1612N/A iter()->reset_to_bci(start);
1612N/A while (iter()->next_bci() < limit) {
1612N/A NOT_PRODUCT(a = b = c = d = NULL);
1612N/A iter()->next();
1612N/A
1612N/A if (SharkTraceBytecodes)
1612N/A tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc()));
1612N/A
1612N/A if (has_trap() && trap_bci() == bci()) {
1612N/A do_trap(trap_request());
1612N/A return;
1612N/A }
1612N/A
1612N/A if (UseLoopSafepoints) {
1612N/A // XXX if a lcmp is followed by an if_?? then C2 maybe-inserts
1612N/A // the safepoint before the lcmp rather than before the if.
1612N/A // Maybe we should do this too. See parse2.cpp for details.
1612N/A switch (bc()) {
1612N/A case Bytecodes::_goto:
1612N/A case Bytecodes::_ifnull:
1612N/A case Bytecodes::_ifnonnull:
1612N/A case Bytecodes::_if_acmpeq:
1612N/A case Bytecodes::_if_acmpne:
1612N/A case Bytecodes::_ifeq:
1612N/A case Bytecodes::_ifne:
1612N/A case Bytecodes::_iflt:
1612N/A case Bytecodes::_ifle:
1612N/A case Bytecodes::_ifgt:
1612N/A case Bytecodes::_ifge:
1612N/A case Bytecodes::_if_icmpeq:
1612N/A case Bytecodes::_if_icmpne:
1612N/A case Bytecodes::_if_icmplt:
1612N/A case Bytecodes::_if_icmple:
1612N/A case Bytecodes::_if_icmpgt:
1612N/A case Bytecodes::_if_icmpge:
1612N/A if (iter()->get_dest() <= bci())
1612N/A maybe_add_backedge_safepoint();
1612N/A break;
1612N/A
1612N/A case Bytecodes::_goto_w:
1612N/A if (iter()->get_far_dest() <= bci())
1612N/A maybe_add_backedge_safepoint();
1612N/A break;
1612N/A
1612N/A case Bytecodes::_tableswitch:
1612N/A case Bytecodes::_lookupswitch:
1612N/A if (switch_default_dest() <= bci()) {
1612N/A maybe_add_backedge_safepoint();
1612N/A break;
1612N/A }
1612N/A int len = switch_table_length();
1612N/A for (int i = 0; i < len; i++) {
1612N/A if (switch_dest(i) <= bci()) {
1612N/A maybe_add_backedge_safepoint();
1612N/A break;
1612N/A }
1612N/A }
1612N/A break;
1612N/A }
1612N/A }
1612N/A
1612N/A switch (bc()) {
1612N/A case Bytecodes::_nop:
1612N/A break;
1612N/A
1612N/A case Bytecodes::_aconst_null:
1612N/A push(SharkValue::null());
1612N/A break;
1612N/A
1612N/A case Bytecodes::_iconst_m1:
1612N/A push(SharkValue::jint_constant(-1));
1612N/A break;
1612N/A case Bytecodes::_iconst_0:
1612N/A push(SharkValue::jint_constant(0));
1612N/A break;
1612N/A case Bytecodes::_iconst_1:
1612N/A push(SharkValue::jint_constant(1));
1612N/A break;
1612N/A case Bytecodes::_iconst_2:
1612N/A push(SharkValue::jint_constant(2));
1612N/A break;
1612N/A case Bytecodes::_iconst_3:
1612N/A push(SharkValue::jint_constant(3));
1612N/A break;
1612N/A case Bytecodes::_iconst_4:
1612N/A push(SharkValue::jint_constant(4));
1612N/A break;
1612N/A case Bytecodes::_iconst_5:
1612N/A push(SharkValue::jint_constant(5));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_lconst_0:
1612N/A push(SharkValue::jlong_constant(0));
1612N/A break;
1612N/A case Bytecodes::_lconst_1:
1612N/A push(SharkValue::jlong_constant(1));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_fconst_0:
1612N/A push(SharkValue::jfloat_constant(0));
1612N/A break;
1612N/A case Bytecodes::_fconst_1:
1612N/A push(SharkValue::jfloat_constant(1));
1612N/A break;
1612N/A case Bytecodes::_fconst_2:
1612N/A push(SharkValue::jfloat_constant(2));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_dconst_0:
1612N/A push(SharkValue::jdouble_constant(0));
1612N/A break;
1612N/A case Bytecodes::_dconst_1:
1612N/A push(SharkValue::jdouble_constant(1));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_bipush:
1612N/A push(SharkValue::jint_constant(iter()->get_constant_u1()));
1612N/A break;
1612N/A case Bytecodes::_sipush:
1612N/A push(SharkValue::jint_constant(iter()->get_constant_u2()));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_ldc:
1612N/A case Bytecodes::_ldc_w:
1612N/A case Bytecodes::_ldc2_w:
1612N/A push(SharkConstant::for_ldc(iter())->value(builder()));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_iload_0:
1612N/A case Bytecodes::_lload_0:
1612N/A case Bytecodes::_fload_0:
1612N/A case Bytecodes::_dload_0:
1612N/A case Bytecodes::_aload_0:
1612N/A push(local(0));
1612N/A break;
1612N/A case Bytecodes::_iload_1:
1612N/A case Bytecodes::_lload_1:
1612N/A case Bytecodes::_fload_1:
1612N/A case Bytecodes::_dload_1:
1612N/A case Bytecodes::_aload_1:
1612N/A push(local(1));
1612N/A break;
1612N/A case Bytecodes::_iload_2:
1612N/A case Bytecodes::_lload_2:
1612N/A case Bytecodes::_fload_2:
1612N/A case Bytecodes::_dload_2:
1612N/A case Bytecodes::_aload_2:
1612N/A push(local(2));
1612N/A break;
1612N/A case Bytecodes::_iload_3:
1612N/A case Bytecodes::_lload_3:
1612N/A case Bytecodes::_fload_3:
1612N/A case Bytecodes::_dload_3:
1612N/A case Bytecodes::_aload_3:
1612N/A push(local(3));
1612N/A break;
1612N/A case Bytecodes::_iload:
1612N/A case Bytecodes::_lload:
1612N/A case Bytecodes::_fload:
1612N/A case Bytecodes::_dload:
1612N/A case Bytecodes::_aload:
1612N/A push(local(iter()->get_index()));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_baload:
1612N/A do_aload(T_BYTE);
1612N/A break;
1612N/A case Bytecodes::_caload:
1612N/A do_aload(T_CHAR);
1612N/A break;
1612N/A case Bytecodes::_saload:
1612N/A do_aload(T_SHORT);
1612N/A break;
1612N/A case Bytecodes::_iaload:
1612N/A do_aload(T_INT);
1612N/A break;
1612N/A case Bytecodes::_laload:
1612N/A do_aload(T_LONG);
1612N/A break;
1612N/A case Bytecodes::_faload:
1612N/A do_aload(T_FLOAT);
1612N/A break;
1612N/A case Bytecodes::_daload:
1612N/A do_aload(T_DOUBLE);
1612N/A break;
1612N/A case Bytecodes::_aaload:
1612N/A do_aload(T_OBJECT);
1612N/A break;
1612N/A
1612N/A case Bytecodes::_istore_0:
1612N/A case Bytecodes::_lstore_0:
1612N/A case Bytecodes::_fstore_0:
1612N/A case Bytecodes::_dstore_0:
1612N/A case Bytecodes::_astore_0:
1612N/A set_local(0, pop());
1612N/A break;
1612N/A case Bytecodes::_istore_1:
1612N/A case Bytecodes::_lstore_1:
1612N/A case Bytecodes::_fstore_1:
1612N/A case Bytecodes::_dstore_1:
1612N/A case Bytecodes::_astore_1:
1612N/A set_local(1, pop());
1612N/A break;
1612N/A case Bytecodes::_istore_2:
1612N/A case Bytecodes::_lstore_2:
1612N/A case Bytecodes::_fstore_2:
1612N/A case Bytecodes::_dstore_2:
1612N/A case Bytecodes::_astore_2:
1612N/A set_local(2, pop());
1612N/A break;
1612N/A case Bytecodes::_istore_3:
1612N/A case Bytecodes::_lstore_3:
1612N/A case Bytecodes::_fstore_3:
1612N/A case Bytecodes::_dstore_3:
1612N/A case Bytecodes::_astore_3:
1612N/A set_local(3, pop());
1612N/A break;
1612N/A case Bytecodes::_istore:
1612N/A case Bytecodes::_lstore:
1612N/A case Bytecodes::_fstore:
1612N/A case Bytecodes::_dstore:
1612N/A case Bytecodes::_astore:
1612N/A set_local(iter()->get_index(), pop());
1612N/A break;
1612N/A
1612N/A case Bytecodes::_bastore:
1612N/A do_astore(T_BYTE);
1612N/A break;
1612N/A case Bytecodes::_castore:
1612N/A do_astore(T_CHAR);
1612N/A break;
1612N/A case Bytecodes::_sastore:
1612N/A do_astore(T_SHORT);
1612N/A break;
1612N/A case Bytecodes::_iastore:
1612N/A do_astore(T_INT);
1612N/A break;
1612N/A case Bytecodes::_lastore:
1612N/A do_astore(T_LONG);
1612N/A break;
1612N/A case Bytecodes::_fastore:
1612N/A do_astore(T_FLOAT);
1612N/A break;
1612N/A case Bytecodes::_dastore:
1612N/A do_astore(T_DOUBLE);
1612N/A break;
1612N/A case Bytecodes::_aastore:
1612N/A do_astore(T_OBJECT);
1612N/A break;
1612N/A
1612N/A case Bytecodes::_pop:
1612N/A xpop();
1612N/A break;
1612N/A case Bytecodes::_pop2:
1612N/A xpop();
1612N/A xpop();
1612N/A break;
1612N/A case Bytecodes::_swap:
1612N/A a = xpop();
1612N/A b = xpop();
1612N/A xpush(a);
1612N/A xpush(b);
1612N/A break;
1612N/A case Bytecodes::_dup:
1612N/A a = xpop();
1612N/A xpush(a);
1612N/A xpush(a);
1612N/A break;
1612N/A case Bytecodes::_dup_x1:
1612N/A a = xpop();
1612N/A b = xpop();
1612N/A xpush(a);
1612N/A xpush(b);
1612N/A xpush(a);
1612N/A break;
1612N/A case Bytecodes::_dup_x2:
1612N/A a = xpop();
1612N/A b = xpop();
1612N/A c = xpop();
1612N/A xpush(a);
1612N/A xpush(c);
1612N/A xpush(b);
1612N/A xpush(a);
1612N/A break;
1612N/A case Bytecodes::_dup2:
1612N/A a = xpop();
1612N/A b = xpop();
1612N/A xpush(b);
1612N/A xpush(a);
1612N/A xpush(b);
1612N/A xpush(a);
1612N/A break;
1612N/A case Bytecodes::_dup2_x1:
1612N/A a = xpop();
1612N/A b = xpop();
1612N/A c = xpop();
1612N/A xpush(b);
1612N/A xpush(a);
1612N/A xpush(c);
1612N/A xpush(b);
1612N/A xpush(a);
1612N/A break;
1612N/A case Bytecodes::_dup2_x2:
1612N/A a = xpop();
1612N/A b = xpop();
1612N/A c = xpop();
1612N/A d = xpop();
1612N/A xpush(b);
1612N/A xpush(a);
1612N/A xpush(d);
1612N/A xpush(c);
1612N/A xpush(b);
1612N/A xpush(a);
1612N/A break;
1612N/A
1612N/A case Bytecodes::_arraylength:
1612N/A do_arraylength();
1612N/A break;
1612N/A
1612N/A case Bytecodes::_getfield:
1612N/A do_getfield();
1612N/A break;
1612N/A case Bytecodes::_getstatic:
1612N/A do_getstatic();
1612N/A break;
1612N/A case Bytecodes::_putfield:
1612N/A do_putfield();
1612N/A break;
1612N/A case Bytecodes::_putstatic:
1612N/A do_putstatic();
1612N/A break;
1612N/A
1612N/A case Bytecodes::_iadd:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateAdd(a->jint_value(), b->jint_value()), false));
1612N/A break;
1612N/A case Bytecodes::_isub:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateSub(a->jint_value(), b->jint_value()), false));
1612N/A break;
1612N/A case Bytecodes::_imul:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateMul(a->jint_value(), b->jint_value()), false));
1612N/A break;
1612N/A case Bytecodes::_idiv:
1612N/A do_idiv();
1612N/A break;
1612N/A case Bytecodes::_irem:
1612N/A do_irem();
1612N/A break;
1612N/A case Bytecodes::_ineg:
1612N/A a = pop();
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateNeg(a->jint_value()), a->zero_checked()));
1612N/A break;
1612N/A case Bytecodes::_ishl:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateShl(
1612N/A a->jint_value(),
1612N/A builder()->CreateAnd(
1612N/A b->jint_value(), LLVMValue::jint_constant(0x1f))), false));
1612N/A break;
1612N/A case Bytecodes::_ishr:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateAShr(
1612N/A a->jint_value(),
1612N/A builder()->CreateAnd(
1612N/A b->jint_value(), LLVMValue::jint_constant(0x1f))), false));
1612N/A break;
1612N/A case Bytecodes::_iushr:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateLShr(
1612N/A a->jint_value(),
1612N/A builder()->CreateAnd(
1612N/A b->jint_value(), LLVMValue::jint_constant(0x1f))), false));
1612N/A break;
1612N/A case Bytecodes::_iand:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateAnd(a->jint_value(), b->jint_value()), false));
1612N/A break;
1612N/A case Bytecodes::_ior:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateOr(a->jint_value(), b->jint_value()),
1612N/A a->zero_checked() && b->zero_checked()));
1612N/A break;
1612N/A case Bytecodes::_ixor:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateXor(a->jint_value(), b->jint_value()), false));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_ladd:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jlong(
1612N/A builder()->CreateAdd(a->jlong_value(), b->jlong_value()), false));
1612N/A break;
1612N/A case Bytecodes::_lsub:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jlong(
1612N/A builder()->CreateSub(a->jlong_value(), b->jlong_value()), false));
1612N/A break;
1612N/A case Bytecodes::_lmul:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jlong(
1612N/A builder()->CreateMul(a->jlong_value(), b->jlong_value()), false));
1612N/A break;
1612N/A case Bytecodes::_ldiv:
1612N/A do_ldiv();
1612N/A break;
1612N/A case Bytecodes::_lrem:
1612N/A do_lrem();
1612N/A break;
1612N/A case Bytecodes::_lneg:
1612N/A a = pop();
1612N/A push(SharkValue::create_jlong(
1612N/A builder()->CreateNeg(a->jlong_value()), a->zero_checked()));
1612N/A break;
1612N/A case Bytecodes::_lshl:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jlong(
1612N/A builder()->CreateShl(
1612N/A a->jlong_value(),
1612N/A builder()->CreateIntCast(
1612N/A builder()->CreateAnd(
1612N/A b->jint_value(), LLVMValue::jint_constant(0x3f)),
1612N/A SharkType::jlong_type(), true)), false));
1612N/A break;
1612N/A case Bytecodes::_lshr:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jlong(
1612N/A builder()->CreateAShr(
1612N/A a->jlong_value(),
1612N/A builder()->CreateIntCast(
1612N/A builder()->CreateAnd(
1612N/A b->jint_value(), LLVMValue::jint_constant(0x3f)),
1612N/A SharkType::jlong_type(), true)), false));
1612N/A break;
1612N/A case Bytecodes::_lushr:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jlong(
1612N/A builder()->CreateLShr(
1612N/A a->jlong_value(),
1612N/A builder()->CreateIntCast(
1612N/A builder()->CreateAnd(
1612N/A b->jint_value(), LLVMValue::jint_constant(0x3f)),
1612N/A SharkType::jlong_type(), true)), false));
1612N/A break;
1612N/A case Bytecodes::_land:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jlong(
1612N/A builder()->CreateAnd(a->jlong_value(), b->jlong_value()), false));
1612N/A break;
1612N/A case Bytecodes::_lor:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jlong(
1612N/A builder()->CreateOr(a->jlong_value(), b->jlong_value()),
1612N/A a->zero_checked() && b->zero_checked()));
1612N/A break;
1612N/A case Bytecodes::_lxor:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jlong(
1612N/A builder()->CreateXor(a->jlong_value(), b->jlong_value()), false));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_fadd:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jfloat(
1612N/A builder()->CreateFAdd(a->jfloat_value(), b->jfloat_value())));
1612N/A break;
1612N/A case Bytecodes::_fsub:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jfloat(
1612N/A builder()->CreateFSub(a->jfloat_value(), b->jfloat_value())));
1612N/A break;
1612N/A case Bytecodes::_fmul:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jfloat(
1612N/A builder()->CreateFMul(a->jfloat_value(), b->jfloat_value())));
1612N/A break;
1612N/A case Bytecodes::_fdiv:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jfloat(
1612N/A builder()->CreateFDiv(a->jfloat_value(), b->jfloat_value())));
1612N/A break;
1612N/A case Bytecodes::_frem:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jfloat(
1612N/A builder()->CreateFRem(a->jfloat_value(), b->jfloat_value())));
1612N/A break;
1612N/A case Bytecodes::_fneg:
1612N/A a = pop();
1612N/A push(SharkValue::create_jfloat(
1612N/A builder()->CreateFNeg(a->jfloat_value())));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_dadd:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jdouble(
1612N/A builder()->CreateFAdd(a->jdouble_value(), b->jdouble_value())));
1612N/A break;
1612N/A case Bytecodes::_dsub:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jdouble(
1612N/A builder()->CreateFSub(a->jdouble_value(), b->jdouble_value())));
1612N/A break;
1612N/A case Bytecodes::_dmul:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jdouble(
1612N/A builder()->CreateFMul(a->jdouble_value(), b->jdouble_value())));
1612N/A break;
1612N/A case Bytecodes::_ddiv:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jdouble(
1612N/A builder()->CreateFDiv(a->jdouble_value(), b->jdouble_value())));
1612N/A break;
1612N/A case Bytecodes::_drem:
1612N/A b = pop();
1612N/A a = pop();
1612N/A push(SharkValue::create_jdouble(
1612N/A builder()->CreateFRem(a->jdouble_value(), b->jdouble_value())));
1612N/A break;
1612N/A case Bytecodes::_dneg:
1612N/A a = pop();
1612N/A push(SharkValue::create_jdouble(
1612N/A builder()->CreateFNeg(a->jdouble_value())));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_iinc:
1612N/A i = iter()->get_index();
1612N/A set_local(
1612N/A i,
1612N/A SharkValue::create_jint(
1612N/A builder()->CreateAdd(
1612N/A LLVMValue::jint_constant(iter()->get_iinc_con()),
1612N/A local(i)->jint_value()), false));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_lcmp:
1612N/A do_lcmp();
1612N/A break;
1612N/A
1612N/A case Bytecodes::_fcmpl:
1612N/A do_fcmp(false, false);
1612N/A break;
1612N/A case Bytecodes::_fcmpg:
1612N/A do_fcmp(false, true);
1612N/A break;
1612N/A case Bytecodes::_dcmpl:
1612N/A do_fcmp(true, false);
1612N/A break;
1612N/A case Bytecodes::_dcmpg:
1612N/A do_fcmp(true, true);
1612N/A break;
1612N/A
1612N/A case Bytecodes::_i2l:
1612N/A a = pop();
1612N/A push(SharkValue::create_jlong(
1612N/A builder()->CreateIntCast(
1612N/A a->jint_value(), SharkType::jlong_type(), true), a->zero_checked()));
1612N/A break;
1612N/A case Bytecodes::_i2f:
1612N/A push(SharkValue::create_jfloat(
1612N/A builder()->CreateSIToFP(
1612N/A pop()->jint_value(), SharkType::jfloat_type())));
1612N/A break;
1612N/A case Bytecodes::_i2d:
1612N/A push(SharkValue::create_jdouble(
1612N/A builder()->CreateSIToFP(
1612N/A pop()->jint_value(), SharkType::jdouble_type())));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_l2i:
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateIntCast(
1612N/A pop()->jlong_value(), SharkType::jint_type(), true), false));
1612N/A break;
1612N/A case Bytecodes::_l2f:
1612N/A push(SharkValue::create_jfloat(
1612N/A builder()->CreateSIToFP(
1612N/A pop()->jlong_value(), SharkType::jfloat_type())));
1612N/A break;
1612N/A case Bytecodes::_l2d:
1612N/A push(SharkValue::create_jdouble(
1612N/A builder()->CreateSIToFP(
1612N/A pop()->jlong_value(), SharkType::jdouble_type())));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_f2i:
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateCall(
1612N/A builder()->f2i(), pop()->jfloat_value()), false));
1612N/A break;
1612N/A case Bytecodes::_f2l:
1612N/A push(SharkValue::create_jlong(
1612N/A builder()->CreateCall(
1612N/A builder()->f2l(), pop()->jfloat_value()), false));
1612N/A break;
1612N/A case Bytecodes::_f2d:
1612N/A push(SharkValue::create_jdouble(
1612N/A builder()->CreateFPExt(
1612N/A pop()->jfloat_value(), SharkType::jdouble_type())));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_d2i:
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateCall(
1612N/A builder()->d2i(), pop()->jdouble_value()), false));
1612N/A break;
1612N/A case Bytecodes::_d2l:
1612N/A push(SharkValue::create_jlong(
1612N/A builder()->CreateCall(
1612N/A builder()->d2l(), pop()->jdouble_value()), false));
1612N/A break;
1612N/A case Bytecodes::_d2f:
1612N/A push(SharkValue::create_jfloat(
1612N/A builder()->CreateFPTrunc(
1612N/A pop()->jdouble_value(), SharkType::jfloat_type())));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_i2b:
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateAShr(
1612N/A builder()->CreateShl(
1612N/A pop()->jint_value(),
1612N/A LLVMValue::jint_constant(24)),
1612N/A LLVMValue::jint_constant(24)), false));
1612N/A break;
1612N/A case Bytecodes::_i2c:
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateAnd(
1612N/A pop()->jint_value(),
1612N/A LLVMValue::jint_constant(0xffff)), false));
1612N/A break;
1612N/A case Bytecodes::_i2s:
1612N/A push(SharkValue::create_jint(
1612N/A builder()->CreateAShr(
1612N/A builder()->CreateShl(
1612N/A pop()->jint_value(),
1612N/A LLVMValue::jint_constant(16)),
1612N/A LLVMValue::jint_constant(16)), false));
1612N/A break;
1612N/A
1612N/A case Bytecodes::_return:
1612N/A do_return(T_VOID);
1612N/A break;
1612N/A case Bytecodes::_ireturn:
1612N/A do_return(T_INT);
1612N/A break;
1612N/A case Bytecodes::_lreturn:
1612N/A do_return(T_LONG);
1612N/A break;
1612N/A case Bytecodes::_freturn:
1612N/A do_return(T_FLOAT);
1612N/A break;
1612N/A case Bytecodes::_dreturn:
1612N/A do_return(T_DOUBLE);
1612N/A break;
1612N/A case Bytecodes::_areturn:
1612N/A do_return(T_OBJECT);
1612N/A break;
1612N/A
1612N/A case Bytecodes::_athrow:
1612N/A do_athrow();
1612N/A break;
1612N/A
1612N/A case Bytecodes::_goto:
1612N/A case Bytecodes::_goto_w:
1612N/A do_goto();
1612N/A break;
1612N/A
1612N/A case Bytecodes::_jsr:
1612N/A case Bytecodes::_jsr_w:
1612N/A do_jsr();
1612N/A break;
1612N/A
1612N/A case Bytecodes::_ret:
1612N/A do_ret();
1612N/A break;
1612N/A
1612N/A case Bytecodes::_ifnull:
1612N/A do_if(ICmpInst::ICMP_EQ, SharkValue::null(), pop());
1612N/A break;
1612N/A case Bytecodes::_ifnonnull:
1612N/A do_if(ICmpInst::ICMP_NE, SharkValue::null(), pop());
1612N/A break;
1612N/A case Bytecodes::_if_acmpeq:
1612N/A b = pop();
1612N/A a = pop();
1612N/A do_if(ICmpInst::ICMP_EQ, b, a);
1612N/A break;
1612N/A case Bytecodes::_if_acmpne:
1612N/A b = pop();
1612N/A a = pop();
1612N/A do_if(ICmpInst::ICMP_NE, b, a);
1612N/A break;
1612N/A case Bytecodes::_ifeq:
1612N/A do_if(ICmpInst::ICMP_EQ, SharkValue::jint_constant(0), pop());
1612N/A break;
1612N/A case Bytecodes::_ifne:
1612N/A do_if(ICmpInst::ICMP_NE, SharkValue::jint_constant(0), pop());
1612N/A break;
1612N/A case Bytecodes::_iflt:
1612N/A do_if(ICmpInst::ICMP_SLT, SharkValue::jint_constant(0), pop());
1612N/A break;
1612N/A case Bytecodes::_ifle:
1612N/A do_if(ICmpInst::ICMP_SLE, SharkValue::jint_constant(0), pop());
1612N/A break;
1612N/A case Bytecodes::_ifgt:
1612N/A do_if(ICmpInst::ICMP_SGT, SharkValue::jint_constant(0), pop());
1612N/A break;
1612N/A case Bytecodes::_ifge:
1612N/A do_if(ICmpInst::ICMP_SGE, SharkValue::jint_constant(0), pop());
1612N/A break;
1612N/A case Bytecodes::_if_icmpeq:
1612N/A b = pop();
1612N/A a = pop();
1612N/A do_if(ICmpInst::ICMP_EQ, b, a);
1612N/A break;
1612N/A case Bytecodes::_if_icmpne:
1612N/A b = pop();
1612N/A a = pop();
1612N/A do_if(ICmpInst::ICMP_NE, b, a);
1612N/A break;
1612N/A case Bytecodes::_if_icmplt:
1612N/A b = pop();
1612N/A a = pop();
1612N/A do_if(ICmpInst::ICMP_SLT, b, a);
1612N/A break;
1612N/A case Bytecodes::_if_icmple:
1612N/A b = pop();
1612N/A a = pop();
1612N/A do_if(ICmpInst::ICMP_SLE, b, a);
1612N/A break;
1612N/A case Bytecodes::_if_icmpgt:
1612N/A b = pop();
1612N/A a = pop();
1612N/A do_if(ICmpInst::ICMP_SGT, b, a);
1612N/A break;
1612N/A case Bytecodes::_if_icmpge:
1612N/A b = pop();
1612N/A a = pop();
1612N/A do_if(ICmpInst::ICMP_SGE, b, a);
1612N/A break;
1612N/A
1612N/A case Bytecodes::_tableswitch:
1612N/A case Bytecodes::_lookupswitch:
1612N/A do_switch();
1612N/A break;
1612N/A
1612N/A case Bytecodes::_invokestatic:
1612N/A case Bytecodes::_invokespecial:
1612N/A case Bytecodes::_invokevirtual:
1612N/A case Bytecodes::_invokeinterface:
1612N/A do_call();
1612N/A break;
1612N/A
1612N/A case Bytecodes::_instanceof:
1612N/A // This is a very common construct:
1612N/A //
1612N/A // if (object instanceof Klass) {
1612N/A // something = (Klass) object;
1612N/A // ...
1612N/A // }
1612N/A //
1612N/A // which gets compiled to something like this:
1612N/A //
1612N/A // 28: aload 9
1612N/A // 30: instanceof <Class Klass>
1612N/A // 33: ifeq 52
1612N/A // 36: aload 9
1612N/A // 38: checkcast <Class Klass>
1612N/A //
1612N/A // Handling both bytecodes at once allows us
1612N/A // to eliminate the checkcast.
1612N/A if (iter()->next_bci() < limit &&
1612N/A (iter()->next_bc() == Bytecodes::_ifeq ||
1612N/A iter()->next_bc() == Bytecodes::_ifne) &&
1612N/A (!UseLoopSafepoints ||
1612N/A iter()->next_get_dest() > iter()->next_bci())) {
1612N/A if (maybe_do_instanceof_if()) {
1612N/A iter()->next();
1612N/A if (SharkTraceBytecodes)
1612N/A tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc()));
1612N/A break;
1612N/A }
1612N/A }
1612N/A // fall through
1612N/A case Bytecodes::_checkcast:
1612N/A do_instance_check();
1612N/A break;
1612N/A
1612N/A case Bytecodes::_new:
1612N/A do_new();
1612N/A break;
1612N/A case Bytecodes::_newarray:
1612N/A do_newarray();
1612N/A break;
1612N/A case Bytecodes::_anewarray:
1612N/A do_anewarray();
1612N/A break;
1612N/A case Bytecodes::_multianewarray:
1612N/A do_multianewarray();
1612N/A break;
1612N/A
1612N/A case Bytecodes::_monitorenter:
1612N/A do_monitorenter();
1612N/A break;
1612N/A case Bytecodes::_monitorexit:
1612N/A do_monitorexit();
1612N/A break;
1612N/A
1612N/A default:
1612N/A ShouldNotReachHere();
1612N/A }
1612N/A }
1612N/A}
1612N/A
1612N/ASharkState* SharkBlock::initial_current_state() {
1612N/A return entry_state()->copy();
1612N/A}
1612N/A
1612N/Aint SharkBlock::switch_default_dest() {
1612N/A return iter()->get_dest_table(0);
1612N/A}
1612N/A
1612N/Aint SharkBlock::switch_table_length() {
1612N/A switch(bc()) {
1612N/A case Bytecodes::_tableswitch:
1612N/A return iter()->get_int_table(2) - iter()->get_int_table(1) + 1;
1612N/A
1612N/A case Bytecodes::_lookupswitch:
1612N/A return iter()->get_int_table(1);
1612N/A
1612N/A default:
1612N/A ShouldNotReachHere();
1612N/A }
1612N/A}
1612N/A
1612N/Aint SharkBlock::switch_key(int i) {
1612N/A switch(bc()) {
1612N/A case Bytecodes::_tableswitch:
1612N/A return iter()->get_int_table(1) + i;
1612N/A
1612N/A case Bytecodes::_lookupswitch:
1612N/A return iter()->get_int_table(2 + 2 * i);
1612N/A
1612N/A default:
1612N/A ShouldNotReachHere();
1612N/A }
1612N/A}
1612N/A
1612N/Aint SharkBlock::switch_dest(int i) {
1612N/A switch(bc()) {
1612N/A case Bytecodes::_tableswitch:
1612N/A return iter()->get_dest_table(i + 3);
1612N/A
1612N/A case Bytecodes::_lookupswitch:
1612N/A return iter()->get_dest_table(2 + 2 * i + 1);
1612N/A
1612N/A default:
1612N/A ShouldNotReachHere();
1612N/A }
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_div_or_rem(bool is_long, bool is_rem) {
1612N/A SharkValue *sb = pop();
1612N/A SharkValue *sa = pop();
1612N/A
1612N/A check_divide_by_zero(sb);
1612N/A
1612N/A Value *a, *b, *p, *q;
1612N/A if (is_long) {
1612N/A a = sa->jlong_value();
1612N/A b = sb->jlong_value();
1612N/A p = LLVMValue::jlong_constant(0x8000000000000000LL);
1612N/A q = LLVMValue::jlong_constant(-1);
1612N/A }
1612N/A else {
1612N/A a = sa->jint_value();
1612N/A b = sb->jint_value();
1612N/A p = LLVMValue::jint_constant(0x80000000);
1612N/A q = LLVMValue::jint_constant(-1);
1612N/A }
1612N/A
1612N/A BasicBlock *ip = builder()->GetBlockInsertionPoint();
1612N/A BasicBlock *special_case = builder()->CreateBlock(ip, "special_case");
1612N/A BasicBlock *general_case = builder()->CreateBlock(ip, "general_case");
1612N/A BasicBlock *done = builder()->CreateBlock(ip, "done");
1612N/A
1612N/A builder()->CreateCondBr(
1612N/A builder()->CreateAnd(
1612N/A builder()->CreateICmpEQ(a, p),
1612N/A builder()->CreateICmpEQ(b, q)),
1612N/A special_case, general_case);
1612N/A
1612N/A builder()->SetInsertPoint(special_case);
1612N/A Value *special_result;
1612N/A if (is_rem) {
1612N/A if (is_long)
1612N/A special_result = LLVMValue::jlong_constant(0);
1612N/A else
1612N/A special_result = LLVMValue::jint_constant(0);
1612N/A }
1612N/A else {
1612N/A special_result = a;
1612N/A }
1612N/A builder()->CreateBr(done);
1612N/A
1612N/A builder()->SetInsertPoint(general_case);
1612N/A Value *general_result;
1612N/A if (is_rem)
1612N/A general_result = builder()->CreateSRem(a, b);
1612N/A else
1612N/A general_result = builder()->CreateSDiv(a, b);
1612N/A builder()->CreateBr(done);
1612N/A
1612N/A builder()->SetInsertPoint(done);
1612N/A PHINode *result;
1612N/A if (is_long)
1612N/A result = builder()->CreatePHI(SharkType::jlong_type(), "result");
1612N/A else
1612N/A result = builder()->CreatePHI(SharkType::jint_type(), "result");
1612N/A result->addIncoming(special_result, special_case);
1612N/A result->addIncoming(general_result, general_case);
1612N/A
1612N/A if (is_long)
1612N/A push(SharkValue::create_jlong(result, false));
1612N/A else
1612N/A push(SharkValue::create_jint(result, false));
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_field_access(bool is_get, bool is_field) {
1612N/A bool will_link;
1612N/A ciField *field = iter()->get_field(will_link);
1612N/A assert(will_link, "typeflow responsibility");
1612N/A assert(is_field != field->is_static(), "mismatch");
1612N/A
1612N/A // Pop the value off the stack where necessary
1612N/A SharkValue *value = NULL;
1612N/A if (!is_get)
1612N/A value = pop();
1612N/A
1612N/A // Find the object we're accessing, if necessary
1612N/A Value *object = NULL;
1612N/A if (is_field) {
1612N/A SharkValue *value = pop();
1612N/A check_null(value);
1612N/A object = value->generic_value();
1612N/A }
1612N/A if (is_get && field->is_constant()) {
1612N/A SharkConstant *constant = SharkConstant::for_field(iter());
1612N/A if (constant->is_loaded())
1612N/A value = constant->value(builder());
1612N/A }
1612N/A if (!is_get || value == NULL) {
1612N/A if (!is_field)
1612N/A object = builder()->CreateInlineOop(field->holder());
1612N/A
1612N/A BasicType basic_type = field->type()->basic_type();
1612N/A const Type *stack_type = SharkType::to_stackType(basic_type);
1612N/A const Type *field_type = SharkType::to_arrayType(basic_type);
1612N/A
1612N/A Value *addr = builder()->CreateAddressOfStructEntry(
1612N/A object, in_ByteSize(field->offset_in_bytes()),
1612N/A PointerType::getUnqual(field_type),
1612N/A "addr");
1612N/A
1612N/A // Do the access
1612N/A if (is_get) {
1612N/A Value *field_value = builder()->CreateLoad(addr);
1612N/A
1612N/A if (field_type != stack_type) {
1612N/A field_value = builder()->CreateIntCast(
1612N/A field_value, stack_type, basic_type != T_CHAR);
1612N/A }
1612N/A
1612N/A value = SharkValue::create_generic(field->type(), field_value, false);
1612N/A }
1612N/A else {
1612N/A Value *field_value = value->generic_value();
1612N/A
1612N/A if (field_type != stack_type) {
1612N/A field_value = builder()->CreateIntCast(
1612N/A field_value, field_type, basic_type != T_CHAR);
1612N/A }
1612N/A
1612N/A builder()->CreateStore(field_value, addr);
1612N/A
1612N/A if (!field->type()->is_primitive_type())
1612N/A builder()->CreateUpdateBarrierSet(oopDesc::bs(), addr);
1612N/A
1612N/A if (field->is_volatile())
1612N/A builder()->CreateMemoryBarrier(SharkBuilder::BARRIER_STORELOAD);
1612N/A }
1612N/A }
1612N/A
1612N/A // Push the value onto the stack where necessary
1612N/A if (is_get)
1612N/A push(value);
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_lcmp() {
1612N/A Value *b = pop()->jlong_value();
1612N/A Value *a = pop()->jlong_value();
1612N/A
1612N/A BasicBlock *ip = builder()->GetBlockInsertionPoint();
1612N/A BasicBlock *ne = builder()->CreateBlock(ip, "lcmp_ne");
1612N/A BasicBlock *lt = builder()->CreateBlock(ip, "lcmp_lt");
1612N/A BasicBlock *gt = builder()->CreateBlock(ip, "lcmp_gt");
1612N/A BasicBlock *done = builder()->CreateBlock(ip, "done");
1612N/A
1612N/A BasicBlock *eq = builder()->GetInsertBlock();
1612N/A builder()->CreateCondBr(builder()->CreateICmpEQ(a, b), done, ne);
1612N/A
1612N/A builder()->SetInsertPoint(ne);
1612N/A builder()->CreateCondBr(builder()->CreateICmpSLT(a, b), lt, gt);
1612N/A
1612N/A builder()->SetInsertPoint(lt);
1612N/A builder()->CreateBr(done);
1612N/A
1612N/A builder()->SetInsertPoint(gt);
1612N/A builder()->CreateBr(done);
1612N/A
1612N/A builder()->SetInsertPoint(done);
1612N/A PHINode *result = builder()->CreatePHI(SharkType::jint_type(), "result");
1612N/A result->addIncoming(LLVMValue::jint_constant(-1), lt);
1612N/A result->addIncoming(LLVMValue::jint_constant(0), eq);
1612N/A result->addIncoming(LLVMValue::jint_constant(1), gt);
1612N/A
1612N/A push(SharkValue::create_jint(result, false));
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_fcmp(bool is_double, bool unordered_is_greater) {
1612N/A Value *a, *b;
1612N/A if (is_double) {
1612N/A b = pop()->jdouble_value();
1612N/A a = pop()->jdouble_value();
1612N/A }
1612N/A else {
1612N/A b = pop()->jfloat_value();
1612N/A a = pop()->jfloat_value();
1612N/A }
1612N/A
1612N/A BasicBlock *ip = builder()->GetBlockInsertionPoint();
1612N/A BasicBlock *ordered = builder()->CreateBlock(ip, "ordered");
1612N/A BasicBlock *ge = builder()->CreateBlock(ip, "fcmp_ge");
1612N/A BasicBlock *lt = builder()->CreateBlock(ip, "fcmp_lt");
1612N/A BasicBlock *eq = builder()->CreateBlock(ip, "fcmp_eq");
1612N/A BasicBlock *gt = builder()->CreateBlock(ip, "fcmp_gt");
1612N/A BasicBlock *done = builder()->CreateBlock(ip, "done");
1612N/A
1612N/A builder()->CreateCondBr(
1612N/A builder()->CreateFCmpUNO(a, b),
1612N/A unordered_is_greater ? gt : lt, ordered);
1612N/A
1612N/A builder()->SetInsertPoint(ordered);
1612N/A builder()->CreateCondBr(builder()->CreateFCmpULT(a, b), lt, ge);
1612N/A
1612N/A builder()->SetInsertPoint(ge);
1612N/A builder()->CreateCondBr(builder()->CreateFCmpUGT(a, b), gt, eq);
1612N/A
1612N/A builder()->SetInsertPoint(lt);
1612N/A builder()->CreateBr(done);
1612N/A
1612N/A builder()->SetInsertPoint(gt);
1612N/A builder()->CreateBr(done);
1612N/A
1612N/A builder()->SetInsertPoint(eq);
1612N/A builder()->CreateBr(done);
1612N/A
1612N/A builder()->SetInsertPoint(done);
1612N/A PHINode *result = builder()->CreatePHI(SharkType::jint_type(), "result");
1612N/A result->addIncoming(LLVMValue::jint_constant(-1), lt);
1612N/A result->addIncoming(LLVMValue::jint_constant(0), eq);
1612N/A result->addIncoming(LLVMValue::jint_constant(1), gt);
1612N/A
1612N/A push(SharkValue::create_jint(result, false));
1612N/A}
1612N/A
1612N/Avoid SharkBlock::emit_IR() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/ASharkState* SharkBlock::entry_state() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_zero_check(SharkValue* value) {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::maybe_add_backedge_safepoint() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Abool SharkBlock::has_trap() {
1612N/A return false;
1612N/A}
1612N/A
1612N/Aint SharkBlock::trap_request() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Aint SharkBlock::trap_bci() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_trap(int trap_request) {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_arraylength() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_aload(BasicType basic_type) {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_astore(BasicType basic_type) {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_return(BasicType type) {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_athrow() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_goto() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_jsr() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_ret() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_if(ICmpInst::Predicate p, SharkValue* b, SharkValue* a) {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_switch() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_call() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_instance_check() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Abool SharkBlock::maybe_do_instanceof_if() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_new() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_newarray() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_anewarray() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_multianewarray() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_monitorenter() {
1612N/A ShouldNotCallThis();
1612N/A}
1612N/A
1612N/Avoid SharkBlock::do_monitorexit() {
1612N/A ShouldNotCallThis();
1612N/A}