Mercurial > hg > truffle
comparison src/share/vm/c1/c1_LIRGenerator.cpp @ 1378:9f5b60a14736
6939930: exception unwind changes in 6919934 hurts compilation speed
Reviewed-by: twisti
author | never |
---|---|
date | Thu, 15 Apr 2010 18:14:49 -0700 |
parents | 76c1d7d13ec5 |
children | 0ba67bb5392c c18cbe5936b8 61b2245abf36 |
comparison
equal
deleted
inserted
replaced
1377:ef74d6d1ac1e | 1378:9f5b60a14736 |
---|---|
1763 (x->exception()->as_NewInstance() == NULL && x->exception()->as_ExceptionObject() == NULL)) { | 1763 (x->exception()->as_NewInstance() == NULL && x->exception()->as_ExceptionObject() == NULL)) { |
1764 // if the exception object wasn't created using new then it might be null. | 1764 // if the exception object wasn't created using new then it might be null. |
1765 __ null_check(exception_opr, new CodeEmitInfo(info, true)); | 1765 __ null_check(exception_opr, new CodeEmitInfo(info, true)); |
1766 } | 1766 } |
1767 | 1767 |
1768 if (compilation()->env()->jvmti_can_post_on_exceptions() && | 1768 if (compilation()->env()->jvmti_can_post_on_exceptions()) { |
1769 !block()->is_set(BlockBegin::default_exception_handler_flag)) { | |
1770 // we need to go through the exception lookup path to get JVMTI | 1769 // we need to go through the exception lookup path to get JVMTI |
1771 // notification done | 1770 // notification done |
1772 unwind = false; | 1771 unwind = false; |
1773 } | 1772 } |
1774 | 1773 |
1775 assert(!block()->is_set(BlockBegin::default_exception_handler_flag) || unwind, | |
1776 "should be no more handlers to dispatch to"); | |
1777 | |
1778 if (compilation()->env()->dtrace_method_probes() && | |
1779 block()->is_set(BlockBegin::default_exception_handler_flag)) { | |
1780 // notify that this frame is unwinding | |
1781 BasicTypeList signature; | |
1782 signature.append(T_INT); // thread | |
1783 signature.append(T_OBJECT); // methodOop | |
1784 LIR_OprList* args = new LIR_OprList(); | |
1785 args->append(getThreadPointer()); | |
1786 LIR_Opr meth = new_register(T_OBJECT); | |
1787 __ oop2reg(method()->constant_encoding(), meth); | |
1788 args->append(meth); | |
1789 call_runtime(&signature, args, CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), voidType, NULL); | |
1790 } | |
1791 | |
1792 // move exception oop into fixed register | 1774 // move exception oop into fixed register |
1793 __ move(exception_opr, exceptionOopOpr()); | 1775 __ move(exception_opr, exceptionOopOpr()); |
1794 | 1776 |
1795 if (unwind) { | 1777 if (unwind) { |
1796 __ unwind_exception(LIR_OprFact::illegalOpr, exceptionOopOpr(), info); | 1778 __ unwind_exception(exceptionOopOpr()); |
1797 } else { | 1779 } else { |
1798 __ throw_exception(exceptionPcOpr(), exceptionOopOpr(), info); | 1780 __ throw_exception(exceptionPcOpr(), exceptionOopOpr(), info); |
1799 } | 1781 } |
1800 } | 1782 } |
1801 | 1783 |