hotspot/src/share/vm/code/nmethod.cpp
changeset 7718 23502bf34686
parent 7444 be338e543a57
parent 7707 b4ff9fc6d954
child 7913 dd096a83bdbb
equal deleted inserted replaced
7699:737f9409bd20 7718:23502bf34686
   809     // Section offsets
   809     // Section offsets
   810     _consts_offset           = content_offset()      + code_buffer->total_offset_of(code_buffer->consts());
   810     _consts_offset           = content_offset()      + code_buffer->total_offset_of(code_buffer->consts());
   811     _stub_offset             = content_offset()      + code_buffer->total_offset_of(code_buffer->stubs());
   811     _stub_offset             = content_offset()      + code_buffer->total_offset_of(code_buffer->stubs());
   812 
   812 
   813     // Exception handler and deopt handler are in the stub section
   813     // Exception handler and deopt handler are in the stub section
       
   814     assert(offsets->value(CodeOffsets::Exceptions) != -1, "must be set");
       
   815     assert(offsets->value(CodeOffsets::Deopt     ) != -1, "must be set");
   814     _exception_offset        = _stub_offset          + offsets->value(CodeOffsets::Exceptions);
   816     _exception_offset        = _stub_offset          + offsets->value(CodeOffsets::Exceptions);
   815     _deoptimize_offset       = _stub_offset          + offsets->value(CodeOffsets::Deopt);
   817     _deoptimize_offset       = _stub_offset          + offsets->value(CodeOffsets::Deopt);
   816     if (has_method_handle_invokes()) {
   818     if (offsets->value(CodeOffsets::DeoptMH) != -1) {
   817       _deoptimize_mh_offset  = _stub_offset          + offsets->value(CodeOffsets::DeoptMH);
   819       _deoptimize_mh_offset  = _stub_offset          + offsets->value(CodeOffsets::DeoptMH);
   818     } else {
   820     } else {
   819       _deoptimize_mh_offset  = -1;
   821       _deoptimize_mh_offset  = -1;
   820     }
   822     }
   821     if (offsets->value(CodeOffsets::UnwindHandler) != -1) {
   823     if (offsets->value(CodeOffsets::UnwindHandler) != -1) {
  1907     if (pcs[i].is_method_handle_invoke()) {
  1909     if (pcs[i].is_method_handle_invoke()) {
  1908       set_has_method_handle_invokes(true);
  1910       set_has_method_handle_invokes(true);
  1909       break;
  1911       break;
  1910     }
  1912     }
  1911   }
  1913   }
       
  1914   assert(has_method_handle_invokes() == (_deoptimize_mh_offset != -1), "must have deopt mh handler");
  1912 
  1915 
  1913   int size = count * sizeof(PcDesc);
  1916   int size = count * sizeof(PcDesc);
  1914   assert(scopes_pcs_size() >= size, "oob");
  1917   assert(scopes_pcs_size() >= size, "oob");
  1915   memcpy(scopes_pcs_begin(), pcs, size);
  1918   memcpy(scopes_pcs_begin(), pcs, size);
  1916 
  1919