Mercurial > hg > truffle
diff src/share/vm/c1/c1_Compilation.cpp @ 1691:4a665be40fd3
6975855: don't emit deopt MH handler in C1 if not required
Summary: This CR implements the same for C1 as 6926782 for C2.
Reviewed-by: never
author | twisti |
---|---|
date | Wed, 11 Aug 2010 01:17:27 -0700 |
parents | 9887b5e57f9e |
children | 3e8fbc61cee8 |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_Compilation.cpp Tue Aug 10 12:15:10 2010 -0700 +++ b/src/share/vm/c1/c1_Compilation.cpp Wed Aug 11 01:17:27 2010 -0700 @@ -220,11 +220,13 @@ code_offsets->set_value(CodeOffsets::Deopt, assembler->emit_deopt_handler()); CHECK_BAILOUT(); - // Generate code for MethodHandle deopt handler. We can use the - // same code as for the normal deopt handler, we just need a - // different entry point address. - code_offsets->set_value(CodeOffsets::DeoptMH, assembler->emit_deopt_handler()); - CHECK_BAILOUT(); + // Emit the MethodHandle deopt handler code (if required). + if (has_method_handle_invokes()) { + // We can use the same code as for the normal deopt handler, we + // just need a different entry point address. + code_offsets->set_value(CodeOffsets::DeoptMH, assembler->emit_deopt_handler()); + CHECK_BAILOUT(); + } // Emit the handler to remove the activation from the stack and // dispatch to the caller. @@ -446,6 +448,7 @@ , _has_exception_handlers(false) , _has_fpu_code(true) // pessimistic assumption , _has_unsafe_access(false) +, _has_method_handle_invokes(false) , _bailout_msg(NULL) , _exception_info_list(NULL) , _allocator(NULL)