| 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 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1260 // Copy objects reachable from the old generation. | 1260 // Copy objects reachable from the old generation. |
| 1261 { | 1261 { |
| 1262 StoreBufferRebuildScope scope(this, | 1262 StoreBufferRebuildScope scope(this, |
| 1263 store_buffer(), | 1263 store_buffer(), |
| 1264 &ScavengeStoreBufferCallback); | 1264 &ScavengeStoreBufferCallback); |
| 1265 store_buffer()->IteratePointersToNewSpace(&ScavengeObject); | 1265 store_buffer()->IteratePointersToNewSpace(&ScavengeObject); |
| 1266 } | 1266 } |
| 1267 | 1267 |
| 1268 // Copy objects reachable from cells by scavenging cell values directly. | 1268 // Copy objects reachable from cells by scavenging cell values directly. |
| 1269 HeapObjectIterator cell_iterator(cell_space_); | 1269 HeapObjectIterator cell_iterator(cell_space_); |
| 1270 for (HeapObject* cell = cell_iterator.Next(); | 1270 for (HeapObject* heap_object = cell_iterator.Next(); |
| 1271 cell != NULL; cell = cell_iterator.Next()) { | 1271 heap_object != NULL; |
| 1272 if (cell->IsJSGlobalPropertyCell()) { | 1272 heap_object = cell_iterator.Next()) { |
| 1273 Address value_address = | 1273 if (heap_object->IsJSGlobalPropertyCell()) { |
| 1274 reinterpret_cast<Address>(cell) + | 1274 JSGlobalPropertyCell* cell = JSGlobalPropertyCell::cast(heap_object); |
| 1275 (JSGlobalPropertyCell::kValueOffset - kHeapObjectTag); | 1275 Address value_address = cell->ValueAddress(); |
| 1276 scavenge_visitor.VisitPointer(reinterpret_cast<Object**>(value_address)); | 1276 scavenge_visitor.VisitPointer(reinterpret_cast<Object**>(value_address)); |
| 1277 } | 1277 } |
| 1278 } | 1278 } |
| 1279 | 1279 |
| 1280 // Scavenge object reachable from the global contexts list directly. | 1280 // Scavenge object reachable from the global contexts list directly. |
| 1281 scavenge_visitor.VisitPointer(BitCast<Object**>(&global_contexts_list_)); | 1281 scavenge_visitor.VisitPointer(BitCast<Object**>(&global_contexts_list_)); |
| 1282 | 1282 |
| 1283 new_space_front = DoScavenge(&scavenge_visitor, new_space_front); | 1283 new_space_front = DoScavenge(&scavenge_visitor, new_space_front); |
| 1284 isolate_->global_handles()->IdentifyNewSpaceWeakIndependentHandles( | 1284 isolate_->global_handles()->IdentifyNewSpaceWeakIndependentHandles( |
| 1285 &IsUnscavengedHeapObject); | 1285 &IsUnscavengedHeapObject); |
| (...skipping 5952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7238 static_cast<int>(object_sizes_last_time_[index])); | 7238 static_cast<int>(object_sizes_last_time_[index])); |
| 7239 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7239 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7240 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7240 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7241 | 7241 |
| 7242 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7242 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7243 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7243 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7244 ClearObjectStats(); | 7244 ClearObjectStats(); |
| 7245 } | 7245 } |
| 7246 | 7246 |
| 7247 } } // namespace v8::internal | 7247 } } // namespace v8::internal |
| OLD | NEW |