src/share/vm/opto/parse2.cpp
Print this page
rev 1122 : refactored to check all 3 can_post_exception bits and other Dan comments
@@ -2051,24 +2051,24 @@
case Bytecodes::_athrow:
// null exception oop throws NULL pointer exception
do_null_check(peek(), T_OBJECT);
if (stopped()) return;
- if (env()->jvmti_can_post_exceptions()) {
- // "Full-speed throwing" is not necessary here,
- // since we're notifying the VM on every throw.
- uncommon_trap(Deoptimization::Reason_unhandled,
- Deoptimization::Action_none);
- return;
- }
// Hook the thrown exception directly to subsequent handlers.
if (BailoutToInterpreterForThrows) {
// Keep method interpreted from now on.
uncommon_trap(Deoptimization::Reason_unhandled,
Deoptimization::Action_make_not_compilable);
return;
}
+ if (env()->jvmti_can_post_exceptions()) {
+ // check if we must post exception events, take uncommon trap if so (with must_throw = false)
+ uncommon_trap_if_should_post_on_exceptions(Deoptimization::Reason_unhandled, false);
+ // here if should_post_on_exceptions is false
+ // continue on with the normal codegen
+ }
+ // Here if the should_post_on_exceptions if false
add_exception_state(make_exception_state(peek()));
break;
case Bytecodes::_goto: // fall through
case Bytecodes::_goto_w: {