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

Unified Diff: src/global-handles.cc

Issue 1358703003: Changed scavenge GC to collect unmodified references (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Modified visitor in object group Created 5 years, 3 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/global-handles.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/global-handles.cc
diff --git a/src/global-handles.cc b/src/global-handles.cc
index 650999f394c5cc7c2e5397afff53c74e3c186d20..0784c8f2c01a5aa7add080e6cf9fddc71d86d788 100644
--- a/src/global-handles.cc
+++ b/src/global-handles.cc
@@ -687,6 +687,19 @@ void GlobalHandles::IterateNewSpaceWeakIndependentRoots(ObjectVisitor* v) {
}
+void GlobalHandles::IterateNewSpaceWeakRoots(ObjectVisitor* v,
+ WeakSlotCallback can_skip) {
+ for (int i = 0; i < new_space_nodes_.length(); ++i) {
+ Node* node = new_space_nodes_[i];
+ Object* object = node->object();
+ // If node->location is used instead of &object, import-expando-gc.html
+ // fails
+ if (node->IsWeak() && !can_skip(node->location()))
+ v->VisitPointer(&object); // node->location());
+ }
+}
+
+
bool GlobalHandles::IterateObjectGroups(ObjectVisitor* v,
WeakSlotCallbackWithHeap can_skip) {
ComputeObjectGroupsAndImplicitReferences();
@@ -718,7 +731,8 @@ bool GlobalHandles::IterateObjectGroups(ObjectVisitor* v,
for (size_t j = 0; j < entry->length; ++j) {
Object* object = *objects[j];
if (object->IsHeapObject()) {
- v->VisitPointer(&object);
+ // v->VisitPointer(&object);
+ v->VisitPointer(objects[j]);
mythria 2015/09/22 10:57:00 If I pass objects[j] instead of &object for the vi
any_group_was_visited = true;
}
}
« no previous file with comments | « src/global-handles.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698