Mercurial > hg > truffle
diff src/share/vm/code/nmethod.cpp @ 5251:467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 18 Apr 2012 23:39:07 +0200 |
parents | 8e6db1a5c537 |
children | 2585af1e26ac |
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp Wed Apr 18 23:19:58 2012 +0200 +++ b/src/share/vm/code/nmethod.cpp Wed Apr 18 23:39:07 2012 +0200 @@ -833,19 +833,28 @@ _consts_offset = content_offset() + code_buffer->total_offset_of(code_buffer->consts()); _stub_offset = content_offset() + code_buffer->total_offset_of(code_buffer->stubs()); - // 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"); #ifdef GRAAL // graal produces no (!) stub section - _exception_offset = code_offset() + offsets->value(CodeOffsets::Exceptions); - _deoptimize_offset = code_offset() + offsets->value(CodeOffsets::Deopt); + if (offsets->value(CodeOffsets::Exceptions) != -1) { + _exception_offset = code_offset() + offsets->value(CodeOffsets::Exceptions); + } else { + _exception_offset = -1; + } + if (offsets->value(CodeOffsets::Deopt) != -1) { + _deoptimize_offset = code_offset() + offsets->value(CodeOffsets::Deopt); + } else { + _deoptimize_offset = -1; + } if (offsets->value(CodeOffsets::DeoptMH) != -1) { _deoptimize_mh_offset = code_offset() + offsets->value(CodeOffsets::DeoptMH); } else { _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) {