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

Unified Diff: src/objects-visiting-inl.h

Issue 183883011: Differentate between code target pointers and heap pointers in constant pools. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Minor fix to ConstantPoolArray visiting Created 6 years, 9 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/objects-visiting-inl.h
diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h
index 010f3068a9e3ce1b7e493cb513e3c8df9fef3562..cc2072fa72919824b3db7f42af3a57492a627840 100644
--- a/src/objects-visiting-inl.h
+++ b/src/objects-visiting-inl.h
@@ -489,16 +489,17 @@ void StaticMarkingVisitor<StaticVisitor>::VisitConstantPoolArray(
Map* map, HeapObject* object) {
Heap* heap = map->GetHeap();
ConstantPoolArray* constant_pool = ConstantPoolArray::cast(object);
- if (constant_pool->count_of_ptr_entries() > 0) {
- int first_ptr_offset = constant_pool->OffsetOfElementAt(
- constant_pool->first_ptr_index());
- int last_ptr_offset = constant_pool->OffsetOfElementAt(
- constant_pool->first_ptr_index() +
- constant_pool->count_of_ptr_entries() - 1);
- StaticVisitor::VisitPointers(
- heap,
- HeapObject::RawField(object, first_ptr_offset),
- HeapObject::RawField(object, last_ptr_offset));
+ for (int i = 0; i < constant_pool->count_of_code_ptr_entries(); i++) {
+ int offset = constant_pool->OffsetOfElementAt(
Michael Starzinger 2014/03/07 15:07:47 nit: Two white-spaces after equal sign.
rmcilroy 2014/03/10 14:03:05 Done.
+ constant_pool->first_code_ptr_index() + i);
+ StaticVisitor::VisitCodeEntry(heap,
+ reinterpret_cast<Address>(HeapObject::RawField(constant_pool, offset)));
+ }
+ for (int i = 0; i < constant_pool->count_of_heap_ptr_entries(); i++) {
+ int offset = constant_pool->OffsetOfElementAt(
Michael Starzinger 2014/03/07 15:07:47 nit: Two white-spaces after equal sign.
rmcilroy 2014/03/10 14:03:05 Done.
+ constant_pool->first_heap_ptr_index() + i);
+ StaticVisitor::VisitPointer(heap,
+ HeapObject::RawField(constant_pool, offset));
}
}

Powered by Google App Engine
This is Rietveld 408576698