src/share/vm/c1/c1_Compilation.cpp

changeset 2046
4a665be40fd3
parent 1972
9887b5e57f9e
child 2103
3e8fbc61cee8
     1.1 --- a/src/share/vm/c1/c1_Compilation.cpp	Tue Aug 10 12:15:10 2010 -0700
     1.2 +++ b/src/share/vm/c1/c1_Compilation.cpp	Wed Aug 11 01:17:27 2010 -0700
     1.3 @@ -220,11 +220,13 @@
     1.4    code_offsets->set_value(CodeOffsets::Deopt, assembler->emit_deopt_handler());
     1.5    CHECK_BAILOUT();
     1.6  
     1.7 -  // Generate code for MethodHandle deopt handler.  We can use the
     1.8 -  // same code as for the normal deopt handler, we just need a
     1.9 -  // different entry point address.
    1.10 -  code_offsets->set_value(CodeOffsets::DeoptMH, assembler->emit_deopt_handler());
    1.11 -  CHECK_BAILOUT();
    1.12 +  // Emit the MethodHandle deopt handler code (if required).
    1.13 +  if (has_method_handle_invokes()) {
    1.14 +    // We can use the same code as for the normal deopt handler, we
    1.15 +    // just need a different entry point address.
    1.16 +    code_offsets->set_value(CodeOffsets::DeoptMH, assembler->emit_deopt_handler());
    1.17 +    CHECK_BAILOUT();
    1.18 +  }
    1.19  
    1.20    // Emit the handler to remove the activation from the stack and
    1.21    // dispatch to the caller.
    1.22 @@ -446,6 +448,7 @@
    1.23  , _has_exception_handlers(false)
    1.24  , _has_fpu_code(true)   // pessimistic assumption
    1.25  , _has_unsafe_access(false)
    1.26 +, _has_method_handle_invokes(false)
    1.27  , _bailout_msg(NULL)
    1.28  , _exception_info_list(NULL)
    1.29  , _allocator(NULL)

mercurial