| 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 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1758 | 1758 |
| 1759 if (record_slots) { | 1759 if (record_slots) { |
| 1760 // Record the updated slot if necessary. | 1760 // Record the updated slot if necessary. |
| 1761 Object** head_slot = HeapObject::RawField( | 1761 Object** head_slot = HeapObject::RawField( |
| 1762 context, FixedArray::SizeFor(index)); | 1762 context, FixedArray::SizeFor(index)); |
| 1763 heap->mark_compact_collector()->RecordSlot( | 1763 heap->mark_compact_collector()->RecordSlot( |
| 1764 head_slot, head_slot, list_head); | 1764 head_slot, head_slot, list_head); |
| 1765 } | 1765 } |
| 1766 } | 1766 } |
| 1767 | 1767 |
| 1768 static void VisitPhantomObject(Heap*, Context* context) { | 1768 static void VisitPhantomObject(Heap*, Context*) { |
| 1769 // A bit of a hack, see the comment at the end of Genesis::Genesis(). | |
| 1770 delete[] reinterpret_cast<uint32_t*>(context->random_state()); | |
| 1771 } | 1769 } |
| 1772 | 1770 |
| 1773 static int WeakNextOffset() { | 1771 static int WeakNextOffset() { |
| 1774 return FixedArray::SizeFor(Context::NEXT_CONTEXT_LINK); | 1772 return FixedArray::SizeFor(Context::NEXT_CONTEXT_LINK); |
| 1775 } | 1773 } |
| 1776 }; | 1774 }; |
| 1777 | 1775 |
| 1778 | 1776 |
| 1779 void Heap::ProcessWeakReferences(WeakObjectRetainer* retainer) { | 1777 void Heap::ProcessWeakReferences(WeakObjectRetainer* retainer) { |
| 1780 // We don't record weak slots during marking or scavenges. | 1778 // We don't record weak slots during marking or scavenges. |
| (...skipping 6176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7957 static_cast<int>(object_sizes_last_time_[index])); | 7955 static_cast<int>(object_sizes_last_time_[index])); |
| 7958 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7956 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7959 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7957 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7960 | 7958 |
| 7961 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7959 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7962 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7960 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7963 ClearObjectStats(); | 7961 ClearObjectStats(); |
| 7964 } | 7962 } |
| 7965 | 7963 |
| 7966 } } // namespace v8::internal | 7964 } } // namespace v8::internal |
| OLD | NEW |