Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
5250:0f6f647e8a96 | 5251:467de393651a |
---|---|
831 | 831 |
832 // Section offsets | 832 // Section offsets |
833 _consts_offset = content_offset() + code_buffer->total_offset_of(code_buffer->consts()); | 833 _consts_offset = content_offset() + code_buffer->total_offset_of(code_buffer->consts()); |
834 _stub_offset = content_offset() + code_buffer->total_offset_of(code_buffer->stubs()); | 834 _stub_offset = content_offset() + code_buffer->total_offset_of(code_buffer->stubs()); |
835 | 835 |
836 // Exception handler and deopt handler are in the stub section | |
837 assert(offsets->value(CodeOffsets::Exceptions) != -1, "must be set"); | |
838 assert(offsets->value(CodeOffsets::Deopt ) != -1, "must be set"); | |
839 #ifdef GRAAL | 836 #ifdef GRAAL |
840 // graal produces no (!) stub section | 837 // graal produces no (!) stub section |
841 _exception_offset = code_offset() + offsets->value(CodeOffsets::Exceptions); | 838 if (offsets->value(CodeOffsets::Exceptions) != -1) { |
842 _deoptimize_offset = code_offset() + offsets->value(CodeOffsets::Deopt); | 839 _exception_offset = code_offset() + offsets->value(CodeOffsets::Exceptions); |
840 } else { | |
841 _exception_offset = -1; | |
842 } | |
843 if (offsets->value(CodeOffsets::Deopt) != -1) { | |
844 _deoptimize_offset = code_offset() + offsets->value(CodeOffsets::Deopt); | |
845 } else { | |
846 _deoptimize_offset = -1; | |
847 } | |
843 if (offsets->value(CodeOffsets::DeoptMH) != -1) { | 848 if (offsets->value(CodeOffsets::DeoptMH) != -1) { |
844 _deoptimize_mh_offset = code_offset() + offsets->value(CodeOffsets::DeoptMH); | 849 _deoptimize_mh_offset = code_offset() + offsets->value(CodeOffsets::DeoptMH); |
845 } else { | 850 } else { |
846 _deoptimize_mh_offset = -1; | 851 _deoptimize_mh_offset = -1; |
847 } | 852 } |
848 #else | 853 #else |
854 // Exception handler and deopt handler are in the stub section | |
855 assert(offsets->value(CodeOffsets::Exceptions) != -1, "must be set"); | |
856 assert(offsets->value(CodeOffsets::Deopt ) != -1, "must be set"); | |
857 | |
849 _exception_offset = _stub_offset + offsets->value(CodeOffsets::Exceptions); | 858 _exception_offset = _stub_offset + offsets->value(CodeOffsets::Exceptions); |
850 _deoptimize_offset = _stub_offset + offsets->value(CodeOffsets::Deopt); | 859 _deoptimize_offset = _stub_offset + offsets->value(CodeOffsets::Deopt); |
851 if (offsets->value(CodeOffsets::DeoptMH) != -1) { | 860 if (offsets->value(CodeOffsets::DeoptMH) != -1) { |
852 _deoptimize_mh_offset = _stub_offset + offsets->value(CodeOffsets::DeoptMH); | 861 _deoptimize_mh_offset = _stub_offset + offsets->value(CodeOffsets::DeoptMH); |
853 } else { | 862 } else { |