Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Unified Diff: src/mark-compact.cc

Issue 304143002: Add support for extended constant pool arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 6b3b3db8d47f93e180d091fe51a17dc27b918e91..8d9ec0cdefaa5b8357c1210a218e5333c1b4d791 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -2883,10 +2883,11 @@ void MarkCompactCollector::MigrateObject(HeapObject* dst,
SlotsBuffer::IGNORE_OVERFLOW);
}
} else if (compacting_ && dst->IsConstantPoolArray()) {
- ConstantPoolArray* constant_pool = ConstantPoolArray::cast(dst);
- for (int i = 0; i < constant_pool->count_of_code_ptr_entries(); i++) {
+ ConstantPoolArray* array = ConstantPoolArray::cast(dst);
+ ConstantPoolArray::Iterator code_iter(array, ConstantPoolArray::CODE_PTR);
+ while (!code_iter.is_finished()) {
Address code_entry_slot =
- dst_addr + constant_pool->OffsetOfElementAt(i);
+ dst_addr + array->OffsetOfElementAt(code_iter.next_index());
Address code_entry = Memory::Address_at(code_entry_slot);
if (Page::FromAddress(code_entry)->IsEvacuationCandidate()) {

Powered by Google App Engine
This is Rietveld 408576698