Reviewers: danno,
Message:
As discussed offline, Danno will incorporate this into his CL.
Description:
Use body descriptor to update pointers from cells.
[email protected]
Please review this at https://codereview.chromium.org/17410013/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/mark-compact.cc
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index
c06bfd7f7323825d4c0f278c04e39260eaf3cc4f..05a196e4c13d86aed2b505d3efd812ce9c40417d
100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -3418,26 +3418,16 @@ void
MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
cell != NULL;
cell = cell_iterator.Next()) {
if (cell->IsCell()) {
- Address value_address = reinterpret_cast<Address>(cell) +
- (Cell::kValueOffset - kHeapObjectTag);
-
updating_visitor.VisitPointer(reinterpret_cast<Object**>(value_address));
+ Cell::BodyDescriptor::IterateBody(cell, &updating_visitor);
}
}
- HeapObjectIterator js_global_property_cell_iterator(
- heap_->property_cell_space());
- for (HeapObject* cell = js_global_property_cell_iterator.Next();
+ HeapObjectIterator property_cell_iterator(heap_->property_cell_space());
+ for (HeapObject* cell = property_cell_iterator.Next();
cell != NULL;
- cell = js_global_property_cell_iterator.Next()) {
+ cell = property_cell_iterator.Next()) {
if (cell->IsPropertyCell()) {
- Address value_address =
- reinterpret_cast<Address>(cell) +
- (PropertyCell::kValueOffset - kHeapObjectTag);
-
updating_visitor.VisitPointer(reinterpret_cast<Object**>(value_address));
- Address type_address =
- reinterpret_cast<Address>(cell) +
- (PropertyCell::kTypeOffset - kHeapObjectTag);
-
updating_visitor.VisitPointer(reinterpret_cast<Object**>(type_address));
+ PropertyCell::BodyDescriptor::IterateBody(cell, &updating_visitor);
}
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.