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

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: Sync 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
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 32aba56f98d0119c19a294d37684ebdf77d49951..1e1a7376eea1693f561e00c7e948bf0cbab5b3a7 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -2847,10 +2847,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()) {
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698