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

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

Issue 2493803002: [heap] Add basic infrastructure for Minor Mark-Compact collector (Closed)
Patch Set: Addressed comment Created 4 years, 1 month 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/flag-definitions.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/v8.h" 8 #include "src/v8.h"
9 #include "src/vm-state-inl.h" 9 #include "src/vm-state-inl.h"
10 10
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 bool synchronous_second_pass = 1055 bool synchronous_second_pass =
1056 (gc_callback_flags & 1056 (gc_callback_flags &
1057 (kGCCallbackFlagForced | kGCCallbackFlagCollectAllAvailableGarbage | 1057 (kGCCallbackFlagForced | kGCCallbackFlagCollectAllAvailableGarbage |
1058 kGCCallbackFlagSynchronousPhantomCallbackProcessing)) != 0; 1058 kGCCallbackFlagSynchronousPhantomCallbackProcessing)) != 0;
1059 freed_nodes += DispatchPendingPhantomCallbacks(synchronous_second_pass); 1059 freed_nodes += DispatchPendingPhantomCallbacks(synchronous_second_pass);
1060 if (initial_post_gc_processing_count != post_gc_processing_count_) { 1060 if (initial_post_gc_processing_count != post_gc_processing_count_) {
1061 // If the callbacks caused a nested GC, then return. See comment in 1061 // If the callbacks caused a nested GC, then return. See comment in
1062 // PostScavengeProcessing. 1062 // PostScavengeProcessing.
1063 return freed_nodes; 1063 return freed_nodes;
1064 } 1064 }
1065 if (collector == SCAVENGER) { 1065 if (Heap::IsYoungGenerationCollector(collector)) {
1066 freed_nodes += PostScavengeProcessing(initial_post_gc_processing_count); 1066 freed_nodes += PostScavengeProcessing(initial_post_gc_processing_count);
1067 } else { 1067 } else {
1068 freed_nodes += PostMarkSweepProcessing(initial_post_gc_processing_count); 1068 freed_nodes += PostMarkSweepProcessing(initial_post_gc_processing_count);
1069 } 1069 }
1070 if (initial_post_gc_processing_count != post_gc_processing_count_) { 1070 if (initial_post_gc_processing_count != post_gc_processing_count_) {
1071 // If the callbacks caused a nested GC, then return. See comment in 1071 // If the callbacks caused a nested GC, then return. See comment in
1072 // PostScavengeProcessing. 1072 // PostScavengeProcessing.
1073 return freed_nodes; 1073 return freed_nodes;
1074 } 1074 }
1075 if (initial_post_gc_processing_count == post_gc_processing_count_) { 1075 if (initial_post_gc_processing_count == post_gc_processing_count_) {
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 blocks_[block][offset] = object; 1451 blocks_[block][offset] = object;
1452 if (isolate->heap()->InNewSpace(object)) { 1452 if (isolate->heap()->InNewSpace(object)) {
1453 new_space_indices_.Add(size_); 1453 new_space_indices_.Add(size_);
1454 } 1454 }
1455 *index = size_++; 1455 *index = size_++;
1456 } 1456 }
1457 1457
1458 1458
1459 } // namespace internal 1459 } // namespace internal
1460 } // namespace v8 1460 } // namespace v8
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698