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

Unified Diff: src/mark-compact.cc

Issue 17410013: Use body descriptor to update pointers from cells. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Renamed local variable.wq Created 7 years, 6 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 | « no previous file | no next file » | 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 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);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698