1393 |
1393 |
1394 // Check to see whether we are inlining. If so, Return |
1394 // Check to see whether we are inlining. If so, Return |
1395 // instructions become Gotos to the continuation point. |
1395 // instructions become Gotos to the continuation point. |
1396 if (continuation() != NULL) { |
1396 if (continuation() != NULL) { |
1397 assert(!method()->is_synchronized() || InlineSynchronizedMethods, "can not inline synchronized methods yet"); |
1397 assert(!method()->is_synchronized() || InlineSynchronizedMethods, "can not inline synchronized methods yet"); |
|
1398 |
|
1399 if (compilation()->env()->dtrace_method_probes()) { |
|
1400 // Report exit from inline methods |
|
1401 Values* args = new Values(1); |
|
1402 args->push(append(new Constant(new ObjectConstant(method())))); |
|
1403 append(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args)); |
|
1404 } |
1398 |
1405 |
1399 // If the inlined method is synchronized, the monitor must be |
1406 // If the inlined method is synchronized, the monitor must be |
1400 // released before we jump to the continuation block. |
1407 // released before we jump to the continuation block. |
1401 if (method()->is_synchronized()) { |
1408 if (method()->is_synchronized()) { |
1402 assert(state()->locks_size() == 1, "receiver must be locked here"); |
1409 assert(state()->locks_size() == 1, "receiver must be locked here"); |
3299 |
3306 |
3300 block()->set(BlockBegin::was_visited_flag); |
3307 block()->set(BlockBegin::was_visited_flag); |
3301 Value exception = append_with_bci(new ExceptionObject(), SynchronizationEntryBCI); |
3308 Value exception = append_with_bci(new ExceptionObject(), SynchronizationEntryBCI); |
3302 assert(exception->is_pinned(), "must be"); |
3309 assert(exception->is_pinned(), "must be"); |
3303 |
3310 |
|
3311 if (compilation()->env()->dtrace_method_probes()) { |
|
3312 // Report exit from inline methods |
|
3313 Values* args = new Values(1); |
|
3314 args->push(append(new Constant(new ObjectConstant(method())))); |
|
3315 append(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args)); |
|
3316 } |
|
3317 |
3304 int bci = SynchronizationEntryBCI; |
3318 int bci = SynchronizationEntryBCI; |
3305 if (lock) { |
3319 if (lock) { |
3306 assert(state()->locks_size() > 0 && state()->lock_at(state()->locks_size() - 1) == lock, "lock is missing"); |
3320 assert(state()->locks_size() > 0 && state()->lock_at(state()->locks_size() - 1) == lock, "lock is missing"); |
3307 if (!lock->is_linked()) { |
3321 if (!lock->is_linked()) { |
3308 lock = append_with_bci(lock, -1); |
3322 lock = append_with_bci(lock, -1); |
3484 : state()->local_at(0); |
3498 : state()->local_at(0); |
3485 sync_handler = new BlockBegin(SynchronizationEntryBCI); |
3499 sync_handler = new BlockBegin(SynchronizationEntryBCI); |
3486 inline_sync_entry(lock, sync_handler); |
3500 inline_sync_entry(lock, sync_handler); |
3487 } |
3501 } |
3488 |
3502 |
|
3503 if (compilation()->env()->dtrace_method_probes()) { |
|
3504 Values* args = new Values(1); |
|
3505 args->push(append(new Constant(new ObjectConstant(method())))); |
|
3506 append(new RuntimeCall(voidType, "dtrace_method_entry", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry), args)); |
|
3507 } |
3489 |
3508 |
3490 BlockBegin* callee_start_block = block_at(0); |
3509 BlockBegin* callee_start_block = block_at(0); |
3491 if (callee_start_block != NULL) { |
3510 if (callee_start_block != NULL) { |
3492 assert(callee_start_block->is_set(BlockBegin::parser_loop_header_flag), "must be loop header"); |
3511 assert(callee_start_block->is_set(BlockBegin::parser_loop_header_flag), "must be loop header"); |
3493 Goto* goto_callee = new Goto(callee_start_block, false); |
3512 Goto* goto_callee = new Goto(callee_start_block, false); |