2037 return_current(NULL);
2038 break;
2039
2040 case Bytecodes::_ireturn:
2041 case Bytecodes::_areturn:
2042 case Bytecodes::_freturn:
2043 return_current(pop());
2044 break;
2045 case Bytecodes::_lreturn:
2046 return_current(pop_pair());
2047 break;
2048 case Bytecodes::_dreturn:
2049 return_current(pop_pair());
2050 break;
2051
2052 case Bytecodes::_athrow:
2053 // null exception oop throws NULL pointer exception
2054 do_null_check(peek(), T_OBJECT);
2055 if (stopped()) return;
2056 if (env()->jvmti_can_post_exceptions()) {
2057 // "Full-speed throwing" is not necessary here,
2058 // since we're notifying the VM on every throw.
2059 uncommon_trap(Deoptimization::Reason_unhandled,
2060 Deoptimization::Action_none);
2061 return;
2062 }
2063 // Hook the thrown exception directly to subsequent handlers.
2064 if (BailoutToInterpreterForThrows) {
2065 // Keep method interpreted from now on.
2066 uncommon_trap(Deoptimization::Reason_unhandled,
2067 Deoptimization::Action_make_not_compilable);
2068 return;
2069 }
2070 add_exception_state(make_exception_state(peek()));
2071 break;
2072
2073 case Bytecodes::_goto: // fall through
2074 case Bytecodes::_goto_w: {
2075 int target_bci = (bc() == Bytecodes::_goto) ? iter().get_dest() : iter().get_far_dest();
2076
2077 // If this is a backwards branch in the bytecodes, add Safepoint
2078 maybe_add_safepoint(target_bci);
2079
2080 // Update method data
2081 profile_taken_branch(target_bci);
2082
|
2037 return_current(NULL);
2038 break;
2039
2040 case Bytecodes::_ireturn:
2041 case Bytecodes::_areturn:
2042 case Bytecodes::_freturn:
2043 return_current(pop());
2044 break;
2045 case Bytecodes::_lreturn:
2046 return_current(pop_pair());
2047 break;
2048 case Bytecodes::_dreturn:
2049 return_current(pop_pair());
2050 break;
2051
2052 case Bytecodes::_athrow:
2053 // null exception oop throws NULL pointer exception
2054 do_null_check(peek(), T_OBJECT);
2055 if (stopped()) return;
2056 if (env()->jvmti_can_post_exceptions()) {
2057
2058 if (CheckExceptionEventsNeeded) {
2059 // if the exception capability is set, then we will generate a
2060 // runtime call to see if we actually need to report exception
2061 // events. If we don't need to report exception events, we will
2062 // take the normal fast path provided by add_exception_events.
2063 // If exception event reporting is enabled, we will take the
2064 // uncommon_trap in the BuildCutout below.
2065
2066 // call C++ runtime routine to determine whether we need to
2067 // report exception events
2068 Node* c = make_runtime_call(RC_LEAF, OptoRuntime::must_post_exception_events_Type(),
2069 CAST_FROM_FN_PTR(address, JvmtiExport::must_post_exception_events_jrt_leaf),
2070 "must_post_exception_events", NULL //no memory effects
2071 );
2072
2073 Node* need_exc_bool = _gvn.transform(new (C, 1) ProjNode(c, TypeFunc::Parms + 0));
2074
2075 // Test the result returned by the runtime call vs. 0
2076 Node* zero = _gvn.intcon(0);
2077 Node* chk = _gvn.transform( new (C, 3) CmpINode(need_exc_bool, zero) );
2078 BoolTest::mask btesteq = BoolTest::eq;
2079 Node* tst = _gvn.transform( new (C, 2) BoolNode(chk, btesteq) );
2080
2081 // Branch to slow_path if runtime call returned true
2082 { BuildCutout unless(this, tst, PROB_MAX);
2083 // "Full-speed throwing" is not necessary here,
2084 // since we're notifying the VM on every throw.
2085 uncommon_trap(Deoptimization::Reason_unhandled,
2086 Deoptimization::Action_none);
2087 }
2088 // this is the fast path
2089 add_exception_state(make_exception_state(peek()));
2090 return;
2091 }
2092 else {
2093 // CheckExceptionEventsNeeded=false
2094 // this is the code that always generated the slow path
2095 // "Full-speed throwing" is not necessary here,
2096 // since we're notifying the VM on every throw.
2097 uncommon_trap(Deoptimization::Reason_unhandled,
2098 Deoptimization::Action_none);
2099 return;
2100 }
2101 }
2102 // Hook the thrown exception directly to subsequent handlers.
2103 if (BailoutToInterpreterForThrows) {
2104 // Keep method interpreted from now on.
2105 uncommon_trap(Deoptimization::Reason_unhandled,
2106 Deoptimization::Action_make_not_compilable);
2107 return;
2108 }
2109 add_exception_state(make_exception_state(peek()));
2110 break;
2111
2112 case Bytecodes::_goto: // fall through
2113 case Bytecodes::_goto_w: {
2114 int target_bci = (bc() == Bytecodes::_goto) ? iter().get_dest() : iter().get_far_dest();
2115
2116 // If this is a backwards branch in the bytecodes, add Safepoint
2117 maybe_add_safepoint(target_bci);
2118
2119 // Update method data
2120 profile_taken_branch(target_bci);
2121
|