Wed, 11 Aug 2010 05:51:21 -0700
6976186: integrate Shark HotSpot changes
Summary: Shark is a JIT compiler for Zero that uses the LLVM compiler infrastructure.
Reviewed-by: kvn, twisti
Contributed-by: Gary Benson <gbenson@redhat.com>
twisti@2047 | 1 | /* |
twisti@2047 | 2 | * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. |
twisti@2047 | 3 | * Copyright 2008, 2009, 2010 Red Hat, Inc. |
twisti@2047 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
twisti@2047 | 5 | * |
twisti@2047 | 6 | * This code is free software; you can redistribute it and/or modify it |
twisti@2047 | 7 | * under the terms of the GNU General Public License version 2 only, as |
twisti@2047 | 8 | * published by the Free Software Foundation. |
twisti@2047 | 9 | * |
twisti@2047 | 10 | * This code is distributed in the hope that it will be useful, but WITHOUT |
twisti@2047 | 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
twisti@2047 | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
twisti@2047 | 13 | * version 2 for more details (a copy is included in the LICENSE file that |
twisti@2047 | 14 | * accompanied this code). |
twisti@2047 | 15 | * |
twisti@2047 | 16 | * You should have received a copy of the GNU General Public License version |
twisti@2047 | 17 | * 2 along with this work; if not, write to the Free Software Foundation, |
twisti@2047 | 18 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
twisti@2047 | 19 | * |
twisti@2047 | 20 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
twisti@2047 | 21 | * or visit www.oracle.com if you need additional information or have any |
twisti@2047 | 22 | * questions. |
twisti@2047 | 23 | * |
twisti@2047 | 24 | */ |
twisti@2047 | 25 | |
twisti@2047 | 26 | #include "incls/_precompiled.incl" |
twisti@2047 | 27 | #include "incls/_sharkBlock.cpp.incl" |
twisti@2047 | 28 | |
twisti@2047 | 29 | using namespace llvm; |
twisti@2047 | 30 | |
twisti@2047 | 31 | void SharkBlock::parse_bytecode(int start, int limit) { |
twisti@2047 | 32 | SharkValue *a, *b, *c, *d; |
twisti@2047 | 33 | int i; |
twisti@2047 | 34 | |
twisti@2047 | 35 | // Ensure the current state is initialized before we emit any code, |
twisti@2047 | 36 | // so that any setup code for the state is at the start of the block |
twisti@2047 | 37 | current_state(); |
twisti@2047 | 38 | |
twisti@2047 | 39 | // Parse the bytecodes |
twisti@2047 | 40 | iter()->reset_to_bci(start); |
twisti@2047 | 41 | while (iter()->next_bci() < limit) { |
twisti@2047 | 42 | NOT_PRODUCT(a = b = c = d = NULL); |
twisti@2047 | 43 | iter()->next(); |
twisti@2047 | 44 | |
twisti@2047 | 45 | if (SharkTraceBytecodes) |
twisti@2047 | 46 | tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc())); |
twisti@2047 | 47 | |
twisti@2047 | 48 | if (has_trap() && trap_bci() == bci()) { |
twisti@2047 | 49 | do_trap(trap_request()); |
twisti@2047 | 50 | return; |
twisti@2047 | 51 | } |
twisti@2047 | 52 | |
twisti@2047 | 53 | if (UseLoopSafepoints) { |
twisti@2047 | 54 | // XXX if a lcmp is followed by an if_?? then C2 maybe-inserts |
twisti@2047 | 55 | // the safepoint before the lcmp rather than before the if. |
twisti@2047 | 56 | // Maybe we should do this too. See parse2.cpp for details. |
twisti@2047 | 57 | switch (bc()) { |
twisti@2047 | 58 | case Bytecodes::_goto: |
twisti@2047 | 59 | case Bytecodes::_ifnull: |
twisti@2047 | 60 | case Bytecodes::_ifnonnull: |
twisti@2047 | 61 | case Bytecodes::_if_acmpeq: |
twisti@2047 | 62 | case Bytecodes::_if_acmpne: |
twisti@2047 | 63 | case Bytecodes::_ifeq: |
twisti@2047 | 64 | case Bytecodes::_ifne: |
twisti@2047 | 65 | case Bytecodes::_iflt: |
twisti@2047 | 66 | case Bytecodes::_ifle: |
twisti@2047 | 67 | case Bytecodes::_ifgt: |
twisti@2047 | 68 | case Bytecodes::_ifge: |
twisti@2047 | 69 | case Bytecodes::_if_icmpeq: |
twisti@2047 | 70 | case Bytecodes::_if_icmpne: |
twisti@2047 | 71 | case Bytecodes::_if_icmplt: |
twisti@2047 | 72 | case Bytecodes::_if_icmple: |
twisti@2047 | 73 | case Bytecodes::_if_icmpgt: |
twisti@2047 | 74 | case Bytecodes::_if_icmpge: |
twisti@2047 | 75 | if (iter()->get_dest() <= bci()) |
twisti@2047 | 76 | maybe_add_backedge_safepoint(); |
twisti@2047 | 77 | break; |
twisti@2047 | 78 | |
twisti@2047 | 79 | case Bytecodes::_goto_w: |
twisti@2047 | 80 | if (iter()->get_far_dest() <= bci()) |
twisti@2047 | 81 | maybe_add_backedge_safepoint(); |
twisti@2047 | 82 | break; |
twisti@2047 | 83 | |
twisti@2047 | 84 | case Bytecodes::_tableswitch: |
twisti@2047 | 85 | case Bytecodes::_lookupswitch: |
twisti@2047 | 86 | if (switch_default_dest() <= bci()) { |
twisti@2047 | 87 | maybe_add_backedge_safepoint(); |
twisti@2047 | 88 | break; |
twisti@2047 | 89 | } |
twisti@2047 | 90 | int len = switch_table_length(); |
twisti@2047 | 91 | for (int i = 0; i < len; i++) { |
twisti@2047 | 92 | if (switch_dest(i) <= bci()) { |
twisti@2047 | 93 | maybe_add_backedge_safepoint(); |
twisti@2047 | 94 | break; |
twisti@2047 | 95 | } |
twisti@2047 | 96 | } |
twisti@2047 | 97 | break; |
twisti@2047 | 98 | } |
twisti@2047 | 99 | } |
twisti@2047 | 100 | |
twisti@2047 | 101 | switch (bc()) { |
twisti@2047 | 102 | case Bytecodes::_nop: |
twisti@2047 | 103 | break; |
twisti@2047 | 104 | |
twisti@2047 | 105 | case Bytecodes::_aconst_null: |
twisti@2047 | 106 | push(SharkValue::null()); |
twisti@2047 | 107 | break; |
twisti@2047 | 108 | |
twisti@2047 | 109 | case Bytecodes::_iconst_m1: |
twisti@2047 | 110 | push(SharkValue::jint_constant(-1)); |
twisti@2047 | 111 | break; |
twisti@2047 | 112 | case Bytecodes::_iconst_0: |
twisti@2047 | 113 | push(SharkValue::jint_constant(0)); |
twisti@2047 | 114 | break; |
twisti@2047 | 115 | case Bytecodes::_iconst_1: |
twisti@2047 | 116 | push(SharkValue::jint_constant(1)); |
twisti@2047 | 117 | break; |
twisti@2047 | 118 | case Bytecodes::_iconst_2: |
twisti@2047 | 119 | push(SharkValue::jint_constant(2)); |
twisti@2047 | 120 | break; |
twisti@2047 | 121 | case Bytecodes::_iconst_3: |
twisti@2047 | 122 | push(SharkValue::jint_constant(3)); |
twisti@2047 | 123 | break; |
twisti@2047 | 124 | case Bytecodes::_iconst_4: |
twisti@2047 | 125 | push(SharkValue::jint_constant(4)); |
twisti@2047 | 126 | break; |
twisti@2047 | 127 | case Bytecodes::_iconst_5: |
twisti@2047 | 128 | push(SharkValue::jint_constant(5)); |
twisti@2047 | 129 | break; |
twisti@2047 | 130 | |
twisti@2047 | 131 | case Bytecodes::_lconst_0: |
twisti@2047 | 132 | push(SharkValue::jlong_constant(0)); |
twisti@2047 | 133 | break; |
twisti@2047 | 134 | case Bytecodes::_lconst_1: |
twisti@2047 | 135 | push(SharkValue::jlong_constant(1)); |
twisti@2047 | 136 | break; |
twisti@2047 | 137 | |
twisti@2047 | 138 | case Bytecodes::_fconst_0: |
twisti@2047 | 139 | push(SharkValue::jfloat_constant(0)); |
twisti@2047 | 140 | break; |
twisti@2047 | 141 | case Bytecodes::_fconst_1: |
twisti@2047 | 142 | push(SharkValue::jfloat_constant(1)); |
twisti@2047 | 143 | break; |
twisti@2047 | 144 | case Bytecodes::_fconst_2: |
twisti@2047 | 145 | push(SharkValue::jfloat_constant(2)); |
twisti@2047 | 146 | break; |
twisti@2047 | 147 | |
twisti@2047 | 148 | case Bytecodes::_dconst_0: |
twisti@2047 | 149 | push(SharkValue::jdouble_constant(0)); |
twisti@2047 | 150 | break; |
twisti@2047 | 151 | case Bytecodes::_dconst_1: |
twisti@2047 | 152 | push(SharkValue::jdouble_constant(1)); |
twisti@2047 | 153 | break; |
twisti@2047 | 154 | |
twisti@2047 | 155 | case Bytecodes::_bipush: |
twisti@2047 | 156 | push(SharkValue::jint_constant(iter()->get_constant_u1())); |
twisti@2047 | 157 | break; |
twisti@2047 | 158 | case Bytecodes::_sipush: |
twisti@2047 | 159 | push(SharkValue::jint_constant(iter()->get_constant_u2())); |
twisti@2047 | 160 | break; |
twisti@2047 | 161 | |
twisti@2047 | 162 | case Bytecodes::_ldc: |
twisti@2047 | 163 | case Bytecodes::_ldc_w: |
twisti@2047 | 164 | case Bytecodes::_ldc2_w: |
twisti@2047 | 165 | push(SharkConstant::for_ldc(iter())->value(builder())); |
twisti@2047 | 166 | break; |
twisti@2047 | 167 | |
twisti@2047 | 168 | case Bytecodes::_iload_0: |
twisti@2047 | 169 | case Bytecodes::_lload_0: |
twisti@2047 | 170 | case Bytecodes::_fload_0: |
twisti@2047 | 171 | case Bytecodes::_dload_0: |
twisti@2047 | 172 | case Bytecodes::_aload_0: |
twisti@2047 | 173 | push(local(0)); |
twisti@2047 | 174 | break; |
twisti@2047 | 175 | case Bytecodes::_iload_1: |
twisti@2047 | 176 | case Bytecodes::_lload_1: |
twisti@2047 | 177 | case Bytecodes::_fload_1: |
twisti@2047 | 178 | case Bytecodes::_dload_1: |
twisti@2047 | 179 | case Bytecodes::_aload_1: |
twisti@2047 | 180 | push(local(1)); |
twisti@2047 | 181 | break; |
twisti@2047 | 182 | case Bytecodes::_iload_2: |
twisti@2047 | 183 | case Bytecodes::_lload_2: |
twisti@2047 | 184 | case Bytecodes::_fload_2: |
twisti@2047 | 185 | case Bytecodes::_dload_2: |
twisti@2047 | 186 | case Bytecodes::_aload_2: |
twisti@2047 | 187 | push(local(2)); |
twisti@2047 | 188 | break; |
twisti@2047 | 189 | case Bytecodes::_iload_3: |
twisti@2047 | 190 | case Bytecodes::_lload_3: |
twisti@2047 | 191 | case Bytecodes::_fload_3: |
twisti@2047 | 192 | case Bytecodes::_dload_3: |
twisti@2047 | 193 | case Bytecodes::_aload_3: |
twisti@2047 | 194 | push(local(3)); |
twisti@2047 | 195 | break; |
twisti@2047 | 196 | case Bytecodes::_iload: |
twisti@2047 | 197 | case Bytecodes::_lload: |
twisti@2047 | 198 | case Bytecodes::_fload: |
twisti@2047 | 199 | case Bytecodes::_dload: |
twisti@2047 | 200 | case Bytecodes::_aload: |
twisti@2047 | 201 | push(local(iter()->get_index())); |
twisti@2047 | 202 | break; |
twisti@2047 | 203 | |
twisti@2047 | 204 | case Bytecodes::_baload: |
twisti@2047 | 205 | do_aload(T_BYTE); |
twisti@2047 | 206 | break; |
twisti@2047 | 207 | case Bytecodes::_caload: |
twisti@2047 | 208 | do_aload(T_CHAR); |
twisti@2047 | 209 | break; |
twisti@2047 | 210 | case Bytecodes::_saload: |
twisti@2047 | 211 | do_aload(T_SHORT); |
twisti@2047 | 212 | break; |
twisti@2047 | 213 | case Bytecodes::_iaload: |
twisti@2047 | 214 | do_aload(T_INT); |
twisti@2047 | 215 | break; |
twisti@2047 | 216 | case Bytecodes::_laload: |
twisti@2047 | 217 | do_aload(T_LONG); |
twisti@2047 | 218 | break; |
twisti@2047 | 219 | case Bytecodes::_faload: |
twisti@2047 | 220 | do_aload(T_FLOAT); |
twisti@2047 | 221 | break; |
twisti@2047 | 222 | case Bytecodes::_daload: |
twisti@2047 | 223 | do_aload(T_DOUBLE); |
twisti@2047 | 224 | break; |
twisti@2047 | 225 | case Bytecodes::_aaload: |
twisti@2047 | 226 | do_aload(T_OBJECT); |
twisti@2047 | 227 | break; |
twisti@2047 | 228 | |
twisti@2047 | 229 | case Bytecodes::_istore_0: |
twisti@2047 | 230 | case Bytecodes::_lstore_0: |
twisti@2047 | 231 | case Bytecodes::_fstore_0: |
twisti@2047 | 232 | case Bytecodes::_dstore_0: |
twisti@2047 | 233 | case Bytecodes::_astore_0: |
twisti@2047 | 234 | set_local(0, pop()); |
twisti@2047 | 235 | break; |
twisti@2047 | 236 | case Bytecodes::_istore_1: |
twisti@2047 | 237 | case Bytecodes::_lstore_1: |
twisti@2047 | 238 | case Bytecodes::_fstore_1: |
twisti@2047 | 239 | case Bytecodes::_dstore_1: |
twisti@2047 | 240 | case Bytecodes::_astore_1: |
twisti@2047 | 241 | set_local(1, pop()); |
twisti@2047 | 242 | break; |
twisti@2047 | 243 | case Bytecodes::_istore_2: |
twisti@2047 | 244 | case Bytecodes::_lstore_2: |
twisti@2047 | 245 | case Bytecodes::_fstore_2: |
twisti@2047 | 246 | case Bytecodes::_dstore_2: |
twisti@2047 | 247 | case Bytecodes::_astore_2: |
twisti@2047 | 248 | set_local(2, pop()); |
twisti@2047 | 249 | break; |
twisti@2047 | 250 | case Bytecodes::_istore_3: |
twisti@2047 | 251 | case Bytecodes::_lstore_3: |
twisti@2047 | 252 | case Bytecodes::_fstore_3: |
twisti@2047 | 253 | case Bytecodes::_dstore_3: |
twisti@2047 | 254 | case Bytecodes::_astore_3: |
twisti@2047 | 255 | set_local(3, pop()); |
twisti@2047 | 256 | break; |
twisti@2047 | 257 | case Bytecodes::_istore: |
twisti@2047 | 258 | case Bytecodes::_lstore: |
twisti@2047 | 259 | case Bytecodes::_fstore: |
twisti@2047 | 260 | case Bytecodes::_dstore: |
twisti@2047 | 261 | case Bytecodes::_astore: |
twisti@2047 | 262 | set_local(iter()->get_index(), pop()); |
twisti@2047 | 263 | break; |
twisti@2047 | 264 | |
twisti@2047 | 265 | case Bytecodes::_bastore: |
twisti@2047 | 266 | do_astore(T_BYTE); |
twisti@2047 | 267 | break; |
twisti@2047 | 268 | case Bytecodes::_castore: |
twisti@2047 | 269 | do_astore(T_CHAR); |
twisti@2047 | 270 | break; |
twisti@2047 | 271 | case Bytecodes::_sastore: |
twisti@2047 | 272 | do_astore(T_SHORT); |
twisti@2047 | 273 | break; |
twisti@2047 | 274 | case Bytecodes::_iastore: |
twisti@2047 | 275 | do_astore(T_INT); |
twisti@2047 | 276 | break; |
twisti@2047 | 277 | case Bytecodes::_lastore: |
twisti@2047 | 278 | do_astore(T_LONG); |
twisti@2047 | 279 | break; |
twisti@2047 | 280 | case Bytecodes::_fastore: |
twisti@2047 | 281 | do_astore(T_FLOAT); |
twisti@2047 | 282 | break; |
twisti@2047 | 283 | case Bytecodes::_dastore: |
twisti@2047 | 284 | do_astore(T_DOUBLE); |
twisti@2047 | 285 | break; |
twisti@2047 | 286 | case Bytecodes::_aastore: |
twisti@2047 | 287 | do_astore(T_OBJECT); |
twisti@2047 | 288 | break; |
twisti@2047 | 289 | |
twisti@2047 | 290 | case Bytecodes::_pop: |
twisti@2047 | 291 | xpop(); |
twisti@2047 | 292 | break; |
twisti@2047 | 293 | case Bytecodes::_pop2: |
twisti@2047 | 294 | xpop(); |
twisti@2047 | 295 | xpop(); |
twisti@2047 | 296 | break; |
twisti@2047 | 297 | case Bytecodes::_swap: |
twisti@2047 | 298 | a = xpop(); |
twisti@2047 | 299 | b = xpop(); |
twisti@2047 | 300 | xpush(a); |
twisti@2047 | 301 | xpush(b); |
twisti@2047 | 302 | break; |
twisti@2047 | 303 | case Bytecodes::_dup: |
twisti@2047 | 304 | a = xpop(); |
twisti@2047 | 305 | xpush(a); |
twisti@2047 | 306 | xpush(a); |
twisti@2047 | 307 | break; |
twisti@2047 | 308 | case Bytecodes::_dup_x1: |
twisti@2047 | 309 | a = xpop(); |
twisti@2047 | 310 | b = xpop(); |
twisti@2047 | 311 | xpush(a); |
twisti@2047 | 312 | xpush(b); |
twisti@2047 | 313 | xpush(a); |
twisti@2047 | 314 | break; |
twisti@2047 | 315 | case Bytecodes::_dup_x2: |
twisti@2047 | 316 | a = xpop(); |
twisti@2047 | 317 | b = xpop(); |
twisti@2047 | 318 | c = xpop(); |
twisti@2047 | 319 | xpush(a); |
twisti@2047 | 320 | xpush(c); |
twisti@2047 | 321 | xpush(b); |
twisti@2047 | 322 | xpush(a); |
twisti@2047 | 323 | break; |
twisti@2047 | 324 | case Bytecodes::_dup2: |
twisti@2047 | 325 | a = xpop(); |
twisti@2047 | 326 | b = xpop(); |
twisti@2047 | 327 | xpush(b); |
twisti@2047 | 328 | xpush(a); |
twisti@2047 | 329 | xpush(b); |
twisti@2047 | 330 | xpush(a); |
twisti@2047 | 331 | break; |
twisti@2047 | 332 | case Bytecodes::_dup2_x1: |
twisti@2047 | 333 | a = xpop(); |
twisti@2047 | 334 | b = xpop(); |
twisti@2047 | 335 | c = xpop(); |
twisti@2047 | 336 | xpush(b); |
twisti@2047 | 337 | xpush(a); |
twisti@2047 | 338 | xpush(c); |
twisti@2047 | 339 | xpush(b); |
twisti@2047 | 340 | xpush(a); |
twisti@2047 | 341 | break; |
twisti@2047 | 342 | case Bytecodes::_dup2_x2: |
twisti@2047 | 343 | a = xpop(); |
twisti@2047 | 344 | b = xpop(); |
twisti@2047 | 345 | c = xpop(); |
twisti@2047 | 346 | d = xpop(); |
twisti@2047 | 347 | xpush(b); |
twisti@2047 | 348 | xpush(a); |
twisti@2047 | 349 | xpush(d); |
twisti@2047 | 350 | xpush(c); |
twisti@2047 | 351 | xpush(b); |
twisti@2047 | 352 | xpush(a); |
twisti@2047 | 353 | break; |
twisti@2047 | 354 | |
twisti@2047 | 355 | case Bytecodes::_arraylength: |
twisti@2047 | 356 | do_arraylength(); |
twisti@2047 | 357 | break; |
twisti@2047 | 358 | |
twisti@2047 | 359 | case Bytecodes::_getfield: |
twisti@2047 | 360 | do_getfield(); |
twisti@2047 | 361 | break; |
twisti@2047 | 362 | case Bytecodes::_getstatic: |
twisti@2047 | 363 | do_getstatic(); |
twisti@2047 | 364 | break; |
twisti@2047 | 365 | case Bytecodes::_putfield: |
twisti@2047 | 366 | do_putfield(); |
twisti@2047 | 367 | break; |
twisti@2047 | 368 | case Bytecodes::_putstatic: |
twisti@2047 | 369 | do_putstatic(); |
twisti@2047 | 370 | break; |
twisti@2047 | 371 | |
twisti@2047 | 372 | case Bytecodes::_iadd: |
twisti@2047 | 373 | b = pop(); |
twisti@2047 | 374 | a = pop(); |
twisti@2047 | 375 | push(SharkValue::create_jint( |
twisti@2047 | 376 | builder()->CreateAdd(a->jint_value(), b->jint_value()), false)); |
twisti@2047 | 377 | break; |
twisti@2047 | 378 | case Bytecodes::_isub: |
twisti@2047 | 379 | b = pop(); |
twisti@2047 | 380 | a = pop(); |
twisti@2047 | 381 | push(SharkValue::create_jint( |
twisti@2047 | 382 | builder()->CreateSub(a->jint_value(), b->jint_value()), false)); |
twisti@2047 | 383 | break; |
twisti@2047 | 384 | case Bytecodes::_imul: |
twisti@2047 | 385 | b = pop(); |
twisti@2047 | 386 | a = pop(); |
twisti@2047 | 387 | push(SharkValue::create_jint( |
twisti@2047 | 388 | builder()->CreateMul(a->jint_value(), b->jint_value()), false)); |
twisti@2047 | 389 | break; |
twisti@2047 | 390 | case Bytecodes::_idiv: |
twisti@2047 | 391 | do_idiv(); |
twisti@2047 | 392 | break; |
twisti@2047 | 393 | case Bytecodes::_irem: |
twisti@2047 | 394 | do_irem(); |
twisti@2047 | 395 | break; |
twisti@2047 | 396 | case Bytecodes::_ineg: |
twisti@2047 | 397 | a = pop(); |
twisti@2047 | 398 | push(SharkValue::create_jint( |
twisti@2047 | 399 | builder()->CreateNeg(a->jint_value()), a->zero_checked())); |
twisti@2047 | 400 | break; |
twisti@2047 | 401 | case Bytecodes::_ishl: |
twisti@2047 | 402 | b = pop(); |
twisti@2047 | 403 | a = pop(); |
twisti@2047 | 404 | push(SharkValue::create_jint( |
twisti@2047 | 405 | builder()->CreateShl( |
twisti@2047 | 406 | a->jint_value(), |
twisti@2047 | 407 | builder()->CreateAnd( |
twisti@2047 | 408 | b->jint_value(), LLVMValue::jint_constant(0x1f))), false)); |
twisti@2047 | 409 | break; |
twisti@2047 | 410 | case Bytecodes::_ishr: |
twisti@2047 | 411 | b = pop(); |
twisti@2047 | 412 | a = pop(); |
twisti@2047 | 413 | push(SharkValue::create_jint( |
twisti@2047 | 414 | builder()->CreateAShr( |
twisti@2047 | 415 | a->jint_value(), |
twisti@2047 | 416 | builder()->CreateAnd( |
twisti@2047 | 417 | b->jint_value(), LLVMValue::jint_constant(0x1f))), false)); |
twisti@2047 | 418 | break; |
twisti@2047 | 419 | case Bytecodes::_iushr: |
twisti@2047 | 420 | b = pop(); |
twisti@2047 | 421 | a = pop(); |
twisti@2047 | 422 | push(SharkValue::create_jint( |
twisti@2047 | 423 | builder()->CreateLShr( |
twisti@2047 | 424 | a->jint_value(), |
twisti@2047 | 425 | builder()->CreateAnd( |
twisti@2047 | 426 | b->jint_value(), LLVMValue::jint_constant(0x1f))), false)); |
twisti@2047 | 427 | break; |
twisti@2047 | 428 | case Bytecodes::_iand: |
twisti@2047 | 429 | b = pop(); |
twisti@2047 | 430 | a = pop(); |
twisti@2047 | 431 | push(SharkValue::create_jint( |
twisti@2047 | 432 | builder()->CreateAnd(a->jint_value(), b->jint_value()), false)); |
twisti@2047 | 433 | break; |
twisti@2047 | 434 | case Bytecodes::_ior: |
twisti@2047 | 435 | b = pop(); |
twisti@2047 | 436 | a = pop(); |
twisti@2047 | 437 | push(SharkValue::create_jint( |
twisti@2047 | 438 | builder()->CreateOr(a->jint_value(), b->jint_value()), |
twisti@2047 | 439 | a->zero_checked() && b->zero_checked())); |
twisti@2047 | 440 | break; |
twisti@2047 | 441 | case Bytecodes::_ixor: |
twisti@2047 | 442 | b = pop(); |
twisti@2047 | 443 | a = pop(); |
twisti@2047 | 444 | push(SharkValue::create_jint( |
twisti@2047 | 445 | builder()->CreateXor(a->jint_value(), b->jint_value()), false)); |
twisti@2047 | 446 | break; |
twisti@2047 | 447 | |
twisti@2047 | 448 | case Bytecodes::_ladd: |
twisti@2047 | 449 | b = pop(); |
twisti@2047 | 450 | a = pop(); |
twisti@2047 | 451 | push(SharkValue::create_jlong( |
twisti@2047 | 452 | builder()->CreateAdd(a->jlong_value(), b->jlong_value()), false)); |
twisti@2047 | 453 | break; |
twisti@2047 | 454 | case Bytecodes::_lsub: |
twisti@2047 | 455 | b = pop(); |
twisti@2047 | 456 | a = pop(); |
twisti@2047 | 457 | push(SharkValue::create_jlong( |
twisti@2047 | 458 | builder()->CreateSub(a->jlong_value(), b->jlong_value()), false)); |
twisti@2047 | 459 | break; |
twisti@2047 | 460 | case Bytecodes::_lmul: |
twisti@2047 | 461 | b = pop(); |
twisti@2047 | 462 | a = pop(); |
twisti@2047 | 463 | push(SharkValue::create_jlong( |
twisti@2047 | 464 | builder()->CreateMul(a->jlong_value(), b->jlong_value()), false)); |
twisti@2047 | 465 | break; |
twisti@2047 | 466 | case Bytecodes::_ldiv: |
twisti@2047 | 467 | do_ldiv(); |
twisti@2047 | 468 | break; |
twisti@2047 | 469 | case Bytecodes::_lrem: |
twisti@2047 | 470 | do_lrem(); |
twisti@2047 | 471 | break; |
twisti@2047 | 472 | case Bytecodes::_lneg: |
twisti@2047 | 473 | a = pop(); |
twisti@2047 | 474 | push(SharkValue::create_jlong( |
twisti@2047 | 475 | builder()->CreateNeg(a->jlong_value()), a->zero_checked())); |
twisti@2047 | 476 | break; |
twisti@2047 | 477 | case Bytecodes::_lshl: |
twisti@2047 | 478 | b = pop(); |
twisti@2047 | 479 | a = pop(); |
twisti@2047 | 480 | push(SharkValue::create_jlong( |
twisti@2047 | 481 | builder()->CreateShl( |
twisti@2047 | 482 | a->jlong_value(), |
twisti@2047 | 483 | builder()->CreateIntCast( |
twisti@2047 | 484 | builder()->CreateAnd( |
twisti@2047 | 485 | b->jint_value(), LLVMValue::jint_constant(0x3f)), |
twisti@2047 | 486 | SharkType::jlong_type(), true)), false)); |
twisti@2047 | 487 | break; |
twisti@2047 | 488 | case Bytecodes::_lshr: |
twisti@2047 | 489 | b = pop(); |
twisti@2047 | 490 | a = pop(); |
twisti@2047 | 491 | push(SharkValue::create_jlong( |
twisti@2047 | 492 | builder()->CreateAShr( |
twisti@2047 | 493 | a->jlong_value(), |
twisti@2047 | 494 | builder()->CreateIntCast( |
twisti@2047 | 495 | builder()->CreateAnd( |
twisti@2047 | 496 | b->jint_value(), LLVMValue::jint_constant(0x3f)), |
twisti@2047 | 497 | SharkType::jlong_type(), true)), false)); |
twisti@2047 | 498 | break; |
twisti@2047 | 499 | case Bytecodes::_lushr: |
twisti@2047 | 500 | b = pop(); |
twisti@2047 | 501 | a = pop(); |
twisti@2047 | 502 | push(SharkValue::create_jlong( |
twisti@2047 | 503 | builder()->CreateLShr( |
twisti@2047 | 504 | a->jlong_value(), |
twisti@2047 | 505 | builder()->CreateIntCast( |
twisti@2047 | 506 | builder()->CreateAnd( |
twisti@2047 | 507 | b->jint_value(), LLVMValue::jint_constant(0x3f)), |
twisti@2047 | 508 | SharkType::jlong_type(), true)), false)); |
twisti@2047 | 509 | break; |
twisti@2047 | 510 | case Bytecodes::_land: |
twisti@2047 | 511 | b = pop(); |
twisti@2047 | 512 | a = pop(); |
twisti@2047 | 513 | push(SharkValue::create_jlong( |
twisti@2047 | 514 | builder()->CreateAnd(a->jlong_value(), b->jlong_value()), false)); |
twisti@2047 | 515 | break; |
twisti@2047 | 516 | case Bytecodes::_lor: |
twisti@2047 | 517 | b = pop(); |
twisti@2047 | 518 | a = pop(); |
twisti@2047 | 519 | push(SharkValue::create_jlong( |
twisti@2047 | 520 | builder()->CreateOr(a->jlong_value(), b->jlong_value()), |
twisti@2047 | 521 | a->zero_checked() && b->zero_checked())); |
twisti@2047 | 522 | break; |
twisti@2047 | 523 | case Bytecodes::_lxor: |
twisti@2047 | 524 | b = pop(); |
twisti@2047 | 525 | a = pop(); |
twisti@2047 | 526 | push(SharkValue::create_jlong( |
twisti@2047 | 527 | builder()->CreateXor(a->jlong_value(), b->jlong_value()), false)); |
twisti@2047 | 528 | break; |
twisti@2047 | 529 | |
twisti@2047 | 530 | case Bytecodes::_fadd: |
twisti@2047 | 531 | b = pop(); |
twisti@2047 | 532 | a = pop(); |
twisti@2047 | 533 | push(SharkValue::create_jfloat( |
twisti@2047 | 534 | builder()->CreateFAdd(a->jfloat_value(), b->jfloat_value()))); |
twisti@2047 | 535 | break; |
twisti@2047 | 536 | case Bytecodes::_fsub: |
twisti@2047 | 537 | b = pop(); |
twisti@2047 | 538 | a = pop(); |
twisti@2047 | 539 | push(SharkValue::create_jfloat( |
twisti@2047 | 540 | builder()->CreateFSub(a->jfloat_value(), b->jfloat_value()))); |
twisti@2047 | 541 | break; |
twisti@2047 | 542 | case Bytecodes::_fmul: |
twisti@2047 | 543 | b = pop(); |
twisti@2047 | 544 | a = pop(); |
twisti@2047 | 545 | push(SharkValue::create_jfloat( |
twisti@2047 | 546 | builder()->CreateFMul(a->jfloat_value(), b->jfloat_value()))); |
twisti@2047 | 547 | break; |
twisti@2047 | 548 | case Bytecodes::_fdiv: |
twisti@2047 | 549 | b = pop(); |
twisti@2047 | 550 | a = pop(); |
twisti@2047 | 551 | push(SharkValue::create_jfloat( |
twisti@2047 | 552 | builder()->CreateFDiv(a->jfloat_value(), b->jfloat_value()))); |
twisti@2047 | 553 | break; |
twisti@2047 | 554 | case Bytecodes::_frem: |
twisti@2047 | 555 | b = pop(); |
twisti@2047 | 556 | a = pop(); |
twisti@2047 | 557 | push(SharkValue::create_jfloat( |
twisti@2047 | 558 | builder()->CreateFRem(a->jfloat_value(), b->jfloat_value()))); |
twisti@2047 | 559 | break; |
twisti@2047 | 560 | case Bytecodes::_fneg: |
twisti@2047 | 561 | a = pop(); |
twisti@2047 | 562 | push(SharkValue::create_jfloat( |
twisti@2047 | 563 | builder()->CreateFNeg(a->jfloat_value()))); |
twisti@2047 | 564 | break; |
twisti@2047 | 565 | |
twisti@2047 | 566 | case Bytecodes::_dadd: |
twisti@2047 | 567 | b = pop(); |
twisti@2047 | 568 | a = pop(); |
twisti@2047 | 569 | push(SharkValue::create_jdouble( |
twisti@2047 | 570 | builder()->CreateFAdd(a->jdouble_value(), b->jdouble_value()))); |
twisti@2047 | 571 | break; |
twisti@2047 | 572 | case Bytecodes::_dsub: |
twisti@2047 | 573 | b = pop(); |
twisti@2047 | 574 | a = pop(); |
twisti@2047 | 575 | push(SharkValue::create_jdouble( |
twisti@2047 | 576 | builder()->CreateFSub(a->jdouble_value(), b->jdouble_value()))); |
twisti@2047 | 577 | break; |
twisti@2047 | 578 | case Bytecodes::_dmul: |
twisti@2047 | 579 | b = pop(); |
twisti@2047 | 580 | a = pop(); |
twisti@2047 | 581 | push(SharkValue::create_jdouble( |
twisti@2047 | 582 | builder()->CreateFMul(a->jdouble_value(), b->jdouble_value()))); |
twisti@2047 | 583 | break; |
twisti@2047 | 584 | case Bytecodes::_ddiv: |
twisti@2047 | 585 | b = pop(); |
twisti@2047 | 586 | a = pop(); |
twisti@2047 | 587 | push(SharkValue::create_jdouble( |
twisti@2047 | 588 | builder()->CreateFDiv(a->jdouble_value(), b->jdouble_value()))); |
twisti@2047 | 589 | break; |
twisti@2047 | 590 | case Bytecodes::_drem: |
twisti@2047 | 591 | b = pop(); |
twisti@2047 | 592 | a = pop(); |
twisti@2047 | 593 | push(SharkValue::create_jdouble( |
twisti@2047 | 594 | builder()->CreateFRem(a->jdouble_value(), b->jdouble_value()))); |
twisti@2047 | 595 | break; |
twisti@2047 | 596 | case Bytecodes::_dneg: |
twisti@2047 | 597 | a = pop(); |
twisti@2047 | 598 | push(SharkValue::create_jdouble( |
twisti@2047 | 599 | builder()->CreateFNeg(a->jdouble_value()))); |
twisti@2047 | 600 | break; |
twisti@2047 | 601 | |
twisti@2047 | 602 | case Bytecodes::_iinc: |
twisti@2047 | 603 | i = iter()->get_index(); |
twisti@2047 | 604 | set_local( |
twisti@2047 | 605 | i, |
twisti@2047 | 606 | SharkValue::create_jint( |
twisti@2047 | 607 | builder()->CreateAdd( |
twisti@2047 | 608 | LLVMValue::jint_constant(iter()->get_iinc_con()), |
twisti@2047 | 609 | local(i)->jint_value()), false)); |
twisti@2047 | 610 | break; |
twisti@2047 | 611 | |
twisti@2047 | 612 | case Bytecodes::_lcmp: |
twisti@2047 | 613 | do_lcmp(); |
twisti@2047 | 614 | break; |
twisti@2047 | 615 | |
twisti@2047 | 616 | case Bytecodes::_fcmpl: |
twisti@2047 | 617 | do_fcmp(false, false); |
twisti@2047 | 618 | break; |
twisti@2047 | 619 | case Bytecodes::_fcmpg: |
twisti@2047 | 620 | do_fcmp(false, true); |
twisti@2047 | 621 | break; |
twisti@2047 | 622 | case Bytecodes::_dcmpl: |
twisti@2047 | 623 | do_fcmp(true, false); |
twisti@2047 | 624 | break; |
twisti@2047 | 625 | case Bytecodes::_dcmpg: |
twisti@2047 | 626 | do_fcmp(true, true); |
twisti@2047 | 627 | break; |
twisti@2047 | 628 | |
twisti@2047 | 629 | case Bytecodes::_i2l: |
twisti@2047 | 630 | a = pop(); |
twisti@2047 | 631 | push(SharkValue::create_jlong( |
twisti@2047 | 632 | builder()->CreateIntCast( |
twisti@2047 | 633 | a->jint_value(), SharkType::jlong_type(), true), a->zero_checked())); |
twisti@2047 | 634 | break; |
twisti@2047 | 635 | case Bytecodes::_i2f: |
twisti@2047 | 636 | push(SharkValue::create_jfloat( |
twisti@2047 | 637 | builder()->CreateSIToFP( |
twisti@2047 | 638 | pop()->jint_value(), SharkType::jfloat_type()))); |
twisti@2047 | 639 | break; |
twisti@2047 | 640 | case Bytecodes::_i2d: |
twisti@2047 | 641 | push(SharkValue::create_jdouble( |
twisti@2047 | 642 | builder()->CreateSIToFP( |
twisti@2047 | 643 | pop()->jint_value(), SharkType::jdouble_type()))); |
twisti@2047 | 644 | break; |
twisti@2047 | 645 | |
twisti@2047 | 646 | case Bytecodes::_l2i: |
twisti@2047 | 647 | push(SharkValue::create_jint( |
twisti@2047 | 648 | builder()->CreateIntCast( |
twisti@2047 | 649 | pop()->jlong_value(), SharkType::jint_type(), true), false)); |
twisti@2047 | 650 | break; |
twisti@2047 | 651 | case Bytecodes::_l2f: |
twisti@2047 | 652 | push(SharkValue::create_jfloat( |
twisti@2047 | 653 | builder()->CreateSIToFP( |
twisti@2047 | 654 | pop()->jlong_value(), SharkType::jfloat_type()))); |
twisti@2047 | 655 | break; |
twisti@2047 | 656 | case Bytecodes::_l2d: |
twisti@2047 | 657 | push(SharkValue::create_jdouble( |
twisti@2047 | 658 | builder()->CreateSIToFP( |
twisti@2047 | 659 | pop()->jlong_value(), SharkType::jdouble_type()))); |
twisti@2047 | 660 | break; |
twisti@2047 | 661 | |
twisti@2047 | 662 | case Bytecodes::_f2i: |
twisti@2047 | 663 | push(SharkValue::create_jint( |
twisti@2047 | 664 | builder()->CreateCall( |
twisti@2047 | 665 | builder()->f2i(), pop()->jfloat_value()), false)); |
twisti@2047 | 666 | break; |
twisti@2047 | 667 | case Bytecodes::_f2l: |
twisti@2047 | 668 | push(SharkValue::create_jlong( |
twisti@2047 | 669 | builder()->CreateCall( |
twisti@2047 | 670 | builder()->f2l(), pop()->jfloat_value()), false)); |
twisti@2047 | 671 | break; |
twisti@2047 | 672 | case Bytecodes::_f2d: |
twisti@2047 | 673 | push(SharkValue::create_jdouble( |
twisti@2047 | 674 | builder()->CreateFPExt( |
twisti@2047 | 675 | pop()->jfloat_value(), SharkType::jdouble_type()))); |
twisti@2047 | 676 | break; |
twisti@2047 | 677 | |
twisti@2047 | 678 | case Bytecodes::_d2i: |
twisti@2047 | 679 | push(SharkValue::create_jint( |
twisti@2047 | 680 | builder()->CreateCall( |
twisti@2047 | 681 | builder()->d2i(), pop()->jdouble_value()), false)); |
twisti@2047 | 682 | break; |
twisti@2047 | 683 | case Bytecodes::_d2l: |
twisti@2047 | 684 | push(SharkValue::create_jlong( |
twisti@2047 | 685 | builder()->CreateCall( |
twisti@2047 | 686 | builder()->d2l(), pop()->jdouble_value()), false)); |
twisti@2047 | 687 | break; |
twisti@2047 | 688 | case Bytecodes::_d2f: |
twisti@2047 | 689 | push(SharkValue::create_jfloat( |
twisti@2047 | 690 | builder()->CreateFPTrunc( |
twisti@2047 | 691 | pop()->jdouble_value(), SharkType::jfloat_type()))); |
twisti@2047 | 692 | break; |
twisti@2047 | 693 | |
twisti@2047 | 694 | case Bytecodes::_i2b: |
twisti@2047 | 695 | push(SharkValue::create_jint( |
twisti@2047 | 696 | builder()->CreateAShr( |
twisti@2047 | 697 | builder()->CreateShl( |
twisti@2047 | 698 | pop()->jint_value(), |
twisti@2047 | 699 | LLVMValue::jint_constant(24)), |
twisti@2047 | 700 | LLVMValue::jint_constant(24)), false)); |
twisti@2047 | 701 | break; |
twisti@2047 | 702 | case Bytecodes::_i2c: |
twisti@2047 | 703 | push(SharkValue::create_jint( |
twisti@2047 | 704 | builder()->CreateAnd( |
twisti@2047 | 705 | pop()->jint_value(), |
twisti@2047 | 706 | LLVMValue::jint_constant(0xffff)), false)); |
twisti@2047 | 707 | break; |
twisti@2047 | 708 | case Bytecodes::_i2s: |
twisti@2047 | 709 | push(SharkValue::create_jint( |
twisti@2047 | 710 | builder()->CreateAShr( |
twisti@2047 | 711 | builder()->CreateShl( |
twisti@2047 | 712 | pop()->jint_value(), |
twisti@2047 | 713 | LLVMValue::jint_constant(16)), |
twisti@2047 | 714 | LLVMValue::jint_constant(16)), false)); |
twisti@2047 | 715 | break; |
twisti@2047 | 716 | |
twisti@2047 | 717 | case Bytecodes::_return: |
twisti@2047 | 718 | do_return(T_VOID); |
twisti@2047 | 719 | break; |
twisti@2047 | 720 | case Bytecodes::_ireturn: |
twisti@2047 | 721 | do_return(T_INT); |
twisti@2047 | 722 | break; |
twisti@2047 | 723 | case Bytecodes::_lreturn: |
twisti@2047 | 724 | do_return(T_LONG); |
twisti@2047 | 725 | break; |
twisti@2047 | 726 | case Bytecodes::_freturn: |
twisti@2047 | 727 | do_return(T_FLOAT); |
twisti@2047 | 728 | break; |
twisti@2047 | 729 | case Bytecodes::_dreturn: |
twisti@2047 | 730 | do_return(T_DOUBLE); |
twisti@2047 | 731 | break; |
twisti@2047 | 732 | case Bytecodes::_areturn: |
twisti@2047 | 733 | do_return(T_OBJECT); |
twisti@2047 | 734 | break; |
twisti@2047 | 735 | |
twisti@2047 | 736 | case Bytecodes::_athrow: |
twisti@2047 | 737 | do_athrow(); |
twisti@2047 | 738 | break; |
twisti@2047 | 739 | |
twisti@2047 | 740 | case Bytecodes::_goto: |
twisti@2047 | 741 | case Bytecodes::_goto_w: |
twisti@2047 | 742 | do_goto(); |
twisti@2047 | 743 | break; |
twisti@2047 | 744 | |
twisti@2047 | 745 | case Bytecodes::_jsr: |
twisti@2047 | 746 | case Bytecodes::_jsr_w: |
twisti@2047 | 747 | do_jsr(); |
twisti@2047 | 748 | break; |
twisti@2047 | 749 | |
twisti@2047 | 750 | case Bytecodes::_ret: |
twisti@2047 | 751 | do_ret(); |
twisti@2047 | 752 | break; |
twisti@2047 | 753 | |
twisti@2047 | 754 | case Bytecodes::_ifnull: |
twisti@2047 | 755 | do_if(ICmpInst::ICMP_EQ, SharkValue::null(), pop()); |
twisti@2047 | 756 | break; |
twisti@2047 | 757 | case Bytecodes::_ifnonnull: |
twisti@2047 | 758 | do_if(ICmpInst::ICMP_NE, SharkValue::null(), pop()); |
twisti@2047 | 759 | break; |
twisti@2047 | 760 | case Bytecodes::_if_acmpeq: |
twisti@2047 | 761 | b = pop(); |
twisti@2047 | 762 | a = pop(); |
twisti@2047 | 763 | do_if(ICmpInst::ICMP_EQ, b, a); |
twisti@2047 | 764 | break; |
twisti@2047 | 765 | case Bytecodes::_if_acmpne: |
twisti@2047 | 766 | b = pop(); |
twisti@2047 | 767 | a = pop(); |
twisti@2047 | 768 | do_if(ICmpInst::ICMP_NE, b, a); |
twisti@2047 | 769 | break; |
twisti@2047 | 770 | case Bytecodes::_ifeq: |
twisti@2047 | 771 | do_if(ICmpInst::ICMP_EQ, SharkValue::jint_constant(0), pop()); |
twisti@2047 | 772 | break; |
twisti@2047 | 773 | case Bytecodes::_ifne: |
twisti@2047 | 774 | do_if(ICmpInst::ICMP_NE, SharkValue::jint_constant(0), pop()); |
twisti@2047 | 775 | break; |
twisti@2047 | 776 | case Bytecodes::_iflt: |
twisti@2047 | 777 | do_if(ICmpInst::ICMP_SLT, SharkValue::jint_constant(0), pop()); |
twisti@2047 | 778 | break; |
twisti@2047 | 779 | case Bytecodes::_ifle: |
twisti@2047 | 780 | do_if(ICmpInst::ICMP_SLE, SharkValue::jint_constant(0), pop()); |
twisti@2047 | 781 | break; |
twisti@2047 | 782 | case Bytecodes::_ifgt: |
twisti@2047 | 783 | do_if(ICmpInst::ICMP_SGT, SharkValue::jint_constant(0), pop()); |
twisti@2047 | 784 | break; |
twisti@2047 | 785 | case Bytecodes::_ifge: |
twisti@2047 | 786 | do_if(ICmpInst::ICMP_SGE, SharkValue::jint_constant(0), pop()); |
twisti@2047 | 787 | break; |
twisti@2047 | 788 | case Bytecodes::_if_icmpeq: |
twisti@2047 | 789 | b = pop(); |
twisti@2047 | 790 | a = pop(); |
twisti@2047 | 791 | do_if(ICmpInst::ICMP_EQ, b, a); |
twisti@2047 | 792 | break; |
twisti@2047 | 793 | case Bytecodes::_if_icmpne: |
twisti@2047 | 794 | b = pop(); |
twisti@2047 | 795 | a = pop(); |
twisti@2047 | 796 | do_if(ICmpInst::ICMP_NE, b, a); |
twisti@2047 | 797 | break; |
twisti@2047 | 798 | case Bytecodes::_if_icmplt: |
twisti@2047 | 799 | b = pop(); |
twisti@2047 | 800 | a = pop(); |
twisti@2047 | 801 | do_if(ICmpInst::ICMP_SLT, b, a); |
twisti@2047 | 802 | break; |
twisti@2047 | 803 | case Bytecodes::_if_icmple: |
twisti@2047 | 804 | b = pop(); |
twisti@2047 | 805 | a = pop(); |
twisti@2047 | 806 | do_if(ICmpInst::ICMP_SLE, b, a); |
twisti@2047 | 807 | break; |
twisti@2047 | 808 | case Bytecodes::_if_icmpgt: |
twisti@2047 | 809 | b = pop(); |
twisti@2047 | 810 | a = pop(); |
twisti@2047 | 811 | do_if(ICmpInst::ICMP_SGT, b, a); |
twisti@2047 | 812 | break; |
twisti@2047 | 813 | case Bytecodes::_if_icmpge: |
twisti@2047 | 814 | b = pop(); |
twisti@2047 | 815 | a = pop(); |
twisti@2047 | 816 | do_if(ICmpInst::ICMP_SGE, b, a); |
twisti@2047 | 817 | break; |
twisti@2047 | 818 | |
twisti@2047 | 819 | case Bytecodes::_tableswitch: |
twisti@2047 | 820 | case Bytecodes::_lookupswitch: |
twisti@2047 | 821 | do_switch(); |
twisti@2047 | 822 | break; |
twisti@2047 | 823 | |
twisti@2047 | 824 | case Bytecodes::_invokestatic: |
twisti@2047 | 825 | case Bytecodes::_invokespecial: |
twisti@2047 | 826 | case Bytecodes::_invokevirtual: |
twisti@2047 | 827 | case Bytecodes::_invokeinterface: |
twisti@2047 | 828 | do_call(); |
twisti@2047 | 829 | break; |
twisti@2047 | 830 | |
twisti@2047 | 831 | case Bytecodes::_instanceof: |
twisti@2047 | 832 | // This is a very common construct: |
twisti@2047 | 833 | // |
twisti@2047 | 834 | // if (object instanceof Klass) { |
twisti@2047 | 835 | // something = (Klass) object; |
twisti@2047 | 836 | // ... |
twisti@2047 | 837 | // } |
twisti@2047 | 838 | // |
twisti@2047 | 839 | // which gets compiled to something like this: |
twisti@2047 | 840 | // |
twisti@2047 | 841 | // 28: aload 9 |
twisti@2047 | 842 | // 30: instanceof <Class Klass> |
twisti@2047 | 843 | // 33: ifeq 52 |
twisti@2047 | 844 | // 36: aload 9 |
twisti@2047 | 845 | // 38: checkcast <Class Klass> |
twisti@2047 | 846 | // |
twisti@2047 | 847 | // Handling both bytecodes at once allows us |
twisti@2047 | 848 | // to eliminate the checkcast. |
twisti@2047 | 849 | if (iter()->next_bci() < limit && |
twisti@2047 | 850 | (iter()->next_bc() == Bytecodes::_ifeq || |
twisti@2047 | 851 | iter()->next_bc() == Bytecodes::_ifne) && |
twisti@2047 | 852 | (!UseLoopSafepoints || |
twisti@2047 | 853 | iter()->next_get_dest() > iter()->next_bci())) { |
twisti@2047 | 854 | if (maybe_do_instanceof_if()) { |
twisti@2047 | 855 | iter()->next(); |
twisti@2047 | 856 | if (SharkTraceBytecodes) |
twisti@2047 | 857 | tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc())); |
twisti@2047 | 858 | break; |
twisti@2047 | 859 | } |
twisti@2047 | 860 | } |
twisti@2047 | 861 | // fall through |
twisti@2047 | 862 | case Bytecodes::_checkcast: |
twisti@2047 | 863 | do_instance_check(); |
twisti@2047 | 864 | break; |
twisti@2047 | 865 | |
twisti@2047 | 866 | case Bytecodes::_new: |
twisti@2047 | 867 | do_new(); |
twisti@2047 | 868 | break; |
twisti@2047 | 869 | case Bytecodes::_newarray: |
twisti@2047 | 870 | do_newarray(); |
twisti@2047 | 871 | break; |
twisti@2047 | 872 | case Bytecodes::_anewarray: |
twisti@2047 | 873 | do_anewarray(); |
twisti@2047 | 874 | break; |
twisti@2047 | 875 | case Bytecodes::_multianewarray: |
twisti@2047 | 876 | do_multianewarray(); |
twisti@2047 | 877 | break; |
twisti@2047 | 878 | |
twisti@2047 | 879 | case Bytecodes::_monitorenter: |
twisti@2047 | 880 | do_monitorenter(); |
twisti@2047 | 881 | break; |
twisti@2047 | 882 | case Bytecodes::_monitorexit: |
twisti@2047 | 883 | do_monitorexit(); |
twisti@2047 | 884 | break; |
twisti@2047 | 885 | |
twisti@2047 | 886 | default: |
twisti@2047 | 887 | ShouldNotReachHere(); |
twisti@2047 | 888 | } |
twisti@2047 | 889 | } |
twisti@2047 | 890 | } |
twisti@2047 | 891 | |
twisti@2047 | 892 | SharkState* SharkBlock::initial_current_state() { |
twisti@2047 | 893 | return entry_state()->copy(); |
twisti@2047 | 894 | } |
twisti@2047 | 895 | |
twisti@2047 | 896 | int SharkBlock::switch_default_dest() { |
twisti@2047 | 897 | return iter()->get_dest_table(0); |
twisti@2047 | 898 | } |
twisti@2047 | 899 | |
twisti@2047 | 900 | int SharkBlock::switch_table_length() { |
twisti@2047 | 901 | switch(bc()) { |
twisti@2047 | 902 | case Bytecodes::_tableswitch: |
twisti@2047 | 903 | return iter()->get_int_table(2) - iter()->get_int_table(1) + 1; |
twisti@2047 | 904 | |
twisti@2047 | 905 | case Bytecodes::_lookupswitch: |
twisti@2047 | 906 | return iter()->get_int_table(1); |
twisti@2047 | 907 | |
twisti@2047 | 908 | default: |
twisti@2047 | 909 | ShouldNotReachHere(); |
twisti@2047 | 910 | } |
twisti@2047 | 911 | } |
twisti@2047 | 912 | |
twisti@2047 | 913 | int SharkBlock::switch_key(int i) { |
twisti@2047 | 914 | switch(bc()) { |
twisti@2047 | 915 | case Bytecodes::_tableswitch: |
twisti@2047 | 916 | return iter()->get_int_table(1) + i; |
twisti@2047 | 917 | |
twisti@2047 | 918 | case Bytecodes::_lookupswitch: |
twisti@2047 | 919 | return iter()->get_int_table(2 + 2 * i); |
twisti@2047 | 920 | |
twisti@2047 | 921 | default: |
twisti@2047 | 922 | ShouldNotReachHere(); |
twisti@2047 | 923 | } |
twisti@2047 | 924 | } |
twisti@2047 | 925 | |
twisti@2047 | 926 | int SharkBlock::switch_dest(int i) { |
twisti@2047 | 927 | switch(bc()) { |
twisti@2047 | 928 | case Bytecodes::_tableswitch: |
twisti@2047 | 929 | return iter()->get_dest_table(i + 3); |
twisti@2047 | 930 | |
twisti@2047 | 931 | case Bytecodes::_lookupswitch: |
twisti@2047 | 932 | return iter()->get_dest_table(2 + 2 * i + 1); |
twisti@2047 | 933 | |
twisti@2047 | 934 | default: |
twisti@2047 | 935 | ShouldNotReachHere(); |
twisti@2047 | 936 | } |
twisti@2047 | 937 | } |
twisti@2047 | 938 | |
twisti@2047 | 939 | void SharkBlock::do_div_or_rem(bool is_long, bool is_rem) { |
twisti@2047 | 940 | SharkValue *sb = pop(); |
twisti@2047 | 941 | SharkValue *sa = pop(); |
twisti@2047 | 942 | |
twisti@2047 | 943 | check_divide_by_zero(sb); |
twisti@2047 | 944 | |
twisti@2047 | 945 | Value *a, *b, *p, *q; |
twisti@2047 | 946 | if (is_long) { |
twisti@2047 | 947 | a = sa->jlong_value(); |
twisti@2047 | 948 | b = sb->jlong_value(); |
twisti@2047 | 949 | p = LLVMValue::jlong_constant(0x8000000000000000LL); |
twisti@2047 | 950 | q = LLVMValue::jlong_constant(-1); |
twisti@2047 | 951 | } |
twisti@2047 | 952 | else { |
twisti@2047 | 953 | a = sa->jint_value(); |
twisti@2047 | 954 | b = sb->jint_value(); |
twisti@2047 | 955 | p = LLVMValue::jint_constant(0x80000000); |
twisti@2047 | 956 | q = LLVMValue::jint_constant(-1); |
twisti@2047 | 957 | } |
twisti@2047 | 958 | |
twisti@2047 | 959 | BasicBlock *ip = builder()->GetBlockInsertionPoint(); |
twisti@2047 | 960 | BasicBlock *special_case = builder()->CreateBlock(ip, "special_case"); |
twisti@2047 | 961 | BasicBlock *general_case = builder()->CreateBlock(ip, "general_case"); |
twisti@2047 | 962 | BasicBlock *done = builder()->CreateBlock(ip, "done"); |
twisti@2047 | 963 | |
twisti@2047 | 964 | builder()->CreateCondBr( |
twisti@2047 | 965 | builder()->CreateAnd( |
twisti@2047 | 966 | builder()->CreateICmpEQ(a, p), |
twisti@2047 | 967 | builder()->CreateICmpEQ(b, q)), |
twisti@2047 | 968 | special_case, general_case); |
twisti@2047 | 969 | |
twisti@2047 | 970 | builder()->SetInsertPoint(special_case); |
twisti@2047 | 971 | Value *special_result; |
twisti@2047 | 972 | if (is_rem) { |
twisti@2047 | 973 | if (is_long) |
twisti@2047 | 974 | special_result = LLVMValue::jlong_constant(0); |
twisti@2047 | 975 | else |
twisti@2047 | 976 | special_result = LLVMValue::jint_constant(0); |
twisti@2047 | 977 | } |
twisti@2047 | 978 | else { |
twisti@2047 | 979 | special_result = a; |
twisti@2047 | 980 | } |
twisti@2047 | 981 | builder()->CreateBr(done); |
twisti@2047 | 982 | |
twisti@2047 | 983 | builder()->SetInsertPoint(general_case); |
twisti@2047 | 984 | Value *general_result; |
twisti@2047 | 985 | if (is_rem) |
twisti@2047 | 986 | general_result = builder()->CreateSRem(a, b); |
twisti@2047 | 987 | else |
twisti@2047 | 988 | general_result = builder()->CreateSDiv(a, b); |
twisti@2047 | 989 | builder()->CreateBr(done); |
twisti@2047 | 990 | |
twisti@2047 | 991 | builder()->SetInsertPoint(done); |
twisti@2047 | 992 | PHINode *result; |
twisti@2047 | 993 | if (is_long) |
twisti@2047 | 994 | result = builder()->CreatePHI(SharkType::jlong_type(), "result"); |
twisti@2047 | 995 | else |
twisti@2047 | 996 | result = builder()->CreatePHI(SharkType::jint_type(), "result"); |
twisti@2047 | 997 | result->addIncoming(special_result, special_case); |
twisti@2047 | 998 | result->addIncoming(general_result, general_case); |
twisti@2047 | 999 | |
twisti@2047 | 1000 | if (is_long) |
twisti@2047 | 1001 | push(SharkValue::create_jlong(result, false)); |
twisti@2047 | 1002 | else |
twisti@2047 | 1003 | push(SharkValue::create_jint(result, false)); |
twisti@2047 | 1004 | } |
twisti@2047 | 1005 | |
twisti@2047 | 1006 | void SharkBlock::do_field_access(bool is_get, bool is_field) { |
twisti@2047 | 1007 | bool will_link; |
twisti@2047 | 1008 | ciField *field = iter()->get_field(will_link); |
twisti@2047 | 1009 | assert(will_link, "typeflow responsibility"); |
twisti@2047 | 1010 | assert(is_field != field->is_static(), "mismatch"); |
twisti@2047 | 1011 | |
twisti@2047 | 1012 | // Pop the value off the stack where necessary |
twisti@2047 | 1013 | SharkValue *value = NULL; |
twisti@2047 | 1014 | if (!is_get) |
twisti@2047 | 1015 | value = pop(); |
twisti@2047 | 1016 | |
twisti@2047 | 1017 | // Find the object we're accessing, if necessary |
twisti@2047 | 1018 | Value *object = NULL; |
twisti@2047 | 1019 | if (is_field) { |
twisti@2047 | 1020 | SharkValue *value = pop(); |
twisti@2047 | 1021 | check_null(value); |
twisti@2047 | 1022 | object = value->generic_value(); |
twisti@2047 | 1023 | } |
twisti@2047 | 1024 | if (is_get && field->is_constant()) { |
twisti@2047 | 1025 | SharkConstant *constant = SharkConstant::for_field(iter()); |
twisti@2047 | 1026 | if (constant->is_loaded()) |
twisti@2047 | 1027 | value = constant->value(builder()); |
twisti@2047 | 1028 | } |
twisti@2047 | 1029 | if (!is_get || value == NULL) { |
twisti@2047 | 1030 | if (!is_field) |
twisti@2047 | 1031 | object = builder()->CreateInlineOop(field->holder()); |
twisti@2047 | 1032 | |
twisti@2047 | 1033 | BasicType basic_type = field->type()->basic_type(); |
twisti@2047 | 1034 | const Type *stack_type = SharkType::to_stackType(basic_type); |
twisti@2047 | 1035 | const Type *field_type = SharkType::to_arrayType(basic_type); |
twisti@2047 | 1036 | |
twisti@2047 | 1037 | Value *addr = builder()->CreateAddressOfStructEntry( |
twisti@2047 | 1038 | object, in_ByteSize(field->offset_in_bytes()), |
twisti@2047 | 1039 | PointerType::getUnqual(field_type), |
twisti@2047 | 1040 | "addr"); |
twisti@2047 | 1041 | |
twisti@2047 | 1042 | // Do the access |
twisti@2047 | 1043 | if (is_get) { |
twisti@2047 | 1044 | Value *field_value = builder()->CreateLoad(addr); |
twisti@2047 | 1045 | |
twisti@2047 | 1046 | if (field_type != stack_type) { |
twisti@2047 | 1047 | field_value = builder()->CreateIntCast( |
twisti@2047 | 1048 | field_value, stack_type, basic_type != T_CHAR); |
twisti@2047 | 1049 | } |
twisti@2047 | 1050 | |
twisti@2047 | 1051 | value = SharkValue::create_generic(field->type(), field_value, false); |
twisti@2047 | 1052 | } |
twisti@2047 | 1053 | else { |
twisti@2047 | 1054 | Value *field_value = value->generic_value(); |
twisti@2047 | 1055 | |
twisti@2047 | 1056 | if (field_type != stack_type) { |
twisti@2047 | 1057 | field_value = builder()->CreateIntCast( |
twisti@2047 | 1058 | field_value, field_type, basic_type != T_CHAR); |
twisti@2047 | 1059 | } |
twisti@2047 | 1060 | |
twisti@2047 | 1061 | builder()->CreateStore(field_value, addr); |
twisti@2047 | 1062 | |
twisti@2047 | 1063 | if (!field->type()->is_primitive_type()) |
twisti@2047 | 1064 | builder()->CreateUpdateBarrierSet(oopDesc::bs(), addr); |
twisti@2047 | 1065 | |
twisti@2047 | 1066 | if (field->is_volatile()) |
twisti@2047 | 1067 | builder()->CreateMemoryBarrier(SharkBuilder::BARRIER_STORELOAD); |
twisti@2047 | 1068 | } |
twisti@2047 | 1069 | } |
twisti@2047 | 1070 | |
twisti@2047 | 1071 | // Push the value onto the stack where necessary |
twisti@2047 | 1072 | if (is_get) |
twisti@2047 | 1073 | push(value); |
twisti@2047 | 1074 | } |
twisti@2047 | 1075 | |
twisti@2047 | 1076 | void SharkBlock::do_lcmp() { |
twisti@2047 | 1077 | Value *b = pop()->jlong_value(); |
twisti@2047 | 1078 | Value *a = pop()->jlong_value(); |
twisti@2047 | 1079 | |
twisti@2047 | 1080 | BasicBlock *ip = builder()->GetBlockInsertionPoint(); |
twisti@2047 | 1081 | BasicBlock *ne = builder()->CreateBlock(ip, "lcmp_ne"); |
twisti@2047 | 1082 | BasicBlock *lt = builder()->CreateBlock(ip, "lcmp_lt"); |
twisti@2047 | 1083 | BasicBlock *gt = builder()->CreateBlock(ip, "lcmp_gt"); |
twisti@2047 | 1084 | BasicBlock *done = builder()->CreateBlock(ip, "done"); |
twisti@2047 | 1085 | |
twisti@2047 | 1086 | BasicBlock *eq = builder()->GetInsertBlock(); |
twisti@2047 | 1087 | builder()->CreateCondBr(builder()->CreateICmpEQ(a, b), done, ne); |
twisti@2047 | 1088 | |
twisti@2047 | 1089 | builder()->SetInsertPoint(ne); |
twisti@2047 | 1090 | builder()->CreateCondBr(builder()->CreateICmpSLT(a, b), lt, gt); |
twisti@2047 | 1091 | |
twisti@2047 | 1092 | builder()->SetInsertPoint(lt); |
twisti@2047 | 1093 | builder()->CreateBr(done); |
twisti@2047 | 1094 | |
twisti@2047 | 1095 | builder()->SetInsertPoint(gt); |
twisti@2047 | 1096 | builder()->CreateBr(done); |
twisti@2047 | 1097 | |
twisti@2047 | 1098 | builder()->SetInsertPoint(done); |
twisti@2047 | 1099 | PHINode *result = builder()->CreatePHI(SharkType::jint_type(), "result"); |
twisti@2047 | 1100 | result->addIncoming(LLVMValue::jint_constant(-1), lt); |
twisti@2047 | 1101 | result->addIncoming(LLVMValue::jint_constant(0), eq); |
twisti@2047 | 1102 | result->addIncoming(LLVMValue::jint_constant(1), gt); |
twisti@2047 | 1103 | |
twisti@2047 | 1104 | push(SharkValue::create_jint(result, false)); |
twisti@2047 | 1105 | } |
twisti@2047 | 1106 | |
twisti@2047 | 1107 | void SharkBlock::do_fcmp(bool is_double, bool unordered_is_greater) { |
twisti@2047 | 1108 | Value *a, *b; |
twisti@2047 | 1109 | if (is_double) { |
twisti@2047 | 1110 | b = pop()->jdouble_value(); |
twisti@2047 | 1111 | a = pop()->jdouble_value(); |
twisti@2047 | 1112 | } |
twisti@2047 | 1113 | else { |
twisti@2047 | 1114 | b = pop()->jfloat_value(); |
twisti@2047 | 1115 | a = pop()->jfloat_value(); |
twisti@2047 | 1116 | } |
twisti@2047 | 1117 | |
twisti@2047 | 1118 | BasicBlock *ip = builder()->GetBlockInsertionPoint(); |
twisti@2047 | 1119 | BasicBlock *ordered = builder()->CreateBlock(ip, "ordered"); |
twisti@2047 | 1120 | BasicBlock *ge = builder()->CreateBlock(ip, "fcmp_ge"); |
twisti@2047 | 1121 | BasicBlock *lt = builder()->CreateBlock(ip, "fcmp_lt"); |
twisti@2047 | 1122 | BasicBlock *eq = builder()->CreateBlock(ip, "fcmp_eq"); |
twisti@2047 | 1123 | BasicBlock *gt = builder()->CreateBlock(ip, "fcmp_gt"); |
twisti@2047 | 1124 | BasicBlock *done = builder()->CreateBlock(ip, "done"); |
twisti@2047 | 1125 | |
twisti@2047 | 1126 | builder()->CreateCondBr( |
twisti@2047 | 1127 | builder()->CreateFCmpUNO(a, b), |
twisti@2047 | 1128 | unordered_is_greater ? gt : lt, ordered); |
twisti@2047 | 1129 | |
twisti@2047 | 1130 | builder()->SetInsertPoint(ordered); |
twisti@2047 | 1131 | builder()->CreateCondBr(builder()->CreateFCmpULT(a, b), lt, ge); |
twisti@2047 | 1132 | |
twisti@2047 | 1133 | builder()->SetInsertPoint(ge); |
twisti@2047 | 1134 | builder()->CreateCondBr(builder()->CreateFCmpUGT(a, b), gt, eq); |
twisti@2047 | 1135 | |
twisti@2047 | 1136 | builder()->SetInsertPoint(lt); |
twisti@2047 | 1137 | builder()->CreateBr(done); |
twisti@2047 | 1138 | |
twisti@2047 | 1139 | builder()->SetInsertPoint(gt); |
twisti@2047 | 1140 | builder()->CreateBr(done); |
twisti@2047 | 1141 | |
twisti@2047 | 1142 | builder()->SetInsertPoint(eq); |
twisti@2047 | 1143 | builder()->CreateBr(done); |
twisti@2047 | 1144 | |
twisti@2047 | 1145 | builder()->SetInsertPoint(done); |
twisti@2047 | 1146 | PHINode *result = builder()->CreatePHI(SharkType::jint_type(), "result"); |
twisti@2047 | 1147 | result->addIncoming(LLVMValue::jint_constant(-1), lt); |
twisti@2047 | 1148 | result->addIncoming(LLVMValue::jint_constant(0), eq); |
twisti@2047 | 1149 | result->addIncoming(LLVMValue::jint_constant(1), gt); |
twisti@2047 | 1150 | |
twisti@2047 | 1151 | push(SharkValue::create_jint(result, false)); |
twisti@2047 | 1152 | } |
twisti@2047 | 1153 | |
twisti@2047 | 1154 | void SharkBlock::emit_IR() { |
twisti@2047 | 1155 | ShouldNotCallThis(); |
twisti@2047 | 1156 | } |
twisti@2047 | 1157 | |
twisti@2047 | 1158 | SharkState* SharkBlock::entry_state() { |
twisti@2047 | 1159 | ShouldNotCallThis(); |
twisti@2047 | 1160 | } |
twisti@2047 | 1161 | |
twisti@2047 | 1162 | void SharkBlock::do_zero_check(SharkValue* value) { |
twisti@2047 | 1163 | ShouldNotCallThis(); |
twisti@2047 | 1164 | } |
twisti@2047 | 1165 | |
twisti@2047 | 1166 | void SharkBlock::maybe_add_backedge_safepoint() { |
twisti@2047 | 1167 | ShouldNotCallThis(); |
twisti@2047 | 1168 | } |
twisti@2047 | 1169 | |
twisti@2047 | 1170 | bool SharkBlock::has_trap() { |
twisti@2047 | 1171 | return false; |
twisti@2047 | 1172 | } |
twisti@2047 | 1173 | |
twisti@2047 | 1174 | int SharkBlock::trap_request() { |
twisti@2047 | 1175 | ShouldNotCallThis(); |
twisti@2047 | 1176 | } |
twisti@2047 | 1177 | |
twisti@2047 | 1178 | int SharkBlock::trap_bci() { |
twisti@2047 | 1179 | ShouldNotCallThis(); |
twisti@2047 | 1180 | } |
twisti@2047 | 1181 | |
twisti@2047 | 1182 | void SharkBlock::do_trap(int trap_request) { |
twisti@2047 | 1183 | ShouldNotCallThis(); |
twisti@2047 | 1184 | } |
twisti@2047 | 1185 | |
twisti@2047 | 1186 | void SharkBlock::do_arraylength() { |
twisti@2047 | 1187 | ShouldNotCallThis(); |
twisti@2047 | 1188 | } |
twisti@2047 | 1189 | |
twisti@2047 | 1190 | void SharkBlock::do_aload(BasicType basic_type) { |
twisti@2047 | 1191 | ShouldNotCallThis(); |
twisti@2047 | 1192 | } |
twisti@2047 | 1193 | |
twisti@2047 | 1194 | void SharkBlock::do_astore(BasicType basic_type) { |
twisti@2047 | 1195 | ShouldNotCallThis(); |
twisti@2047 | 1196 | } |
twisti@2047 | 1197 | |
twisti@2047 | 1198 | void SharkBlock::do_return(BasicType type) { |
twisti@2047 | 1199 | ShouldNotCallThis(); |
twisti@2047 | 1200 | } |
twisti@2047 | 1201 | |
twisti@2047 | 1202 | void SharkBlock::do_athrow() { |
twisti@2047 | 1203 | ShouldNotCallThis(); |
twisti@2047 | 1204 | } |
twisti@2047 | 1205 | |
twisti@2047 | 1206 | void SharkBlock::do_goto() { |
twisti@2047 | 1207 | ShouldNotCallThis(); |
twisti@2047 | 1208 | } |
twisti@2047 | 1209 | |
twisti@2047 | 1210 | void SharkBlock::do_jsr() { |
twisti@2047 | 1211 | ShouldNotCallThis(); |
twisti@2047 | 1212 | } |
twisti@2047 | 1213 | |
twisti@2047 | 1214 | void SharkBlock::do_ret() { |
twisti@2047 | 1215 | ShouldNotCallThis(); |
twisti@2047 | 1216 | } |
twisti@2047 | 1217 | |
twisti@2047 | 1218 | void SharkBlock::do_if(ICmpInst::Predicate p, SharkValue* b, SharkValue* a) { |
twisti@2047 | 1219 | ShouldNotCallThis(); |
twisti@2047 | 1220 | } |
twisti@2047 | 1221 | |
twisti@2047 | 1222 | void SharkBlock::do_switch() { |
twisti@2047 | 1223 | ShouldNotCallThis(); |
twisti@2047 | 1224 | } |
twisti@2047 | 1225 | |
twisti@2047 | 1226 | void SharkBlock::do_call() { |
twisti@2047 | 1227 | ShouldNotCallThis(); |
twisti@2047 | 1228 | } |
twisti@2047 | 1229 | |
twisti@2047 | 1230 | void SharkBlock::do_instance_check() { |
twisti@2047 | 1231 | ShouldNotCallThis(); |
twisti@2047 | 1232 | } |
twisti@2047 | 1233 | |
twisti@2047 | 1234 | bool SharkBlock::maybe_do_instanceof_if() { |
twisti@2047 | 1235 | ShouldNotCallThis(); |
twisti@2047 | 1236 | } |
twisti@2047 | 1237 | |
twisti@2047 | 1238 | void SharkBlock::do_new() { |
twisti@2047 | 1239 | ShouldNotCallThis(); |
twisti@2047 | 1240 | } |
twisti@2047 | 1241 | |
twisti@2047 | 1242 | void SharkBlock::do_newarray() { |
twisti@2047 | 1243 | ShouldNotCallThis(); |
twisti@2047 | 1244 | } |
twisti@2047 | 1245 | |
twisti@2047 | 1246 | void SharkBlock::do_anewarray() { |
twisti@2047 | 1247 | ShouldNotCallThis(); |
twisti@2047 | 1248 | } |
twisti@2047 | 1249 | |
twisti@2047 | 1250 | void SharkBlock::do_multianewarray() { |
twisti@2047 | 1251 | ShouldNotCallThis(); |
twisti@2047 | 1252 | } |
twisti@2047 | 1253 | |
twisti@2047 | 1254 | void SharkBlock::do_monitorenter() { |
twisti@2047 | 1255 | ShouldNotCallThis(); |
twisti@2047 | 1256 | } |
twisti@2047 | 1257 | |
twisti@2047 | 1258 | void SharkBlock::do_monitorexit() { |
twisti@2047 | 1259 | ShouldNotCallThis(); |
twisti@2047 | 1260 | } |