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

Side by Side Diff: src/global-handles.cc

Issue 505983002: HeapProfiler: remove obsolete AddImplicitReferences (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/global-handles.h ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/global-handles.h" 8 #include "src/global-handles.h"
9 9
10 #include "src/vm-state-inl.h" 10 #include "src/vm-state-inl.h"
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 object_group_connections_.Add(ObjectGroupConnection(id, handle)); 838 object_group_connections_.Add(ObjectGroupConnection(id, handle));
839 } 839 }
840 840
841 841
842 void GlobalHandles::SetRetainedObjectInfo(UniqueId id, 842 void GlobalHandles::SetRetainedObjectInfo(UniqueId id,
843 RetainedObjectInfo* info) { 843 RetainedObjectInfo* info) {
844 retainer_infos_.Add(ObjectGroupRetainerInfo(id, info)); 844 retainer_infos_.Add(ObjectGroupRetainerInfo(id, info));
845 } 845 }
846 846
847 847
848 void GlobalHandles::AddImplicitReferences(HeapObject** parent,
849 Object*** children,
850 size_t length) {
851 #ifdef DEBUG
852 DCHECK(!Node::FromLocation(BitCast<Object**>(parent))->is_independent());
853 for (size_t i = 0; i < length; ++i) {
854 DCHECK(!Node::FromLocation(children[i])->is_independent());
855 }
856 #endif
857 if (length == 0) return;
858 ImplicitRefGroup* group = new ImplicitRefGroup(parent, length);
859 for (size_t i = 0; i < length; ++i)
860 group->children[i] = children[i];
861 implicit_ref_groups_.Add(group);
862 }
863
864
865 void GlobalHandles::SetReferenceFromGroup(UniqueId id, Object** child) { 848 void GlobalHandles::SetReferenceFromGroup(UniqueId id, Object** child) {
866 DCHECK(!Node::FromLocation(child)->is_independent()); 849 DCHECK(!Node::FromLocation(child)->is_independent());
867 implicit_ref_connections_.Add(ObjectGroupConnection(id, child)); 850 implicit_ref_connections_.Add(ObjectGroupConnection(id, child));
868 } 851 }
869 852
870 853
871 void GlobalHandles::SetReference(HeapObject** parent, Object** child) { 854 void GlobalHandles::SetReference(HeapObject** parent, Object** child) {
872 DCHECK(!Node::FromLocation(child)->is_independent()); 855 DCHECK(!Node::FromLocation(child)->is_independent());
873 ImplicitRefGroup* group = new ImplicitRefGroup(parent, 1); 856 ImplicitRefGroup* group = new ImplicitRefGroup(parent, 1);
874 group->children[0] = child; 857 group->children[0] = child;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 DCHECK_EQ(isolate->heap()->the_hole_value(), blocks_[block][offset]); 1047 DCHECK_EQ(isolate->heap()->the_hole_value(), blocks_[block][offset]);
1065 blocks_[block][offset] = object; 1048 blocks_[block][offset] = object;
1066 if (isolate->heap()->InNewSpace(object)) { 1049 if (isolate->heap()->InNewSpace(object)) {
1067 new_space_indices_.Add(size_); 1050 new_space_indices_.Add(size_);
1068 } 1051 }
1069 *index = size_++; 1052 *index = size_++;
1070 } 1053 }
1071 1054
1072 1055
1073 } } // namespace v8::internal 1056 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/global-handles.h ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698