hotspot/src/share/vm/c1/c1_Runtime1.cpp
changeset 26169 b1e1ef66da74
parent 25716 fc9bd7814b10
child 29180 50369728b00e
equal deleted inserted replaced
26167:0f6102d5ac19 26169:b1e1ef66da74
   544     // exception handler can cause class loading, which might throw an
   544     // exception handler can cause class loading, which might throw an
   545     // exception and those fields are expected to be clear during
   545     // exception and those fields are expected to be clear during
   546     // normal bytecode execution.
   546     // normal bytecode execution.
   547     thread->clear_exception_oop_and_pc();
   547     thread->clear_exception_oop_and_pc();
   548 
   548 
       
   549     Handle original_exception(thread, exception());
       
   550 
   549     continuation = SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, false, false);
   551     continuation = SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, false, false);
   550     // If an exception was thrown during exception dispatch, the exception oop may have changed
   552     // If an exception was thrown during exception dispatch, the exception oop may have changed
   551     thread->set_exception_oop(exception());
   553     thread->set_exception_oop(exception());
   552     thread->set_exception_pc(pc);
   554     thread->set_exception_pc(pc);
   553 
   555 
   554     // the exception cache is used only by non-implicit exceptions
   556     // the exception cache is used only by non-implicit exceptions
   555     if (continuation != NULL) {
   557     // Update the exception cache only when there didn't happen
       
   558     // another exception during the computation of the compiled
       
   559     // exception handler.
       
   560     if (continuation != NULL && original_exception() == exception()) {
   556       nm->add_handler_for_exception_and_pc(exception, pc, continuation);
   561       nm->add_handler_for_exception_and_pc(exception, pc, continuation);
   557     }
   562     }
   558   }
   563   }
   559 
   564 
   560   thread->set_vm_result(exception());
   565   thread->set_vm_result(exception());