Mercurial > hg > graal-compiler
diff src/share/vm/code/nmethod.cpp @ 18125:2a69cbe850a8
Reduce diff with upstream
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Mon, 20 Oct 2014 19:07:20 +0200 |
parents | 52b4284cb496 |
children | dcfdd60edaf1 |
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp Mon Oct 20 16:26:05 2014 +0200 +++ b/src/share/vm/code/nmethod.cpp Mon Oct 20 19:07:20 2014 +0200 @@ -664,6 +664,7 @@ + round_to(handler_table->size_in_bytes(), oopSize) + round_to(nul_chk_table->size_in_bytes(), oopSize) + round_to(debug_info->data_size() , oopSize); + nm = new (nmethod_size) nmethod(method(), nmethod_size, compile_id, entry_bci, offsets, orig_pc_offset, debug_info, dependencies, code_buffer, frame_size, @@ -934,7 +935,7 @@ #ifdef GRAAL _graal_installed_code = installed_code(); _speculation_log = (instanceOop)speculation_log(); -#endif + if (compiler->is_graal()) { // Graal might not produce any stub sections if (offsets->value(CodeOffsets::Exceptions) != -1) { @@ -953,17 +954,20 @@ _deoptimize_mh_offset = -1; } } else { - // Exception handler and deopt handler are in the stub section - assert(offsets->value(CodeOffsets::Exceptions) != -1, "must be set"); - assert(offsets->value(CodeOffsets::Deopt ) != -1, "must be set"); - - _exception_offset = _stub_offset + offsets->value(CodeOffsets::Exceptions); - _deoptimize_offset = _stub_offset + offsets->value(CodeOffsets::Deopt); - if (offsets->value(CodeOffsets::DeoptMH) != -1) { - _deoptimize_mh_offset = _stub_offset + offsets->value(CodeOffsets::DeoptMH); - } else { - _deoptimize_mh_offset = -1; - } +#endif + // Exception handler and deopt handler are in the stub section + assert(offsets->value(CodeOffsets::Exceptions) != -1, "must be set"); + assert(offsets->value(CodeOffsets::Deopt ) != -1, "must be set"); + + _exception_offset = _stub_offset + offsets->value(CodeOffsets::Exceptions); + _deoptimize_offset = _stub_offset + offsets->value(CodeOffsets::Deopt); + if (offsets->value(CodeOffsets::DeoptMH) != -1) { + _deoptimize_mh_offset = _stub_offset + offsets->value(CodeOffsets::DeoptMH); + } else { + _deoptimize_mh_offset = -1; +#ifdef GRAAL + } +#endif } if (offsets->value(CodeOffsets::UnwindHandler) != -1) { _unwind_handler_offset = code_offset() + offsets->value(CodeOffsets::UnwindHandler);