Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/sharedRuntime.cpp @ 2607:008adfd6d850
Fixed the stateBefore of invokes and monitorenter instructions to include the arguments of the instruction.
This is necessary to ensure correct continuation in the interpreter when the stateBefore is used as a deoptimization point.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Fri, 06 May 2011 17:47:17 +0200 |
parents | 98fa88528319 |
children | b1b58f908044 |
comparison
equal
deleted
inserted
replaced
2606:f21f430a6ef2 | 2607:008adfd6d850 |
---|---|
690 java_lang_Throwable::fill_in_stack_trace(exception); | 690 java_lang_Throwable::fill_in_stack_trace(exception); |
691 } | 691 } |
692 throw_and_post_jvmti_exception(thread, exception); | 692 throw_and_post_jvmti_exception(thread, exception); |
693 JRT_END | 693 JRT_END |
694 | 694 |
695 address SharedRuntime::deoptimization_continuation(JavaThread* thread, address pc, nmethod* nm) | |
696 { | |
697 if (TraceSignals) { | |
698 tty->print_cr(err_msg("Deoptimizing on implicit exception at relative pc=%d in method %s", pc - nm->entry_point(), nm->method()->name()->as_C_string())); | |
699 } | |
700 thread->_ScratchA = (intptr_t)pc; | |
701 return (SharedRuntime::deopt_blob()->jmp_uncommon_trap()); | |
702 } | |
703 | |
695 address SharedRuntime::continuation_for_implicit_exception(JavaThread* thread, | 704 address SharedRuntime::continuation_for_implicit_exception(JavaThread* thread, |
696 address pc, | 705 address pc, |
697 SharedRuntime::ImplicitExceptionKind exception_kind) | 706 SharedRuntime::ImplicitExceptionKind exception_kind) |
698 { | 707 { |
699 address target_pc = NULL; | 708 address target_pc = NULL; |
775 | 784 |
776 #ifndef PRODUCT | 785 #ifndef PRODUCT |
777 _implicit_null_throws++; | 786 _implicit_null_throws++; |
778 #endif | 787 #endif |
779 if (UseC1X) { | 788 if (UseC1X) { |
780 if (TraceSignals) { | 789 target_pc = deoptimization_continuation(thread, pc, nm); |
781 tty->print_cr(err_msg("calling implicit call stub relative pc=%d method name = %s", pc - nm->entry_point(), nm->method()->name()->as_C_string())); | |
782 } | |
783 thread->_ScratchA = (intptr_t)pc; | |
784 target_pc = (SharedRuntime::deopt_blob()->jmp_uncommon_trap());//Runtime1::entry_for(Runtime1::c1x_global_implicit_null_id); | |
785 } else { | 790 } else { |
786 target_pc = nm->continuation_for_implicit_exception(pc); | 791 target_pc = nm->continuation_for_implicit_exception(pc); |
787 } | 792 } |
788 // If there's an unexpected fault, target_pc might be NULL, | 793 // If there's an unexpected fault, target_pc might be NULL, |
789 // in which case we want to fall through into the normal | 794 // in which case we want to fall through into the normal |