1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/vm/shark/sharkBlock.cpp Wed Apr 27 01:25:04 2016 +0800 1.3 @@ -0,0 +1,1286 @@ 1.4 +/* 1.5 + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright 2008, 2009, 2010 Red Hat, Inc. 1.7 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 + * 1.9 + * This code is free software; you can redistribute it and/or modify it 1.10 + * under the terms of the GNU General Public License version 2 only, as 1.11 + * published by the Free Software Foundation. 1.12 + * 1.13 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.14 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.15 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.16 + * version 2 for more details (a copy is included in the LICENSE file that 1.17 + * accompanied this code). 1.18 + * 1.19 + * You should have received a copy of the GNU General Public License version 1.20 + * 2 along with this work; if not, write to the Free Software Foundation, 1.21 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.22 + * 1.23 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.24 + * or visit www.oracle.com if you need additional information or have any 1.25 + * questions. 1.26 + * 1.27 + */ 1.28 + 1.29 +#include "precompiled.hpp" 1.30 +#include "interpreter/bytecodes.hpp" 1.31 +#include "shark/llvmHeaders.hpp" 1.32 +#include "shark/llvmValue.hpp" 1.33 +#include "shark/sharkBlock.hpp" 1.34 +#include "shark/sharkBuilder.hpp" 1.35 +#include "shark/sharkConstant.hpp" 1.36 +#include "shark/sharkState.hpp" 1.37 +#include "shark/sharkValue.hpp" 1.38 +#include "shark/shark_globals.hpp" 1.39 +#include "utilities/debug.hpp" 1.40 + 1.41 +using namespace llvm; 1.42 + 1.43 +void SharkBlock::parse_bytecode(int start, int limit) { 1.44 + SharkValue *a, *b, *c, *d; 1.45 + int i; 1.46 + 1.47 + // Ensure the current state is initialized before we emit any code, 1.48 + // so that any setup code for the state is at the start of the block 1.49 + current_state(); 1.50 + 1.51 + // Parse the bytecodes 1.52 + iter()->reset_to_bci(start); 1.53 + while (iter()->next_bci() < limit) { 1.54 + NOT_PRODUCT(a = b = c = d = NULL); 1.55 + iter()->next(); 1.56 + 1.57 + if (SharkTraceBytecodes) 1.58 + tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc())); 1.59 + 1.60 + if (has_trap() && trap_bci() == bci()) { 1.61 + do_trap(trap_request()); 1.62 + return; 1.63 + } 1.64 + 1.65 + if (UseLoopSafepoints) { 1.66 + // XXX if a lcmp is followed by an if_?? then C2 maybe-inserts 1.67 + // the safepoint before the lcmp rather than before the if. 1.68 + // Maybe we should do this too. See parse2.cpp for details. 1.69 + switch (bc()) { 1.70 + case Bytecodes::_goto: 1.71 + case Bytecodes::_ifnull: 1.72 + case Bytecodes::_ifnonnull: 1.73 + case Bytecodes::_if_acmpeq: 1.74 + case Bytecodes::_if_acmpne: 1.75 + case Bytecodes::_ifeq: 1.76 + case Bytecodes::_ifne: 1.77 + case Bytecodes::_iflt: 1.78 + case Bytecodes::_ifle: 1.79 + case Bytecodes::_ifgt: 1.80 + case Bytecodes::_ifge: 1.81 + case Bytecodes::_if_icmpeq: 1.82 + case Bytecodes::_if_icmpne: 1.83 + case Bytecodes::_if_icmplt: 1.84 + case Bytecodes::_if_icmple: 1.85 + case Bytecodes::_if_icmpgt: 1.86 + case Bytecodes::_if_icmpge: 1.87 + if (iter()->get_dest() <= bci()) 1.88 + maybe_add_backedge_safepoint(); 1.89 + break; 1.90 + 1.91 + case Bytecodes::_goto_w: 1.92 + if (iter()->get_far_dest() <= bci()) 1.93 + maybe_add_backedge_safepoint(); 1.94 + break; 1.95 + 1.96 + case Bytecodes::_tableswitch: 1.97 + case Bytecodes::_lookupswitch: 1.98 + if (switch_default_dest() <= bci()) { 1.99 + maybe_add_backedge_safepoint(); 1.100 + break; 1.101 + } 1.102 + int len = switch_table_length(); 1.103 + for (int i = 0; i < len; i++) { 1.104 + if (switch_dest(i) <= bci()) { 1.105 + maybe_add_backedge_safepoint(); 1.106 + break; 1.107 + } 1.108 + } 1.109 + break; 1.110 + } 1.111 + } 1.112 + 1.113 + switch (bc()) { 1.114 + case Bytecodes::_nop: 1.115 + break; 1.116 + 1.117 + case Bytecodes::_aconst_null: 1.118 + push(SharkValue::null()); 1.119 + break; 1.120 + 1.121 + case Bytecodes::_iconst_m1: 1.122 + push(SharkValue::jint_constant(-1)); 1.123 + break; 1.124 + case Bytecodes::_iconst_0: 1.125 + push(SharkValue::jint_constant(0)); 1.126 + break; 1.127 + case Bytecodes::_iconst_1: 1.128 + push(SharkValue::jint_constant(1)); 1.129 + break; 1.130 + case Bytecodes::_iconst_2: 1.131 + push(SharkValue::jint_constant(2)); 1.132 + break; 1.133 + case Bytecodes::_iconst_3: 1.134 + push(SharkValue::jint_constant(3)); 1.135 + break; 1.136 + case Bytecodes::_iconst_4: 1.137 + push(SharkValue::jint_constant(4)); 1.138 + break; 1.139 + case Bytecodes::_iconst_5: 1.140 + push(SharkValue::jint_constant(5)); 1.141 + break; 1.142 + 1.143 + case Bytecodes::_lconst_0: 1.144 + push(SharkValue::jlong_constant(0)); 1.145 + break; 1.146 + case Bytecodes::_lconst_1: 1.147 + push(SharkValue::jlong_constant(1)); 1.148 + break; 1.149 + 1.150 + case Bytecodes::_fconst_0: 1.151 + push(SharkValue::jfloat_constant(0)); 1.152 + break; 1.153 + case Bytecodes::_fconst_1: 1.154 + push(SharkValue::jfloat_constant(1)); 1.155 + break; 1.156 + case Bytecodes::_fconst_2: 1.157 + push(SharkValue::jfloat_constant(2)); 1.158 + break; 1.159 + 1.160 + case Bytecodes::_dconst_0: 1.161 + push(SharkValue::jdouble_constant(0)); 1.162 + break; 1.163 + case Bytecodes::_dconst_1: 1.164 + push(SharkValue::jdouble_constant(1)); 1.165 + break; 1.166 + 1.167 + case Bytecodes::_bipush: 1.168 + push(SharkValue::jint_constant(iter()->get_constant_u1())); 1.169 + break; 1.170 + case Bytecodes::_sipush: 1.171 + push(SharkValue::jint_constant(iter()->get_constant_u2())); 1.172 + break; 1.173 + 1.174 + case Bytecodes::_ldc: 1.175 + case Bytecodes::_ldc_w: 1.176 + case Bytecodes::_ldc2_w: { 1.177 + SharkConstant* constant = SharkConstant::for_ldc(iter()); 1.178 + assert(constant->is_loaded(), "trap should handle unloaded classes"); 1.179 + push(constant->value(builder())); 1.180 + break; 1.181 + } 1.182 + case Bytecodes::_iload_0: 1.183 + case Bytecodes::_lload_0: 1.184 + case Bytecodes::_fload_0: 1.185 + case Bytecodes::_dload_0: 1.186 + case Bytecodes::_aload_0: 1.187 + push(local(0)); 1.188 + break; 1.189 + case Bytecodes::_iload_1: 1.190 + case Bytecodes::_lload_1: 1.191 + case Bytecodes::_fload_1: 1.192 + case Bytecodes::_dload_1: 1.193 + case Bytecodes::_aload_1: 1.194 + push(local(1)); 1.195 + break; 1.196 + case Bytecodes::_iload_2: 1.197 + case Bytecodes::_lload_2: 1.198 + case Bytecodes::_fload_2: 1.199 + case Bytecodes::_dload_2: 1.200 + case Bytecodes::_aload_2: 1.201 + push(local(2)); 1.202 + break; 1.203 + case Bytecodes::_iload_3: 1.204 + case Bytecodes::_lload_3: 1.205 + case Bytecodes::_fload_3: 1.206 + case Bytecodes::_dload_3: 1.207 + case Bytecodes::_aload_3: 1.208 + push(local(3)); 1.209 + break; 1.210 + case Bytecodes::_iload: 1.211 + case Bytecodes::_lload: 1.212 + case Bytecodes::_fload: 1.213 + case Bytecodes::_dload: 1.214 + case Bytecodes::_aload: 1.215 + push(local(iter()->get_index())); 1.216 + break; 1.217 + 1.218 + case Bytecodes::_baload: 1.219 + do_aload(T_BYTE); 1.220 + break; 1.221 + case Bytecodes::_caload: 1.222 + do_aload(T_CHAR); 1.223 + break; 1.224 + case Bytecodes::_saload: 1.225 + do_aload(T_SHORT); 1.226 + break; 1.227 + case Bytecodes::_iaload: 1.228 + do_aload(T_INT); 1.229 + break; 1.230 + case Bytecodes::_laload: 1.231 + do_aload(T_LONG); 1.232 + break; 1.233 + case Bytecodes::_faload: 1.234 + do_aload(T_FLOAT); 1.235 + break; 1.236 + case Bytecodes::_daload: 1.237 + do_aload(T_DOUBLE); 1.238 + break; 1.239 + case Bytecodes::_aaload: 1.240 + do_aload(T_OBJECT); 1.241 + break; 1.242 + 1.243 + case Bytecodes::_istore_0: 1.244 + case Bytecodes::_lstore_0: 1.245 + case Bytecodes::_fstore_0: 1.246 + case Bytecodes::_dstore_0: 1.247 + case Bytecodes::_astore_0: 1.248 + set_local(0, pop()); 1.249 + break; 1.250 + case Bytecodes::_istore_1: 1.251 + case Bytecodes::_lstore_1: 1.252 + case Bytecodes::_fstore_1: 1.253 + case Bytecodes::_dstore_1: 1.254 + case Bytecodes::_astore_1: 1.255 + set_local(1, pop()); 1.256 + break; 1.257 + case Bytecodes::_istore_2: 1.258 + case Bytecodes::_lstore_2: 1.259 + case Bytecodes::_fstore_2: 1.260 + case Bytecodes::_dstore_2: 1.261 + case Bytecodes::_astore_2: 1.262 + set_local(2, pop()); 1.263 + break; 1.264 + case Bytecodes::_istore_3: 1.265 + case Bytecodes::_lstore_3: 1.266 + case Bytecodes::_fstore_3: 1.267 + case Bytecodes::_dstore_3: 1.268 + case Bytecodes::_astore_3: 1.269 + set_local(3, pop()); 1.270 + break; 1.271 + case Bytecodes::_istore: 1.272 + case Bytecodes::_lstore: 1.273 + case Bytecodes::_fstore: 1.274 + case Bytecodes::_dstore: 1.275 + case Bytecodes::_astore: 1.276 + set_local(iter()->get_index(), pop()); 1.277 + break; 1.278 + 1.279 + case Bytecodes::_bastore: 1.280 + do_astore(T_BYTE); 1.281 + break; 1.282 + case Bytecodes::_castore: 1.283 + do_astore(T_CHAR); 1.284 + break; 1.285 + case Bytecodes::_sastore: 1.286 + do_astore(T_SHORT); 1.287 + break; 1.288 + case Bytecodes::_iastore: 1.289 + do_astore(T_INT); 1.290 + break; 1.291 + case Bytecodes::_lastore: 1.292 + do_astore(T_LONG); 1.293 + break; 1.294 + case Bytecodes::_fastore: 1.295 + do_astore(T_FLOAT); 1.296 + break; 1.297 + case Bytecodes::_dastore: 1.298 + do_astore(T_DOUBLE); 1.299 + break; 1.300 + case Bytecodes::_aastore: 1.301 + do_astore(T_OBJECT); 1.302 + break; 1.303 + 1.304 + case Bytecodes::_pop: 1.305 + xpop(); 1.306 + break; 1.307 + case Bytecodes::_pop2: 1.308 + xpop(); 1.309 + xpop(); 1.310 + break; 1.311 + case Bytecodes::_swap: 1.312 + a = xpop(); 1.313 + b = xpop(); 1.314 + xpush(a); 1.315 + xpush(b); 1.316 + break; 1.317 + case Bytecodes::_dup: 1.318 + a = xpop(); 1.319 + xpush(a); 1.320 + xpush(a); 1.321 + break; 1.322 + case Bytecodes::_dup_x1: 1.323 + a = xpop(); 1.324 + b = xpop(); 1.325 + xpush(a); 1.326 + xpush(b); 1.327 + xpush(a); 1.328 + break; 1.329 + case Bytecodes::_dup_x2: 1.330 + a = xpop(); 1.331 + b = xpop(); 1.332 + c = xpop(); 1.333 + xpush(a); 1.334 + xpush(c); 1.335 + xpush(b); 1.336 + xpush(a); 1.337 + break; 1.338 + case Bytecodes::_dup2: 1.339 + a = xpop(); 1.340 + b = xpop(); 1.341 + xpush(b); 1.342 + xpush(a); 1.343 + xpush(b); 1.344 + xpush(a); 1.345 + break; 1.346 + case Bytecodes::_dup2_x1: 1.347 + a = xpop(); 1.348 + b = xpop(); 1.349 + c = xpop(); 1.350 + xpush(b); 1.351 + xpush(a); 1.352 + xpush(c); 1.353 + xpush(b); 1.354 + xpush(a); 1.355 + break; 1.356 + case Bytecodes::_dup2_x2: 1.357 + a = xpop(); 1.358 + b = xpop(); 1.359 + c = xpop(); 1.360 + d = xpop(); 1.361 + xpush(b); 1.362 + xpush(a); 1.363 + xpush(d); 1.364 + xpush(c); 1.365 + xpush(b); 1.366 + xpush(a); 1.367 + break; 1.368 + 1.369 + case Bytecodes::_arraylength: 1.370 + do_arraylength(); 1.371 + break; 1.372 + 1.373 + case Bytecodes::_getfield: 1.374 + do_getfield(); 1.375 + break; 1.376 + case Bytecodes::_getstatic: 1.377 + do_getstatic(); 1.378 + break; 1.379 + case Bytecodes::_putfield: 1.380 + do_putfield(); 1.381 + break; 1.382 + case Bytecodes::_putstatic: 1.383 + do_putstatic(); 1.384 + break; 1.385 + 1.386 + case Bytecodes::_iadd: 1.387 + b = pop(); 1.388 + a = pop(); 1.389 + push(SharkValue::create_jint( 1.390 + builder()->CreateAdd(a->jint_value(), b->jint_value()), false)); 1.391 + break; 1.392 + case Bytecodes::_isub: 1.393 + b = pop(); 1.394 + a = pop(); 1.395 + push(SharkValue::create_jint( 1.396 + builder()->CreateSub(a->jint_value(), b->jint_value()), false)); 1.397 + break; 1.398 + case Bytecodes::_imul: 1.399 + b = pop(); 1.400 + a = pop(); 1.401 + push(SharkValue::create_jint( 1.402 + builder()->CreateMul(a->jint_value(), b->jint_value()), false)); 1.403 + break; 1.404 + case Bytecodes::_idiv: 1.405 + do_idiv(); 1.406 + break; 1.407 + case Bytecodes::_irem: 1.408 + do_irem(); 1.409 + break; 1.410 + case Bytecodes::_ineg: 1.411 + a = pop(); 1.412 + push(SharkValue::create_jint( 1.413 + builder()->CreateNeg(a->jint_value()), a->zero_checked())); 1.414 + break; 1.415 + case Bytecodes::_ishl: 1.416 + b = pop(); 1.417 + a = pop(); 1.418 + push(SharkValue::create_jint( 1.419 + builder()->CreateShl( 1.420 + a->jint_value(), 1.421 + builder()->CreateAnd( 1.422 + b->jint_value(), LLVMValue::jint_constant(0x1f))), false)); 1.423 + break; 1.424 + case Bytecodes::_ishr: 1.425 + b = pop(); 1.426 + a = pop(); 1.427 + push(SharkValue::create_jint( 1.428 + builder()->CreateAShr( 1.429 + a->jint_value(), 1.430 + builder()->CreateAnd( 1.431 + b->jint_value(), LLVMValue::jint_constant(0x1f))), false)); 1.432 + break; 1.433 + case Bytecodes::_iushr: 1.434 + b = pop(); 1.435 + a = pop(); 1.436 + push(SharkValue::create_jint( 1.437 + builder()->CreateLShr( 1.438 + a->jint_value(), 1.439 + builder()->CreateAnd( 1.440 + b->jint_value(), LLVMValue::jint_constant(0x1f))), false)); 1.441 + break; 1.442 + case Bytecodes::_iand: 1.443 + b = pop(); 1.444 + a = pop(); 1.445 + push(SharkValue::create_jint( 1.446 + builder()->CreateAnd(a->jint_value(), b->jint_value()), false)); 1.447 + break; 1.448 + case Bytecodes::_ior: 1.449 + b = pop(); 1.450 + a = pop(); 1.451 + push(SharkValue::create_jint( 1.452 + builder()->CreateOr(a->jint_value(), b->jint_value()), 1.453 + a->zero_checked() && b->zero_checked())); 1.454 + break; 1.455 + case Bytecodes::_ixor: 1.456 + b = pop(); 1.457 + a = pop(); 1.458 + push(SharkValue::create_jint( 1.459 + builder()->CreateXor(a->jint_value(), b->jint_value()), false)); 1.460 + break; 1.461 + 1.462 + case Bytecodes::_ladd: 1.463 + b = pop(); 1.464 + a = pop(); 1.465 + push(SharkValue::create_jlong( 1.466 + builder()->CreateAdd(a->jlong_value(), b->jlong_value()), false)); 1.467 + break; 1.468 + case Bytecodes::_lsub: 1.469 + b = pop(); 1.470 + a = pop(); 1.471 + push(SharkValue::create_jlong( 1.472 + builder()->CreateSub(a->jlong_value(), b->jlong_value()), false)); 1.473 + break; 1.474 + case Bytecodes::_lmul: 1.475 + b = pop(); 1.476 + a = pop(); 1.477 + push(SharkValue::create_jlong( 1.478 + builder()->CreateMul(a->jlong_value(), b->jlong_value()), false)); 1.479 + break; 1.480 + case Bytecodes::_ldiv: 1.481 + do_ldiv(); 1.482 + break; 1.483 + case Bytecodes::_lrem: 1.484 + do_lrem(); 1.485 + break; 1.486 + case Bytecodes::_lneg: 1.487 + a = pop(); 1.488 + push(SharkValue::create_jlong( 1.489 + builder()->CreateNeg(a->jlong_value()), a->zero_checked())); 1.490 + break; 1.491 + case Bytecodes::_lshl: 1.492 + b = pop(); 1.493 + a = pop(); 1.494 + push(SharkValue::create_jlong( 1.495 + builder()->CreateShl( 1.496 + a->jlong_value(), 1.497 + builder()->CreateIntCast( 1.498 + builder()->CreateAnd( 1.499 + b->jint_value(), LLVMValue::jint_constant(0x3f)), 1.500 + SharkType::jlong_type(), true)), false)); 1.501 + break; 1.502 + case Bytecodes::_lshr: 1.503 + b = pop(); 1.504 + a = pop(); 1.505 + push(SharkValue::create_jlong( 1.506 + builder()->CreateAShr( 1.507 + a->jlong_value(), 1.508 + builder()->CreateIntCast( 1.509 + builder()->CreateAnd( 1.510 + b->jint_value(), LLVMValue::jint_constant(0x3f)), 1.511 + SharkType::jlong_type(), true)), false)); 1.512 + break; 1.513 + case Bytecodes::_lushr: 1.514 + b = pop(); 1.515 + a = pop(); 1.516 + push(SharkValue::create_jlong( 1.517 + builder()->CreateLShr( 1.518 + a->jlong_value(), 1.519 + builder()->CreateIntCast( 1.520 + builder()->CreateAnd( 1.521 + b->jint_value(), LLVMValue::jint_constant(0x3f)), 1.522 + SharkType::jlong_type(), true)), false)); 1.523 + break; 1.524 + case Bytecodes::_land: 1.525 + b = pop(); 1.526 + a = pop(); 1.527 + push(SharkValue::create_jlong( 1.528 + builder()->CreateAnd(a->jlong_value(), b->jlong_value()), false)); 1.529 + break; 1.530 + case Bytecodes::_lor: 1.531 + b = pop(); 1.532 + a = pop(); 1.533 + push(SharkValue::create_jlong( 1.534 + builder()->CreateOr(a->jlong_value(), b->jlong_value()), 1.535 + a->zero_checked() && b->zero_checked())); 1.536 + break; 1.537 + case Bytecodes::_lxor: 1.538 + b = pop(); 1.539 + a = pop(); 1.540 + push(SharkValue::create_jlong( 1.541 + builder()->CreateXor(a->jlong_value(), b->jlong_value()), false)); 1.542 + break; 1.543 + 1.544 + case Bytecodes::_fadd: 1.545 + b = pop(); 1.546 + a = pop(); 1.547 + push(SharkValue::create_jfloat( 1.548 + builder()->CreateFAdd(a->jfloat_value(), b->jfloat_value()))); 1.549 + break; 1.550 + case Bytecodes::_fsub: 1.551 + b = pop(); 1.552 + a = pop(); 1.553 + push(SharkValue::create_jfloat( 1.554 + builder()->CreateFSub(a->jfloat_value(), b->jfloat_value()))); 1.555 + break; 1.556 + case Bytecodes::_fmul: 1.557 + b = pop(); 1.558 + a = pop(); 1.559 + push(SharkValue::create_jfloat( 1.560 + builder()->CreateFMul(a->jfloat_value(), b->jfloat_value()))); 1.561 + break; 1.562 + case Bytecodes::_fdiv: 1.563 + b = pop(); 1.564 + a = pop(); 1.565 + push(SharkValue::create_jfloat( 1.566 + builder()->CreateFDiv(a->jfloat_value(), b->jfloat_value()))); 1.567 + break; 1.568 + case Bytecodes::_frem: 1.569 + b = pop(); 1.570 + a = pop(); 1.571 + push(SharkValue::create_jfloat( 1.572 + builder()->CreateFRem(a->jfloat_value(), b->jfloat_value()))); 1.573 + break; 1.574 + case Bytecodes::_fneg: 1.575 + a = pop(); 1.576 + push(SharkValue::create_jfloat( 1.577 + builder()->CreateFNeg(a->jfloat_value()))); 1.578 + break; 1.579 + 1.580 + case Bytecodes::_dadd: 1.581 + b = pop(); 1.582 + a = pop(); 1.583 + push(SharkValue::create_jdouble( 1.584 + builder()->CreateFAdd(a->jdouble_value(), b->jdouble_value()))); 1.585 + break; 1.586 + case Bytecodes::_dsub: 1.587 + b = pop(); 1.588 + a = pop(); 1.589 + push(SharkValue::create_jdouble( 1.590 + builder()->CreateFSub(a->jdouble_value(), b->jdouble_value()))); 1.591 + break; 1.592 + case Bytecodes::_dmul: 1.593 + b = pop(); 1.594 + a = pop(); 1.595 + push(SharkValue::create_jdouble( 1.596 + builder()->CreateFMul(a->jdouble_value(), b->jdouble_value()))); 1.597 + break; 1.598 + case Bytecodes::_ddiv: 1.599 + b = pop(); 1.600 + a = pop(); 1.601 + push(SharkValue::create_jdouble( 1.602 + builder()->CreateFDiv(a->jdouble_value(), b->jdouble_value()))); 1.603 + break; 1.604 + case Bytecodes::_drem: 1.605 + b = pop(); 1.606 + a = pop(); 1.607 + push(SharkValue::create_jdouble( 1.608 + builder()->CreateFRem(a->jdouble_value(), b->jdouble_value()))); 1.609 + break; 1.610 + case Bytecodes::_dneg: 1.611 + a = pop(); 1.612 + push(SharkValue::create_jdouble( 1.613 + builder()->CreateFNeg(a->jdouble_value()))); 1.614 + break; 1.615 + 1.616 + case Bytecodes::_iinc: 1.617 + i = iter()->get_index(); 1.618 + set_local( 1.619 + i, 1.620 + SharkValue::create_jint( 1.621 + builder()->CreateAdd( 1.622 + LLVMValue::jint_constant(iter()->get_iinc_con()), 1.623 + local(i)->jint_value()), false)); 1.624 + break; 1.625 + 1.626 + case Bytecodes::_lcmp: 1.627 + do_lcmp(); 1.628 + break; 1.629 + 1.630 + case Bytecodes::_fcmpl: 1.631 + do_fcmp(false, false); 1.632 + break; 1.633 + case Bytecodes::_fcmpg: 1.634 + do_fcmp(false, true); 1.635 + break; 1.636 + case Bytecodes::_dcmpl: 1.637 + do_fcmp(true, false); 1.638 + break; 1.639 + case Bytecodes::_dcmpg: 1.640 + do_fcmp(true, true); 1.641 + break; 1.642 + 1.643 + case Bytecodes::_i2l: 1.644 + a = pop(); 1.645 + push(SharkValue::create_jlong( 1.646 + builder()->CreateIntCast( 1.647 + a->jint_value(), SharkType::jlong_type(), true), a->zero_checked())); 1.648 + break; 1.649 + case Bytecodes::_i2f: 1.650 + push(SharkValue::create_jfloat( 1.651 + builder()->CreateSIToFP( 1.652 + pop()->jint_value(), SharkType::jfloat_type()))); 1.653 + break; 1.654 + case Bytecodes::_i2d: 1.655 + push(SharkValue::create_jdouble( 1.656 + builder()->CreateSIToFP( 1.657 + pop()->jint_value(), SharkType::jdouble_type()))); 1.658 + break; 1.659 + 1.660 + case Bytecodes::_l2i: 1.661 + push(SharkValue::create_jint( 1.662 + builder()->CreateIntCast( 1.663 + pop()->jlong_value(), SharkType::jint_type(), true), false)); 1.664 + break; 1.665 + case Bytecodes::_l2f: 1.666 + push(SharkValue::create_jfloat( 1.667 + builder()->CreateSIToFP( 1.668 + pop()->jlong_value(), SharkType::jfloat_type()))); 1.669 + break; 1.670 + case Bytecodes::_l2d: 1.671 + push(SharkValue::create_jdouble( 1.672 + builder()->CreateSIToFP( 1.673 + pop()->jlong_value(), SharkType::jdouble_type()))); 1.674 + break; 1.675 + 1.676 + case Bytecodes::_f2i: 1.677 + push(SharkValue::create_jint( 1.678 + builder()->CreateCall( 1.679 + builder()->f2i(), pop()->jfloat_value()), false)); 1.680 + break; 1.681 + case Bytecodes::_f2l: 1.682 + push(SharkValue::create_jlong( 1.683 + builder()->CreateCall( 1.684 + builder()->f2l(), pop()->jfloat_value()), false)); 1.685 + break; 1.686 + case Bytecodes::_f2d: 1.687 + push(SharkValue::create_jdouble( 1.688 + builder()->CreateFPExt( 1.689 + pop()->jfloat_value(), SharkType::jdouble_type()))); 1.690 + break; 1.691 + 1.692 + case Bytecodes::_d2i: 1.693 + push(SharkValue::create_jint( 1.694 + builder()->CreateCall( 1.695 + builder()->d2i(), pop()->jdouble_value()), false)); 1.696 + break; 1.697 + case Bytecodes::_d2l: 1.698 + push(SharkValue::create_jlong( 1.699 + builder()->CreateCall( 1.700 + builder()->d2l(), pop()->jdouble_value()), false)); 1.701 + break; 1.702 + case Bytecodes::_d2f: 1.703 + push(SharkValue::create_jfloat( 1.704 + builder()->CreateFPTrunc( 1.705 + pop()->jdouble_value(), SharkType::jfloat_type()))); 1.706 + break; 1.707 + 1.708 + case Bytecodes::_i2b: 1.709 + push(SharkValue::create_jint( 1.710 + builder()->CreateAShr( 1.711 + builder()->CreateShl( 1.712 + pop()->jint_value(), 1.713 + LLVMValue::jint_constant(24)), 1.714 + LLVMValue::jint_constant(24)), false)); 1.715 + break; 1.716 + case Bytecodes::_i2c: 1.717 + push(SharkValue::create_jint( 1.718 + builder()->CreateAnd( 1.719 + pop()->jint_value(), 1.720 + LLVMValue::jint_constant(0xffff)), false)); 1.721 + break; 1.722 + case Bytecodes::_i2s: 1.723 + push(SharkValue::create_jint( 1.724 + builder()->CreateAShr( 1.725 + builder()->CreateShl( 1.726 + pop()->jint_value(), 1.727 + LLVMValue::jint_constant(16)), 1.728 + LLVMValue::jint_constant(16)), false)); 1.729 + break; 1.730 + 1.731 + case Bytecodes::_return: 1.732 + do_return(T_VOID); 1.733 + break; 1.734 + case Bytecodes::_ireturn: 1.735 + do_return(T_INT); 1.736 + break; 1.737 + case Bytecodes::_lreturn: 1.738 + do_return(T_LONG); 1.739 + break; 1.740 + case Bytecodes::_freturn: 1.741 + do_return(T_FLOAT); 1.742 + break; 1.743 + case Bytecodes::_dreturn: 1.744 + do_return(T_DOUBLE); 1.745 + break; 1.746 + case Bytecodes::_areturn: 1.747 + do_return(T_OBJECT); 1.748 + break; 1.749 + 1.750 + case Bytecodes::_athrow: 1.751 + do_athrow(); 1.752 + break; 1.753 + 1.754 + case Bytecodes::_goto: 1.755 + case Bytecodes::_goto_w: 1.756 + do_goto(); 1.757 + break; 1.758 + 1.759 + case Bytecodes::_jsr: 1.760 + case Bytecodes::_jsr_w: 1.761 + do_jsr(); 1.762 + break; 1.763 + 1.764 + case Bytecodes::_ret: 1.765 + do_ret(); 1.766 + break; 1.767 + 1.768 + case Bytecodes::_ifnull: 1.769 + do_if(ICmpInst::ICMP_EQ, SharkValue::null(), pop()); 1.770 + break; 1.771 + case Bytecodes::_ifnonnull: 1.772 + do_if(ICmpInst::ICMP_NE, SharkValue::null(), pop()); 1.773 + break; 1.774 + case Bytecodes::_if_acmpeq: 1.775 + b = pop(); 1.776 + a = pop(); 1.777 + do_if(ICmpInst::ICMP_EQ, b, a); 1.778 + break; 1.779 + case Bytecodes::_if_acmpne: 1.780 + b = pop(); 1.781 + a = pop(); 1.782 + do_if(ICmpInst::ICMP_NE, b, a); 1.783 + break; 1.784 + case Bytecodes::_ifeq: 1.785 + do_if(ICmpInst::ICMP_EQ, SharkValue::jint_constant(0), pop()); 1.786 + break; 1.787 + case Bytecodes::_ifne: 1.788 + do_if(ICmpInst::ICMP_NE, SharkValue::jint_constant(0), pop()); 1.789 + break; 1.790 + case Bytecodes::_iflt: 1.791 + do_if(ICmpInst::ICMP_SLT, SharkValue::jint_constant(0), pop()); 1.792 + break; 1.793 + case Bytecodes::_ifle: 1.794 + do_if(ICmpInst::ICMP_SLE, SharkValue::jint_constant(0), pop()); 1.795 + break; 1.796 + case Bytecodes::_ifgt: 1.797 + do_if(ICmpInst::ICMP_SGT, SharkValue::jint_constant(0), pop()); 1.798 + break; 1.799 + case Bytecodes::_ifge: 1.800 + do_if(ICmpInst::ICMP_SGE, SharkValue::jint_constant(0), pop()); 1.801 + break; 1.802 + case Bytecodes::_if_icmpeq: 1.803 + b = pop(); 1.804 + a = pop(); 1.805 + do_if(ICmpInst::ICMP_EQ, b, a); 1.806 + break; 1.807 + case Bytecodes::_if_icmpne: 1.808 + b = pop(); 1.809 + a = pop(); 1.810 + do_if(ICmpInst::ICMP_NE, b, a); 1.811 + break; 1.812 + case Bytecodes::_if_icmplt: 1.813 + b = pop(); 1.814 + a = pop(); 1.815 + do_if(ICmpInst::ICMP_SLT, b, a); 1.816 + break; 1.817 + case Bytecodes::_if_icmple: 1.818 + b = pop(); 1.819 + a = pop(); 1.820 + do_if(ICmpInst::ICMP_SLE, b, a); 1.821 + break; 1.822 + case Bytecodes::_if_icmpgt: 1.823 + b = pop(); 1.824 + a = pop(); 1.825 + do_if(ICmpInst::ICMP_SGT, b, a); 1.826 + break; 1.827 + case Bytecodes::_if_icmpge: 1.828 + b = pop(); 1.829 + a = pop(); 1.830 + do_if(ICmpInst::ICMP_SGE, b, a); 1.831 + break; 1.832 + 1.833 + case Bytecodes::_tableswitch: 1.834 + case Bytecodes::_lookupswitch: 1.835 + do_switch(); 1.836 + break; 1.837 + 1.838 + case Bytecodes::_invokestatic: 1.839 + case Bytecodes::_invokespecial: 1.840 + case Bytecodes::_invokevirtual: 1.841 + case Bytecodes::_invokeinterface: 1.842 + do_call(); 1.843 + break; 1.844 + 1.845 + case Bytecodes::_instanceof: 1.846 + // This is a very common construct: 1.847 + // 1.848 + // if (object instanceof Klass) { 1.849 + // something = (Klass) object; 1.850 + // ... 1.851 + // } 1.852 + // 1.853 + // which gets compiled to something like this: 1.854 + // 1.855 + // 28: aload 9 1.856 + // 30: instanceof <Class Klass> 1.857 + // 33: ifeq 52 1.858 + // 36: aload 9 1.859 + // 38: checkcast <Class Klass> 1.860 + // 1.861 + // Handling both bytecodes at once allows us 1.862 + // to eliminate the checkcast. 1.863 + if (iter()->next_bci() < limit && 1.864 + (iter()->next_bc() == Bytecodes::_ifeq || 1.865 + iter()->next_bc() == Bytecodes::_ifne) && 1.866 + (!UseLoopSafepoints || 1.867 + iter()->next_get_dest() > iter()->next_bci())) { 1.868 + if (maybe_do_instanceof_if()) { 1.869 + iter()->next(); 1.870 + if (SharkTraceBytecodes) 1.871 + tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc())); 1.872 + break; 1.873 + } 1.874 + } 1.875 + // fall through 1.876 + case Bytecodes::_checkcast: 1.877 + do_instance_check(); 1.878 + break; 1.879 + 1.880 + case Bytecodes::_new: 1.881 + do_new(); 1.882 + break; 1.883 + case Bytecodes::_newarray: 1.884 + do_newarray(); 1.885 + break; 1.886 + case Bytecodes::_anewarray: 1.887 + do_anewarray(); 1.888 + break; 1.889 + case Bytecodes::_multianewarray: 1.890 + do_multianewarray(); 1.891 + break; 1.892 + 1.893 + case Bytecodes::_monitorenter: 1.894 + do_monitorenter(); 1.895 + break; 1.896 + case Bytecodes::_monitorexit: 1.897 + do_monitorexit(); 1.898 + break; 1.899 + 1.900 + default: 1.901 + ShouldNotReachHere(); 1.902 + } 1.903 + } 1.904 +} 1.905 + 1.906 +SharkState* SharkBlock::initial_current_state() { 1.907 + return entry_state()->copy(); 1.908 +} 1.909 + 1.910 +int SharkBlock::switch_default_dest() { 1.911 + return iter()->get_dest_table(0); 1.912 +} 1.913 + 1.914 +int SharkBlock::switch_table_length() { 1.915 + switch(bc()) { 1.916 + case Bytecodes::_tableswitch: 1.917 + return iter()->get_int_table(2) - iter()->get_int_table(1) + 1; 1.918 + 1.919 + case Bytecodes::_lookupswitch: 1.920 + return iter()->get_int_table(1); 1.921 + 1.922 + default: 1.923 + ShouldNotReachHere(); 1.924 + } 1.925 +} 1.926 + 1.927 +int SharkBlock::switch_key(int i) { 1.928 + switch(bc()) { 1.929 + case Bytecodes::_tableswitch: 1.930 + return iter()->get_int_table(1) + i; 1.931 + 1.932 + case Bytecodes::_lookupswitch: 1.933 + return iter()->get_int_table(2 + 2 * i); 1.934 + 1.935 + default: 1.936 + ShouldNotReachHere(); 1.937 + } 1.938 +} 1.939 + 1.940 +int SharkBlock::switch_dest(int i) { 1.941 + switch(bc()) { 1.942 + case Bytecodes::_tableswitch: 1.943 + return iter()->get_dest_table(i + 3); 1.944 + 1.945 + case Bytecodes::_lookupswitch: 1.946 + return iter()->get_dest_table(2 + 2 * i + 1); 1.947 + 1.948 + default: 1.949 + ShouldNotReachHere(); 1.950 + } 1.951 +} 1.952 + 1.953 +void SharkBlock::do_div_or_rem(bool is_long, bool is_rem) { 1.954 + SharkValue *sb = pop(); 1.955 + SharkValue *sa = pop(); 1.956 + 1.957 + check_divide_by_zero(sb); 1.958 + 1.959 + Value *a, *b, *p, *q; 1.960 + if (is_long) { 1.961 + a = sa->jlong_value(); 1.962 + b = sb->jlong_value(); 1.963 + p = LLVMValue::jlong_constant(0x8000000000000000LL); 1.964 + q = LLVMValue::jlong_constant(-1); 1.965 + } 1.966 + else { 1.967 + a = sa->jint_value(); 1.968 + b = sb->jint_value(); 1.969 + p = LLVMValue::jint_constant(0x80000000); 1.970 + q = LLVMValue::jint_constant(-1); 1.971 + } 1.972 + 1.973 + BasicBlock *ip = builder()->GetBlockInsertionPoint(); 1.974 + BasicBlock *special_case = builder()->CreateBlock(ip, "special_case"); 1.975 + BasicBlock *general_case = builder()->CreateBlock(ip, "general_case"); 1.976 + BasicBlock *done = builder()->CreateBlock(ip, "done"); 1.977 + 1.978 + builder()->CreateCondBr( 1.979 + builder()->CreateAnd( 1.980 + builder()->CreateICmpEQ(a, p), 1.981 + builder()->CreateICmpEQ(b, q)), 1.982 + special_case, general_case); 1.983 + 1.984 + builder()->SetInsertPoint(special_case); 1.985 + Value *special_result; 1.986 + if (is_rem) { 1.987 + if (is_long) 1.988 + special_result = LLVMValue::jlong_constant(0); 1.989 + else 1.990 + special_result = LLVMValue::jint_constant(0); 1.991 + } 1.992 + else { 1.993 + special_result = a; 1.994 + } 1.995 + builder()->CreateBr(done); 1.996 + 1.997 + builder()->SetInsertPoint(general_case); 1.998 + Value *general_result; 1.999 + if (is_rem) 1.1000 + general_result = builder()->CreateSRem(a, b); 1.1001 + else 1.1002 + general_result = builder()->CreateSDiv(a, b); 1.1003 + builder()->CreateBr(done); 1.1004 + 1.1005 + builder()->SetInsertPoint(done); 1.1006 + PHINode *result; 1.1007 + if (is_long) 1.1008 + result = builder()->CreatePHI(SharkType::jlong_type(), 0, "result"); 1.1009 + else 1.1010 + result = builder()->CreatePHI(SharkType::jint_type(), 0, "result"); 1.1011 + result->addIncoming(special_result, special_case); 1.1012 + result->addIncoming(general_result, general_case); 1.1013 + 1.1014 + if (is_long) 1.1015 + push(SharkValue::create_jlong(result, false)); 1.1016 + else 1.1017 + push(SharkValue::create_jint(result, false)); 1.1018 +} 1.1019 + 1.1020 +void SharkBlock::do_field_access(bool is_get, bool is_field) { 1.1021 + bool will_link; 1.1022 + ciField *field = iter()->get_field(will_link); 1.1023 + assert(will_link, "typeflow responsibility"); 1.1024 + assert(is_field != field->is_static(), "mismatch"); 1.1025 + 1.1026 + // Pop the value off the stack where necessary 1.1027 + SharkValue *value = NULL; 1.1028 + if (!is_get) 1.1029 + value = pop(); 1.1030 + 1.1031 + // Find the object we're accessing, if necessary 1.1032 + Value *object = NULL; 1.1033 + if (is_field) { 1.1034 + SharkValue *value = pop(); 1.1035 + check_null(value); 1.1036 + object = value->generic_value(); 1.1037 + } 1.1038 + if (is_get && field->is_constant() && field->is_static()) { 1.1039 + SharkConstant *constant = SharkConstant::for_field(iter()); 1.1040 + if (constant->is_loaded()) 1.1041 + value = constant->value(builder()); 1.1042 + } 1.1043 + if (!is_get || value == NULL) { 1.1044 + if (!is_field) { 1.1045 + object = builder()->CreateInlineOop(field->holder()->java_mirror()); 1.1046 + } 1.1047 + BasicType basic_type = field->type()->basic_type(); 1.1048 + Type *stack_type = SharkType::to_stackType(basic_type); 1.1049 + Type *field_type = SharkType::to_arrayType(basic_type); 1.1050 + Type *type = field_type; 1.1051 + if (field->is_volatile()) { 1.1052 + if (field_type == SharkType::jfloat_type()) { 1.1053 + type = SharkType::jint_type(); 1.1054 + } else if (field_type == SharkType::jdouble_type()) { 1.1055 + type = SharkType::jlong_type(); 1.1056 + } 1.1057 + } 1.1058 + Value *addr = builder()->CreateAddressOfStructEntry( 1.1059 + object, in_ByteSize(field->offset_in_bytes()), 1.1060 + PointerType::getUnqual(type), 1.1061 + "addr"); 1.1062 + 1.1063 + // Do the access 1.1064 + if (is_get) { 1.1065 + Value* field_value; 1.1066 + if (field->is_volatile()) { 1.1067 + field_value = builder()->CreateAtomicLoad(addr); 1.1068 + field_value = builder()->CreateBitCast(field_value, field_type); 1.1069 + } else { 1.1070 + field_value = builder()->CreateLoad(addr); 1.1071 + } 1.1072 + if (field_type != stack_type) { 1.1073 + field_value = builder()->CreateIntCast( 1.1074 + field_value, stack_type, basic_type != T_CHAR); 1.1075 + } 1.1076 + 1.1077 + value = SharkValue::create_generic(field->type(), field_value, false); 1.1078 + } 1.1079 + else { 1.1080 + Value *field_value = value->generic_value(); 1.1081 + 1.1082 + if (field_type != stack_type) { 1.1083 + field_value = builder()->CreateIntCast( 1.1084 + field_value, field_type, basic_type != T_CHAR); 1.1085 + } 1.1086 + 1.1087 + if (field->is_volatile()) { 1.1088 + field_value = builder()->CreateBitCast(field_value, type); 1.1089 + builder()->CreateAtomicStore(field_value, addr); 1.1090 + } else { 1.1091 + builder()->CreateStore(field_value, addr); 1.1092 + } 1.1093 + 1.1094 + if (!field->type()->is_primitive_type()) { 1.1095 + builder()->CreateUpdateBarrierSet(oopDesc::bs(), addr); 1.1096 + } 1.1097 + } 1.1098 + } 1.1099 + 1.1100 + // Push the value onto the stack where necessary 1.1101 + if (is_get) 1.1102 + push(value); 1.1103 +} 1.1104 + 1.1105 +void SharkBlock::do_lcmp() { 1.1106 + Value *b = pop()->jlong_value(); 1.1107 + Value *a = pop()->jlong_value(); 1.1108 + 1.1109 + BasicBlock *ip = builder()->GetBlockInsertionPoint(); 1.1110 + BasicBlock *ne = builder()->CreateBlock(ip, "lcmp_ne"); 1.1111 + BasicBlock *lt = builder()->CreateBlock(ip, "lcmp_lt"); 1.1112 + BasicBlock *gt = builder()->CreateBlock(ip, "lcmp_gt"); 1.1113 + BasicBlock *done = builder()->CreateBlock(ip, "done"); 1.1114 + 1.1115 + BasicBlock *eq = builder()->GetInsertBlock(); 1.1116 + builder()->CreateCondBr(builder()->CreateICmpEQ(a, b), done, ne); 1.1117 + 1.1118 + builder()->SetInsertPoint(ne); 1.1119 + builder()->CreateCondBr(builder()->CreateICmpSLT(a, b), lt, gt); 1.1120 + 1.1121 + builder()->SetInsertPoint(lt); 1.1122 + builder()->CreateBr(done); 1.1123 + 1.1124 + builder()->SetInsertPoint(gt); 1.1125 + builder()->CreateBr(done); 1.1126 + 1.1127 + builder()->SetInsertPoint(done); 1.1128 + PHINode *result = builder()->CreatePHI(SharkType::jint_type(), 0, "result"); 1.1129 + result->addIncoming(LLVMValue::jint_constant(-1), lt); 1.1130 + result->addIncoming(LLVMValue::jint_constant(0), eq); 1.1131 + result->addIncoming(LLVMValue::jint_constant(1), gt); 1.1132 + 1.1133 + push(SharkValue::create_jint(result, false)); 1.1134 +} 1.1135 + 1.1136 +void SharkBlock::do_fcmp(bool is_double, bool unordered_is_greater) { 1.1137 + Value *a, *b; 1.1138 + if (is_double) { 1.1139 + b = pop()->jdouble_value(); 1.1140 + a = pop()->jdouble_value(); 1.1141 + } 1.1142 + else { 1.1143 + b = pop()->jfloat_value(); 1.1144 + a = pop()->jfloat_value(); 1.1145 + } 1.1146 + 1.1147 + BasicBlock *ip = builder()->GetBlockInsertionPoint(); 1.1148 + BasicBlock *ordered = builder()->CreateBlock(ip, "ordered"); 1.1149 + BasicBlock *ge = builder()->CreateBlock(ip, "fcmp_ge"); 1.1150 + BasicBlock *lt = builder()->CreateBlock(ip, "fcmp_lt"); 1.1151 + BasicBlock *eq = builder()->CreateBlock(ip, "fcmp_eq"); 1.1152 + BasicBlock *gt = builder()->CreateBlock(ip, "fcmp_gt"); 1.1153 + BasicBlock *done = builder()->CreateBlock(ip, "done"); 1.1154 + 1.1155 + builder()->CreateCondBr( 1.1156 + builder()->CreateFCmpUNO(a, b), 1.1157 + unordered_is_greater ? gt : lt, ordered); 1.1158 + 1.1159 + builder()->SetInsertPoint(ordered); 1.1160 + builder()->CreateCondBr(builder()->CreateFCmpULT(a, b), lt, ge); 1.1161 + 1.1162 + builder()->SetInsertPoint(ge); 1.1163 + builder()->CreateCondBr(builder()->CreateFCmpUGT(a, b), gt, eq); 1.1164 + 1.1165 + builder()->SetInsertPoint(lt); 1.1166 + builder()->CreateBr(done); 1.1167 + 1.1168 + builder()->SetInsertPoint(gt); 1.1169 + builder()->CreateBr(done); 1.1170 + 1.1171 + builder()->SetInsertPoint(eq); 1.1172 + builder()->CreateBr(done); 1.1173 + 1.1174 + builder()->SetInsertPoint(done); 1.1175 + PHINode *result = builder()->CreatePHI(SharkType::jint_type(), 0, "result"); 1.1176 + result->addIncoming(LLVMValue::jint_constant(-1), lt); 1.1177 + result->addIncoming(LLVMValue::jint_constant(0), eq); 1.1178 + result->addIncoming(LLVMValue::jint_constant(1), gt); 1.1179 + 1.1180 + push(SharkValue::create_jint(result, false)); 1.1181 +} 1.1182 + 1.1183 +void SharkBlock::emit_IR() { 1.1184 + ShouldNotCallThis(); 1.1185 +} 1.1186 + 1.1187 +SharkState* SharkBlock::entry_state() { 1.1188 + ShouldNotCallThis(); 1.1189 +} 1.1190 + 1.1191 +void SharkBlock::do_zero_check(SharkValue* value) { 1.1192 + ShouldNotCallThis(); 1.1193 +} 1.1194 + 1.1195 +void SharkBlock::maybe_add_backedge_safepoint() { 1.1196 + ShouldNotCallThis(); 1.1197 +} 1.1198 + 1.1199 +bool SharkBlock::has_trap() { 1.1200 + return false; 1.1201 +} 1.1202 + 1.1203 +int SharkBlock::trap_request() { 1.1204 + ShouldNotCallThis(); 1.1205 +} 1.1206 + 1.1207 +int SharkBlock::trap_bci() { 1.1208 + ShouldNotCallThis(); 1.1209 +} 1.1210 + 1.1211 +void SharkBlock::do_trap(int trap_request) { 1.1212 + ShouldNotCallThis(); 1.1213 +} 1.1214 + 1.1215 +void SharkBlock::do_arraylength() { 1.1216 + ShouldNotCallThis(); 1.1217 +} 1.1218 + 1.1219 +void SharkBlock::do_aload(BasicType basic_type) { 1.1220 + ShouldNotCallThis(); 1.1221 +} 1.1222 + 1.1223 +void SharkBlock::do_astore(BasicType basic_type) { 1.1224 + ShouldNotCallThis(); 1.1225 +} 1.1226 + 1.1227 +void SharkBlock::do_return(BasicType type) { 1.1228 + ShouldNotCallThis(); 1.1229 +} 1.1230 + 1.1231 +void SharkBlock::do_athrow() { 1.1232 + ShouldNotCallThis(); 1.1233 +} 1.1234 + 1.1235 +void SharkBlock::do_goto() { 1.1236 + ShouldNotCallThis(); 1.1237 +} 1.1238 + 1.1239 +void SharkBlock::do_jsr() { 1.1240 + ShouldNotCallThis(); 1.1241 +} 1.1242 + 1.1243 +void SharkBlock::do_ret() { 1.1244 + ShouldNotCallThis(); 1.1245 +} 1.1246 + 1.1247 +void SharkBlock::do_if(ICmpInst::Predicate p, SharkValue* b, SharkValue* a) { 1.1248 + ShouldNotCallThis(); 1.1249 +} 1.1250 + 1.1251 +void SharkBlock::do_switch() { 1.1252 + ShouldNotCallThis(); 1.1253 +} 1.1254 + 1.1255 +void SharkBlock::do_call() { 1.1256 + ShouldNotCallThis(); 1.1257 +} 1.1258 + 1.1259 +void SharkBlock::do_instance_check() { 1.1260 + ShouldNotCallThis(); 1.1261 +} 1.1262 + 1.1263 +bool SharkBlock::maybe_do_instanceof_if() { 1.1264 + ShouldNotCallThis(); 1.1265 +} 1.1266 + 1.1267 +void SharkBlock::do_new() { 1.1268 + ShouldNotCallThis(); 1.1269 +} 1.1270 + 1.1271 +void SharkBlock::do_newarray() { 1.1272 + ShouldNotCallThis(); 1.1273 +} 1.1274 + 1.1275 +void SharkBlock::do_anewarray() { 1.1276 + ShouldNotCallThis(); 1.1277 +} 1.1278 + 1.1279 +void SharkBlock::do_multianewarray() { 1.1280 + ShouldNotCallThis(); 1.1281 +} 1.1282 + 1.1283 +void SharkBlock::do_monitorenter() { 1.1284 + ShouldNotCallThis(); 1.1285 +} 1.1286 + 1.1287 +void SharkBlock::do_monitorexit() { 1.1288 + ShouldNotCallThis(); 1.1289 +}