Mercurial > hg > graal-jvmci-8
comparison src/share/vm/c1/c1_Runtime1.cpp @ 23745:a074ae16281d
backport of JDK-8164480
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 26 Aug 2016 17:49:18 +0200 |
parents | dd9cc155639c |
children | f13e777eb255 |
comparison
equal
deleted
inserted
replaced
23744:76ab52763a5d | 23745:a074ae16281d |
---|---|
542 // exception handler can cause class loading, which might throw an | 542 // exception handler can cause class loading, which might throw an |
543 // exception and those fields are expected to be clear during | 543 // exception and those fields are expected to be clear during |
544 // normal bytecode execution. | 544 // normal bytecode execution. |
545 thread->clear_exception_oop_and_pc(); | 545 thread->clear_exception_oop_and_pc(); |
546 | 546 |
547 Handle original_exception(thread, exception()); | 547 bool recursive_exception = false; |
548 | 548 continuation = SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, false, false, recursive_exception); |
549 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 | 549 // If an exception was thrown during exception dispatch, the exception oop may have changed |
551 thread->set_exception_oop(exception()); | 550 thread->set_exception_oop(exception()); |
552 thread->set_exception_pc(pc); | 551 thread->set_exception_pc(pc); |
553 | 552 |
554 // the exception cache is used only by non-implicit exceptions | 553 // the exception cache is used only by non-implicit exceptions |
555 // Update the exception cache only when there didn't happen | 554 // Update the exception cache only when there didn't happen |
556 // another exception during the computation of the compiled | 555 // another exception during the computation of the compiled |
557 // exception handler. | 556 // exception handler. Checking for exception oop equality is not |
558 if (continuation != NULL && original_exception() == exception()) { | 557 // sufficient because some exceptions are pre-allocated and reused. |
558 if (continuation != NULL && !recursive_exception) { | |
559 nm->add_handler_for_exception_and_pc(exception, pc, continuation); | 559 nm->add_handler_for_exception_and_pc(exception, pc, continuation); |
560 } | 560 } |
561 } | 561 } |
562 | 562 |
563 thread->set_vm_result(exception()); | 563 thread->set_vm_result(exception()); |