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

Side by Side 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 check for unmodified objects 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 unified diff | Download patch
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/global-handles.h" 5 #include "src/global-handles.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/v8.h" 8 #include "src/v8.h"
9 #include "src/vm-state-inl.h" 9 #include "src/vm-state-inl.h"
10 10
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 node->CollectPhantomCallbackData(isolate(), 680 node->CollectPhantomCallbackData(isolate(),
681 &pending_phantom_callbacks_); 681 &pending_phantom_callbacks_);
682 } else { 682 } else {
683 v->VisitPointer(node->location()); 683 v->VisitPointer(node->location());
684 } 684 }
685 } 685 }
686 } 686 }
687 } 687 }
688 688
689 689
690 void GlobalHandles::IterateNewSpaceWeakRoots(ObjectVisitor* v,
691 WeakSlotCallback can_skip) {
692 for (int i = 0; i < new_space_nodes_.length(); ++i) {
693 Node* node = new_space_nodes_[i];
694 Object* object = node->object();
695 // If node->location is used instead of &object, import-expando-gc.html
696 // fails
697 if (node->IsWeak() && !can_skip(node->location()))
698 v->VisitPointer(&object); // node->location());
699 }
700 }
701
702
690 bool GlobalHandles::IterateObjectGroups(ObjectVisitor* v, 703 bool GlobalHandles::IterateObjectGroups(ObjectVisitor* v,
691 WeakSlotCallbackWithHeap can_skip) { 704 WeakSlotCallbackWithHeap can_skip) {
692 ComputeObjectGroupsAndImplicitReferences(); 705 ComputeObjectGroupsAndImplicitReferences();
693 int last = 0; 706 int last = 0;
694 bool any_group_was_visited = false; 707 bool any_group_was_visited = false;
695 for (int i = 0; i < object_groups_.length(); i++) { 708 for (int i = 0; i < object_groups_.length(); i++) {
696 ObjectGroup* entry = object_groups_.at(i); 709 ObjectGroup* entry = object_groups_.at(i);
697 DCHECK(entry != NULL); 710 DCHECK(entry != NULL);
698 711
699 Object*** objects = entry->objects; 712 Object*** objects = entry->objects;
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 blocks_[block][offset] = object; 1287 blocks_[block][offset] = object;
1275 if (isolate->heap()->InNewSpace(object)) { 1288 if (isolate->heap()->InNewSpace(object)) {
1276 new_space_indices_.Add(size_); 1289 new_space_indices_.Add(size_);
1277 } 1290 }
1278 *index = size_++; 1291 *index = size_++;
1279 } 1292 }
1280 1293
1281 1294
1282 } // namespace internal 1295 } // namespace internal
1283 } // namespace v8 1296 } // namespace v8
OLDNEW
« no previous file with comments | « src/global-handles.h ('k') | src/heap/heap.cc » ('j') | src/heap/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698