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

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

Issue 1245093004: Always run the second pass of the phantom callbacks synchronously if --predictable or --optimize_fo… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | 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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 for (auto i = pending_phantom_callbacks_.begin(); 833 for (auto i = pending_phantom_callbacks_.begin();
834 i != pending_phantom_callbacks_.end(); ++i) { 834 i != pending_phantom_callbacks_.end(); ++i) {
835 auto callback = i; 835 auto callback = i;
836 // Skip callbacks that have already been processed once. 836 // Skip callbacks that have already been processed once.
837 if (callback->node() == nullptr) continue; 837 if (callback->node() == nullptr) continue;
838 callback->Invoke(isolate()); 838 callback->Invoke(isolate());
839 freed_nodes++; 839 freed_nodes++;
840 } 840 }
841 } 841 }
842 if (pending_phantom_callbacks_.length() > 0) { 842 if (pending_phantom_callbacks_.length() > 0) {
843 if (synchronous_second_pass) { 843 if (FLAG_optimize_for_size || FLAG_predictable || synchronous_second_pass) {
844 InvokeSecondPassPhantomCallbacks(&pending_phantom_callbacks_, isolate()); 844 InvokeSecondPassPhantomCallbacks(&pending_phantom_callbacks_, isolate());
845 } else { 845 } else {
846 auto task = new PendingPhantomCallbacksSecondPassTask( 846 auto task = new PendingPhantomCallbacksSecondPassTask(
847 &pending_phantom_callbacks_, isolate()); 847 &pending_phantom_callbacks_, isolate());
848 V8::GetCurrentPlatform()->CallOnForegroundThread( 848 V8::GetCurrentPlatform()->CallOnForegroundThread(
849 reinterpret_cast<v8::Isolate*>(isolate()), task); 849 reinterpret_cast<v8::Isolate*>(isolate()), task);
850 } 850 }
851 } 851 }
852 pending_phantom_callbacks_.Clear(); 852 pending_phantom_callbacks_.Clear();
853 return freed_nodes; 853 return freed_nodes;
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 blocks_[block][offset] = object; 1265 blocks_[block][offset] = object;
1266 if (isolate->heap()->InNewSpace(object)) { 1266 if (isolate->heap()->InNewSpace(object)) {
1267 new_space_indices_.Add(size_); 1267 new_space_indices_.Add(size_);
1268 } 1268 }
1269 *index = size_++; 1269 *index = size_++;
1270 } 1270 }
1271 1271
1272 1272
1273 } // namespace internal 1273 } // namespace internal
1274 } // namespace v8 1274 } // namespace v8
OLDNEW
« 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