995 |
995 |
996 handler_address = |
996 handler_address = |
997 force_unwind ? NULL : nm->handler_for_exception_and_pc(exception, pc); |
997 force_unwind ? NULL : nm->handler_for_exception_and_pc(exception, pc); |
998 |
998 |
999 if (handler_address == NULL) { |
999 if (handler_address == NULL) { |
|
1000 Handle original_exception(thread, exception()); |
1000 handler_address = SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, force_unwind, true); |
1001 handler_address = SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, force_unwind, true); |
1001 assert (handler_address != NULL, "must have compiled handler"); |
1002 assert (handler_address != NULL, "must have compiled handler"); |
1002 // Update the exception cache only when the unwind was not forced. |
1003 // Update the exception cache only when the unwind was not forced |
1003 if (!force_unwind) { |
1004 // and there didn't happen another exception during the computation of the |
|
1005 // compiled exception handler. |
|
1006 if (!force_unwind && original_exception() == exception()) { |
1004 nm->add_handler_for_exception_and_pc(exception,pc,handler_address); |
1007 nm->add_handler_for_exception_and_pc(exception,pc,handler_address); |
1005 } |
1008 } |
1006 } else { |
1009 } else { |
1007 assert(handler_address == SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, force_unwind, true), "Must be the same"); |
1010 assert(handler_address == SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, force_unwind, true), "Must be the same"); |
1008 } |
1011 } |