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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "code-stubs.h" | 7 #include "code-stubs.h" |
8 #include "compilation-cache.h" | 8 #include "compilation-cache.h" |
9 #include "cpu-profiler.h" | 9 #include "cpu-profiler.h" |
10 #include "deoptimizer.h" | 10 #include "deoptimizer.h" |
(...skipping 2739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2750 int MarkCompactCollector::ClearNonLiveDependentCodeInGroup( | 2750 int MarkCompactCollector::ClearNonLiveDependentCodeInGroup( |
2751 DependentCode* entries, int group, int start, int end, int new_start) { | 2751 DependentCode* entries, int group, int start, int end, int new_start) { |
2752 int survived = 0; | 2752 int survived = 0; |
2753 if (group == DependentCode::kWeakICGroup) { | 2753 if (group == DependentCode::kWeakICGroup) { |
2754 // Dependent weak IC stubs form a linked list and only the head is stored | 2754 // Dependent weak IC stubs form a linked list and only the head is stored |
2755 // in the dependent code array. | 2755 // in the dependent code array. |
2756 if (start != end) { | 2756 if (start != end) { |
2757 ASSERT(start + 1 == end); | 2757 ASSERT(start + 1 == end); |
2758 Object* old_head = entries->object_at(start); | 2758 Object* old_head = entries->object_at(start); |
2759 MarkCompactWeakObjectRetainer retainer; | 2759 MarkCompactWeakObjectRetainer retainer; |
2760 Object* head = VisitWeakList<Code>(heap(), old_head, &retainer, true); | 2760 Object* head = VisitWeakList<Code>(heap(), old_head, &retainer); |
2761 entries->set_object_at(new_start, head); | 2761 entries->set_object_at(new_start, head); |
2762 Object** slot = entries->slot_at(new_start); | 2762 Object** slot = entries->slot_at(new_start); |
2763 RecordSlot(slot, slot, head); | 2763 RecordSlot(slot, slot, head); |
2764 // We do not compact this group even if the head is undefined, | 2764 // We do not compact this group even if the head is undefined, |
2765 // more dependent ICs are likely to be added later. | 2765 // more dependent ICs are likely to be added later. |
2766 survived = 1; | 2766 survived = 1; |
2767 } | 2767 } |
2768 } else { | 2768 } else { |
2769 for (int i = start; i < end; i++) { | 2769 for (int i = start; i < end; i++) { |
2770 Object* obj = entries->object_at(i); | 2770 Object* obj = entries->object_at(i); |
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4531 while (buffer != NULL) { | 4531 while (buffer != NULL) { |
4532 SlotsBuffer* next_buffer = buffer->next(); | 4532 SlotsBuffer* next_buffer = buffer->next(); |
4533 DeallocateBuffer(buffer); | 4533 DeallocateBuffer(buffer); |
4534 buffer = next_buffer; | 4534 buffer = next_buffer; |
4535 } | 4535 } |
4536 *buffer_address = NULL; | 4536 *buffer_address = NULL; |
4537 } | 4537 } |
4538 | 4538 |
4539 | 4539 |
4540 } } // namespace v8::internal | 4540 } } // namespace v8::internal |
OLD | NEW |