hotspot/src/share/vm/c1/c1_Runtime1.cpp
changeset 41057 f77b9d9e0e4c
parent 40655 9f644073d3a0
child 42664 29142a56c193
equal deleted inserted replaced
41054:29ca540a1910 41057:f77b9d9e0e4c
   574     // exception handler can cause class loading, which might throw an
   574     // exception handler can cause class loading, which might throw an
   575     // exception and those fields are expected to be clear during
   575     // exception and those fields are expected to be clear during
   576     // normal bytecode execution.
   576     // normal bytecode execution.
   577     thread->clear_exception_oop_and_pc();
   577     thread->clear_exception_oop_and_pc();
   578 
   578 
   579     Handle original_exception(thread, exception());
   579     bool recursive_exception = false;
   580 
   580     continuation = SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, false, false, recursive_exception);
   581     continuation = SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, false, false);
       
   582     // If an exception was thrown during exception dispatch, the exception oop may have changed
   581     // If an exception was thrown during exception dispatch, the exception oop may have changed
   583     thread->set_exception_oop(exception());
   582     thread->set_exception_oop(exception());
   584     thread->set_exception_pc(pc);
   583     thread->set_exception_pc(pc);
   585 
   584 
   586     // the exception cache is used only by non-implicit exceptions
   585     // the exception cache is used only by non-implicit exceptions
   587     // Update the exception cache only when there didn't happen
   586     // Update the exception cache only when there didn't happen
   588     // another exception during the computation of the compiled
   587     // another exception during the computation of the compiled
   589     // exception handler.
   588     // exception handler. Checking for exception oop equality is not
   590     if (continuation != NULL && original_exception() == exception()) {
   589     // sufficient because some exceptions are pre-allocated and reused.
       
   590     if (continuation != NULL && !recursive_exception) {
   591       nm->add_handler_for_exception_and_pc(exception, pc, continuation);
   591       nm->add_handler_for_exception_and_pc(exception, pc, continuation);
   592     }
   592     }
   593   }
   593   }
   594 
   594 
   595   thread->set_vm_result(exception());
   595   thread->set_vm_result(exception());