750 } |
750 } |
751 |
751 |
752 // Handle ret bytecode |
752 // Handle ret bytecode |
753 void Parse::do_ret() { |
753 void Parse::do_ret() { |
754 // Find to whom we return. |
754 // Find to whom we return. |
755 #if 0 // %%%% MAKE THIS WORK |
|
756 Node* con = local(); |
|
757 const TypePtr* tp = con->bottom_type()->isa_ptr(); |
|
758 assert(tp && tp->singleton(), ""); |
|
759 int return_bci = (int) tp->get_con(); |
|
760 merge(return_bci); |
|
761 #else |
|
762 assert(block()->num_successors() == 1, "a ret can only go one place now"); |
755 assert(block()->num_successors() == 1, "a ret can only go one place now"); |
763 Block* target = block()->successor_at(0); |
756 Block* target = block()->successor_at(0); |
764 assert(!target->is_ready(), "our arrival must be expected"); |
757 assert(!target->is_ready(), "our arrival must be expected"); |
765 profile_ret(target->flow()->start()); |
758 profile_ret(target->flow()->start()); |
766 int pnum = target->next_path_num(); |
759 int pnum = target->next_path_num(); |
767 merge_common(target, pnum); |
760 merge_common(target, pnum); |
768 #endif |
|
769 } |
761 } |
770 |
762 |
771 //--------------------------dynamic_branch_prediction-------------------------- |
763 //--------------------------dynamic_branch_prediction-------------------------- |
772 // Try to gather dynamic branch prediction behavior. Return a probability |
764 // Try to gather dynamic branch prediction behavior. Return a probability |
773 // of the branch being taken and set the "cnt" field. Returns a -1.0 |
765 // of the branch being taken and set the "cnt" field. Returns a -1.0 |