| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
| (...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1586 LOG(isolate_, ResourceEvent("scavenge", "begin")); | 1586 LOG(isolate_, ResourceEvent("scavenge", "begin")); |
| 1587 | 1587 |
| 1588 // Clear descriptor cache. | 1588 // Clear descriptor cache. |
| 1589 isolate_->descriptor_lookup_cache()->Clear(); | 1589 isolate_->descriptor_lookup_cache()->Clear(); |
| 1590 | 1590 |
| 1591 // Used for updating survived_since_last_expansion_ at function end. | 1591 // Used for updating survived_since_last_expansion_ at function end. |
| 1592 intptr_t survived_watermark = PromotedSpaceSizeOfObjects(); | 1592 intptr_t survived_watermark = PromotedSpaceSizeOfObjects(); |
| 1593 | 1593 |
| 1594 SelectScavengingVisitorsTable(); | 1594 SelectScavengingVisitorsTable(); |
| 1595 | 1595 |
| 1596 incremental_marking()->PrepareForScavenge(); | |
| 1597 | |
| 1598 // Flip the semispaces. After flipping, to space is empty, from space has | 1596 // Flip the semispaces. After flipping, to space is empty, from space has |
| 1599 // live objects. | 1597 // live objects. |
| 1600 new_space_.Flip(); | 1598 new_space_.Flip(); |
| 1601 new_space_.ResetAllocationInfo(); | 1599 new_space_.ResetAllocationInfo(); |
| 1602 | 1600 |
| 1603 // We need to sweep newly copied objects which can be either in the | 1601 // We need to sweep newly copied objects which can be either in the |
| 1604 // to space or promoted to the old generation. For to-space | 1602 // to space or promoted to the old generation. For to-space |
| 1605 // objects, we treat the bottom of the to space as a queue. Newly | 1603 // objects, we treat the bottom of the to space as a queue. Newly |
| 1606 // copied and unswept objects lie between a 'front' mark and the | 1604 // copied and unswept objects lie between a 'front' mark and the |
| 1607 // allocation pointer. | 1605 // allocation pointer. |
| (...skipping 5006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6614 *object_type = "CODE_TYPE"; \ | 6612 *object_type = "CODE_TYPE"; \ |
| 6615 *object_sub_type = "CODE_AGE/" #name; \ | 6613 *object_sub_type = "CODE_AGE/" #name; \ |
| 6616 return true; | 6614 return true; |
| 6617 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6615 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
| 6618 #undef COMPARE_AND_RETURN_NAME | 6616 #undef COMPARE_AND_RETURN_NAME |
| 6619 } | 6617 } |
| 6620 return false; | 6618 return false; |
| 6621 } | 6619 } |
| 6622 } | 6620 } |
| 6623 } // namespace v8::internal | 6621 } // namespace v8::internal |
| OLD | NEW |