| 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 #ifndef V8_HEAP_MARK_COMPACT_INL_H_ | 5 #ifndef V8_HEAP_MARK_COMPACT_INL_H_ |
| 6 #define V8_HEAP_MARK_COMPACT_INL_H_ | 6 #define V8_HEAP_MARK_COMPACT_INL_H_ |
| 7 | 7 |
| 8 #include "src/heap/mark-compact.h" | 8 #include "src/heap/mark-compact.h" |
| 9 #include "src/heap/slots-buffer.h" | 9 #include "src/heap/slots-buffer.h" |
| 10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 if (target_page->IsEvacuationCandidate() && | 87 if (target_page->IsEvacuationCandidate() && |
| 88 !ShouldSkipEvacuationSlotRecording(object)) { | 88 !ShouldSkipEvacuationSlotRecording(object)) { |
| 89 CHECK(SlotsBuffer::AddTo(slots_buffer_allocator_, | 89 CHECK(SlotsBuffer::AddTo(slots_buffer_allocator_, |
| 90 target_page->slots_buffer_address(), slot, | 90 target_page->slots_buffer_address(), slot, |
| 91 SlotsBuffer::IGNORE_OVERFLOW)); | 91 SlotsBuffer::IGNORE_OVERFLOW)); |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 | 94 |
| 95 | 95 |
| 96 void CodeFlusher::AddCandidate(SharedFunctionInfo* shared_info) { | 96 void CodeFlusher::AddCandidate(SharedFunctionInfo* shared_info) { |
| 97 if (GetNextCandidate(shared_info) == NULL) { | 97 if (GetNextCandidate(shared_info) == nullptr) { |
| 98 SetNextCandidate(shared_info, shared_function_info_candidates_head_); | 98 SetNextCandidate(shared_info, shared_function_info_candidates_head_); |
| 99 shared_function_info_candidates_head_ = shared_info; | 99 shared_function_info_candidates_head_ = shared_info; |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 | 102 |
| 103 | 103 |
| 104 void CodeFlusher::AddCandidate(JSFunction* function) { | 104 void CodeFlusher::AddCandidate(JSFunction* function) { |
| 105 DCHECK(function->code() == function->shared()->code()); | 105 DCHECK(function->code() == function->shared()->code()); |
| 106 if (GetNextCandidate(function)->IsUndefined()) { | 106 if (function->next_function_link()->IsUndefined()) { |
| 107 SetNextCandidate(function, jsfunction_candidates_head_); | 107 SetNextCandidate(function, jsfunction_candidates_head_); |
| 108 jsfunction_candidates_head_ = function; | 108 jsfunction_candidates_head_ = function; |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 | 111 |
| 112 | 112 |
| 113 JSFunction** CodeFlusher::GetNextCandidateSlot(JSFunction* candidate) { | 113 JSFunction** CodeFlusher::GetNextCandidateSlot(JSFunction* candidate) { |
| 114 return reinterpret_cast<JSFunction**>( | 114 return reinterpret_cast<JSFunction**>( |
| 115 HeapObject::RawField(candidate, JSFunction::kNextFunctionLinkOffset)); | 115 HeapObject::RawField(candidate, JSFunction::kNextFunctionLinkOffset)); |
| 116 } | 116 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 } | 197 } |
| 198 if (object != nullptr) return object; | 198 if (object != nullptr) return object; |
| 199 } | 199 } |
| 200 return nullptr; | 200 return nullptr; |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace internal | 203 } // namespace internal |
| 204 } // namespace v8 | 204 } // namespace v8 |
| 205 | 205 |
| 206 #endif // V8_HEAP_MARK_COMPACT_INL_H_ | 206 #endif // V8_HEAP_MARK_COMPACT_INL_H_ |
| OLD | NEW |