equal
deleted
inserted
replaced
745 #endif //PRODUCT |
745 #endif //PRODUCT |
746 |
746 |
747 CodeBuffer dest(dest_blob); |
747 CodeBuffer dest(dest_blob); |
748 assert(dest_blob->content_size() >= total_content_size(), "good sizing"); |
748 assert(dest_blob->content_size() >= total_content_size(), "good sizing"); |
749 this->compute_final_layout(&dest); |
749 this->compute_final_layout(&dest); |
|
750 |
|
751 // Set beginning of constant table before relocating. |
|
752 dest_blob->set_ctable_begin(dest.consts()->start()); |
|
753 |
750 relocate_code_to(&dest); |
754 relocate_code_to(&dest); |
751 |
755 |
752 // transfer strings and comments from buffer to blob |
756 // transfer strings and comments from buffer to blob |
753 dest_blob->set_strings(_code_strings); |
757 dest_blob->set_strings(_code_strings); |
754 |
758 |
938 } else { |
942 } else { |
939 cb_sect->set_mark(cb_start + this_sect->mark_off()); |
943 cb_sect->set_mark(cb_start + this_sect->mark_off()); |
940 } |
944 } |
941 } |
945 } |
942 |
946 |
|
947 // Needs to be initialized when calling fix_relocation_after_move. |
|
948 cb.blob()->set_ctable_begin(cb.consts()->start()); |
|
949 |
943 // Move all the code and relocations to the new blob: |
950 // Move all the code and relocations to the new blob: |
944 relocate_code_to(&cb); |
951 relocate_code_to(&cb); |
945 |
952 |
946 // Copy the temporary code buffer into the current code buffer. |
953 // Copy the temporary code buffer into the current code buffer. |
947 // Basically, do {*this = cb}, except for some control information. |
954 // Basically, do {*this = cb}, except for some control information. |