| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1124 } | 1124 } |
| 1125 } | 1125 } |
| 1126 }; | 1126 }; |
| 1127 | 1127 |
| 1128 | 1128 |
| 1129 static void VerifyNonPointerSpacePointers() { | 1129 static void VerifyNonPointerSpacePointers() { |
| 1130 // Verify that there are no pointers to new space in spaces where we | 1130 // Verify that there are no pointers to new space in spaces where we |
| 1131 // do not expect them. | 1131 // do not expect them. |
| 1132 VerifyNonPointerSpacePointersVisitor v; | 1132 VerifyNonPointerSpacePointersVisitor v; |
| 1133 HeapObjectIterator code_it(HEAP->code_space()); | 1133 HeapObjectIterator code_it(HEAP->code_space()); |
| 1134 for (HeapObject* object = code_it.Next(); | 1134 for (HeapObject* object = code_it.NextIgnoreEvacuationCandidates(); |
| 1135 object != NULL; object = code_it.Next()) | 1135 object != NULL; object = code_it.NextIgnoreEvacuationCandidates()) |
| 1136 object->Iterate(&v); | 1136 object->Iterate(&v); |
| 1137 | 1137 |
| 1138 // The old data space was normally swept conservatively so that the iterator | 1138 // The old data space was normally swept conservatively so that the iterator |
| 1139 // doesn't work, so we normally skip the next bit. | 1139 // doesn't work, so we normally skip the next bit. |
| 1140 if (!HEAP->old_data_space()->was_swept_conservatively()) { | 1140 if (!HEAP->old_data_space()->was_swept_conservatively()) { |
| 1141 HeapObjectIterator data_it(HEAP->old_data_space()); | 1141 HeapObjectIterator data_it(HEAP->old_data_space()); |
| 1142 for (HeapObject* object = data_it.Next(); | 1142 for (HeapObject* object = data_it.NextIgnoreEvacuationCandidates(); |
| 1143 object != NULL; object = data_it.Next()) | 1143 object != NULL; object = data_it.NextIgnoreEvacuationCandidates()) |
| 1144 object->Iterate(&v); | 1144 object->Iterate(&v); |
| 1145 } | 1145 } |
| 1146 } | 1146 } |
| 1147 #endif // VERIFY_HEAP | 1147 #endif // VERIFY_HEAP |
| 1148 | 1148 |
| 1149 | 1149 |
| 1150 void Heap::CheckNewSpaceExpansionCriteria() { | 1150 void Heap::CheckNewSpaceExpansionCriteria() { |
| 1151 if (new_space_.Capacity() < new_space_.MaximumCapacity() && | 1151 if (new_space_.Capacity() < new_space_.MaximumCapacity() && |
| 1152 survived_since_last_expansion_ > new_space_.Capacity() && | 1152 survived_since_last_expansion_ > new_space_.Capacity() && |
| 1153 !new_space_high_promotion_mode_active_) { | 1153 !new_space_high_promotion_mode_active_) { |
| (...skipping 6665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7819 static_cast<int>(object_sizes_last_time_[index])); | 7819 static_cast<int>(object_sizes_last_time_[index])); |
| 7820 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7820 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7821 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7821 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7822 | 7822 |
| 7823 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7823 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7824 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7824 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7825 ClearObjectStats(); | 7825 ClearObjectStats(); |
| 7826 } | 7826 } |
| 7827 | 7827 |
| 7828 } } // namespace v8::internal | 7828 } } // namespace v8::internal |
| OLD | NEW |