Mercurial > hg > truffle
comparison src/share/vm/code/nmethod.cpp @ 2106:91fe28b03d6a
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Wed, 26 Jan 2011 18:17:37 +0100 |
parents | 06f017f7daa7 5a1e52a439fa |
children | d25d4ca69222 |
comparison
equal
deleted
inserted
replaced
2062:231bf6b9f5ad | 2106:91fe28b03d6a |
---|---|
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 if (UseC1X) { | 816 if (UseC1X) { |
815 // c1x produces no (!) stub section | 817 // c1x produces no (!) stub section |
816 _exception_offset = code_offset() + offsets->value(CodeOffsets::Exceptions); | 818 _exception_offset = code_offset() + offsets->value(CodeOffsets::Exceptions); |
817 _deoptimize_offset = code_offset() + offsets->value(CodeOffsets::Deopt); | 819 _deoptimize_offset = code_offset() + offsets->value(CodeOffsets::Deopt); |
818 if (has_method_handle_invokes()) { | 820 if (offsets->value(CodeOffsets::DeoptMH) != -1) { |
819 _deoptimize_mh_offset = code_offset() + offsets->value(CodeOffsets::DeoptMH); | 821 _deoptimize_mh_offset = code_offset() + offsets->value(CodeOffsets::DeoptMH); |
820 } else { | 822 } else { |
821 _deoptimize_mh_offset = -1; | 823 _deoptimize_mh_offset = -1; |
822 } | 824 } |
823 } else { | 825 } else { |
824 _exception_offset = _stub_offset + offsets->value(CodeOffsets::Exceptions); | 826 _exception_offset = _stub_offset + offsets->value(CodeOffsets::Exceptions); |
825 _deoptimize_offset = _stub_offset + offsets->value(CodeOffsets::Deopt); | 827 _deoptimize_offset = _stub_offset + offsets->value(CodeOffsets::Deopt); |
826 if (has_method_handle_invokes()) { | 828 if (offsets->value(CodeOffsets::DeoptMH) != -1) { |
827 _deoptimize_mh_offset = _stub_offset + offsets->value(CodeOffsets::DeoptMH); | 829 _deoptimize_mh_offset = _stub_offset + offsets->value(CodeOffsets::DeoptMH); |
828 } else { | 830 } else { |
829 _deoptimize_mh_offset = -1; | 831 _deoptimize_mh_offset = -1; |
830 } | 832 } |
831 } | 833 } |
1924 if (pcs[i].is_method_handle_invoke()) { | 1926 if (pcs[i].is_method_handle_invoke()) { |
1925 set_has_method_handle_invokes(true); | 1927 set_has_method_handle_invokes(true); |
1926 break; | 1928 break; |
1927 } | 1929 } |
1928 } | 1930 } |
1931 assert(has_method_handle_invokes() == (_deoptimize_mh_offset != -1), "must have deopt mh handler"); | |
1929 | 1932 |
1930 int size = count * sizeof(PcDesc); | 1933 int size = count * sizeof(PcDesc); |
1931 assert(scopes_pcs_size() >= size, "oob"); | 1934 assert(scopes_pcs_size() >= size, "oob"); |
1932 memcpy(scopes_pcs_begin(), pcs, size); | 1935 memcpy(scopes_pcs_begin(), pcs, size); |
1933 | 1936 |