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

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

Issue 2869413002: [heap] MinorMC: Only iterate new space global handles for ptr updates (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « src/global-handles.h ('k') | src/globals.h » ('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/global-handles.h" 5 #include "src/global-handles.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/cancelable-task.h" 8 #include "src/cancelable-task.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 938
939 DISABLE_CFI_PERF 939 DISABLE_CFI_PERF
940 void GlobalHandles::IterateAllRoots(RootVisitor* v) { 940 void GlobalHandles::IterateAllRoots(RootVisitor* v) {
941 for (NodeIterator it(this); !it.done(); it.Advance()) { 941 for (NodeIterator it(this); !it.done(); it.Advance()) {
942 if (it.node()->IsRetainer()) { 942 if (it.node()->IsRetainer()) {
943 v->VisitRootPointer(Root::kGlobalHandles, it.node()->location()); 943 v->VisitRootPointer(Root::kGlobalHandles, it.node()->location());
944 } 944 }
945 } 945 }
946 } 946 }
947 947
948 DISABLE_CFI_PERF
949 void GlobalHandles::IterateAllNewSpaceRoots(RootVisitor* v) {
950 for (int i = 0; i < new_space_nodes_.length(); ++i) {
951 Node* node = new_space_nodes_[i];
952 if (node->IsRetainer()) {
953 v->VisitRootPointer(Root::kGlobalHandles, node->location());
954 }
955 }
956 }
948 957
949 DISABLE_CFI_PERF 958 DISABLE_CFI_PERF
950 void GlobalHandles::ApplyPersistentHandleVisitor( 959 void GlobalHandles::ApplyPersistentHandleVisitor(
951 v8::PersistentHandleVisitor* visitor, GlobalHandles::Node* node) { 960 v8::PersistentHandleVisitor* visitor, GlobalHandles::Node* node) {
952 v8::Value* value = ToApi<v8::Value>(Handle<Object>(node->location())); 961 v8::Value* value = ToApi<v8::Value>(Handle<Object>(node->location()));
953 visitor->VisitPersistentHandle( 962 visitor->VisitPersistentHandle(
954 reinterpret_cast<v8::Persistent<v8::Value>*>(&value), 963 reinterpret_cast<v8::Persistent<v8::Value>*>(&value),
955 node->wrapper_class_id()); 964 node->wrapper_class_id());
956 } 965 }
957 966
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 blocks_[block][offset] = object; 1144 blocks_[block][offset] = object;
1136 if (isolate->heap()->InNewSpace(object)) { 1145 if (isolate->heap()->InNewSpace(object)) {
1137 new_space_indices_.Add(size_); 1146 new_space_indices_.Add(size_);
1138 } 1147 }
1139 *index = size_++; 1148 *index = size_++;
1140 } 1149 }
1141 1150
1142 1151
1143 } // namespace internal 1152 } // namespace internal
1144 } // namespace v8 1153 } // namespace v8
OLDNEW
« no previous file with comments | « src/global-handles.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698