comparison src/share/vm/opto/parse1.cpp @ 1344:fdd57634910e

6926979: should simplify catch_inline_exception Reviewed-by: twisti
author never
date Thu, 18 Mar 2010 14:31:41 -0700
parents 7d236a9688c5
children ef74d6d1ac1e
comparison
equal deleted inserted replaced
1305:97fe2cc98b1d 1344:fdd57634910e
796 root()->add_req(exit); 796 root()->add_req(exit);
797 record_for_igvn(exit); 797 record_for_igvn(exit);
798 initial_gvn()->transform_no_reclaim(exit); 798 initial_gvn()->transform_no_reclaim(exit);
799 } 799 }
800 800
801 bool Parse::can_rerun_bytecode() {
802 switch (bc()) {
803 case Bytecodes::_ldc:
804 case Bytecodes::_ldc_w:
805 case Bytecodes::_ldc2_w:
806 case Bytecodes::_getfield:
807 case Bytecodes::_putfield:
808 case Bytecodes::_getstatic:
809 case Bytecodes::_putstatic:
810 case Bytecodes::_arraylength:
811 case Bytecodes::_baload:
812 case Bytecodes::_caload:
813 case Bytecodes::_iaload:
814 case Bytecodes::_saload:
815 case Bytecodes::_faload:
816 case Bytecodes::_aaload:
817 case Bytecodes::_laload:
818 case Bytecodes::_daload:
819 case Bytecodes::_bastore:
820 case Bytecodes::_castore:
821 case Bytecodes::_iastore:
822 case Bytecodes::_sastore:
823 case Bytecodes::_fastore:
824 case Bytecodes::_aastore:
825 case Bytecodes::_lastore:
826 case Bytecodes::_dastore:
827 case Bytecodes::_irem:
828 case Bytecodes::_idiv:
829 case Bytecodes::_lrem:
830 case Bytecodes::_ldiv:
831 case Bytecodes::_frem:
832 case Bytecodes::_fdiv:
833 case Bytecodes::_drem:
834 case Bytecodes::_ddiv:
835 case Bytecodes::_checkcast:
836 case Bytecodes::_instanceof:
837 case Bytecodes::_anewarray:
838 case Bytecodes::_newarray:
839 case Bytecodes::_multianewarray:
840 case Bytecodes::_new:
841 case Bytecodes::_monitorenter: // can re-run initial null check, only
842 case Bytecodes::_return:
843 return true;
844 break;
845
846 // Don't rerun athrow since it's part of the exception path.
847 case Bytecodes::_athrow:
848 case Bytecodes::_invokestatic:
849 case Bytecodes::_invokedynamic:
850 case Bytecodes::_invokespecial:
851 case Bytecodes::_invokevirtual:
852 case Bytecodes::_invokeinterface:
853 return false;
854 break;
855
856 default:
857 assert(false, "unexpected bytecode produced an exception");
858 return true;
859 }
860 }
861
862 //---------------------------do_exceptions------------------------------------- 801 //---------------------------do_exceptions-------------------------------------
863 // Process exceptions arising from the current bytecode. 802 // Process exceptions arising from the current bytecode.
864 // Send caught exceptions to the proper handler within this method. 803 // Send caught exceptions to the proper handler within this method.
865 // Unhandled exceptions feed into _exit. 804 // Unhandled exceptions feed into _exit.
866 void Parse::do_exceptions() { 805 void Parse::do_exceptions() {
869 if (failing()) { 808 if (failing()) {
870 // Pop them all off and throw them away. 809 // Pop them all off and throw them away.
871 while (pop_exception_state() != NULL) ; 810 while (pop_exception_state() != NULL) ;
872 return; 811 return;
873 } 812 }
874
875 // Make sure we can classify this bytecode if we need to.
876 debug_only(can_rerun_bytecode());
877 813
878 PreserveJVMState pjvms(this, false); 814 PreserveJVMState pjvms(this, false);
879 815
880 SafePointNode* ex_map; 816 SafePointNode* ex_map;
881 while ((ex_map = pop_exception_state()) != NULL) { 817 while ((ex_map = pop_exception_state()) != NULL) {