| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |