diff options
| author | 2014-12-04 10:08:07 +0000 | |
|---|---|---|
| committer | 2014-12-04 10:08:08 +0000 | |
| commit | 4334f95705d8efcbb34ffc5165c3f866eaa8086f (patch) | |
| tree | 23727110baac19fe50cef6f79f262e8baad8a5a4 | |
| parent | 31bacb9da9c931aa04489b0701172c4a35a20e31 (diff) | |
| parent | 3389ca715ebb3d66ba192b657854f8b18e851ba8 (diff) | |
Merge "Call ProcessStrings() in ImageWriter, fix prefix check."
| -rw-r--r-- | compiler/image_writer.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc index 3b1d914f6e..ab5c6c77de 100644 --- a/compiler/image_writer.cc +++ b/compiler/image_writer.cc @@ -77,6 +77,7 @@ bool ImageWriter::PrepareImageAddressSpace() { Thread::Current()->TransitionFromSuspendedToRunnable(); PruneNonImageClasses(); // Remove junk ComputeLazyFieldsForImageClasses(); // Add useful information + ProcessStrings(); Thread::Current()->TransitionFromRunnableToSuspended(kNative); } gc::Heap* heap = Runtime::Current()->GetHeap(); @@ -561,9 +562,9 @@ void ImageWriter::ProcessStrings() { bool is_prefix = false; if (it != existing_strings.end()) { CHECK_LE(length, it->second); - is_prefix = std::equal(combined_chars.begin() + it->first, - combined_chars.begin() + it->first + it->second, - combined_chars.begin() + new_string.first); + is_prefix = std::equal(combined_chars.begin() + new_string.first, + combined_chars.begin() + new_string.first + new_string.second, + combined_chars.begin() + it->first); } if (is_prefix) { // Shares a prefix, set the offset to where the new offset will be. |