| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_STORE_BUFFER_INL_H_ | 5 #ifndef V8_STORE_BUFFER_INL_H_ |
| 6 #define V8_STORE_BUFFER_INL_H_ | 6 #define V8_STORE_BUFFER_INL_H_ |
| 7 | 7 |
| 8 #include "src/heap/heap.h" | 8 #include "src/heap/heap.h" |
| 9 #include "src/heap/spaces-inl.h" | 9 #include "src/heap/spaces-inl.h" |
| 10 #include "src/heap/store-buffer.h" | 10 #include "src/heap/store-buffer.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 Compact(); | 22 Compact(); |
| 23 } else { | 23 } else { |
| 24 DCHECK(top < limit_); | 24 DCHECK(top < limit_); |
| 25 } | 25 } |
| 26 } | 26 } |
| 27 | 27 |
| 28 | 28 |
| 29 void StoreBuffer::EnterDirectlyIntoStoreBuffer(Address addr) { | 29 void StoreBuffer::EnterDirectlyIntoStoreBuffer(Address addr) { |
| 30 if (store_buffer_rebuilding_enabled_) { | 30 if (store_buffer_rebuilding_enabled_) { |
| 31 SLOW_DCHECK(!heap_->code_space()->Contains(addr) && | 31 SLOW_DCHECK(!heap_->code_space()->Contains(addr) && |
| 32 !heap_->new_space()->Contains(addr)); | 32 !heap_->new_space()->ContainsSlow(addr)); |
| 33 Address* top = old_top_; | 33 Address* top = old_top_; |
| 34 *top++ = addr; | 34 *top++ = addr; |
| 35 old_top_ = top; | 35 old_top_ = top; |
| 36 old_buffer_is_sorted_ = false; | 36 old_buffer_is_sorted_ = false; |
| 37 old_buffer_is_filtered_ = false; | 37 old_buffer_is_filtered_ = false; |
| 38 if (top >= old_limit_) { | 38 if (top >= old_limit_) { |
| 39 DCHECK(callback_ != NULL); | 39 DCHECK(callback_ != NULL); |
| 40 (*callback_)(heap_, MemoryChunk::FromAnyPointerAddress(heap_, addr), | 40 (*callback_)(heap_, MemoryChunk::FromAnyPointerAddress(heap_, addr), |
| 41 kStoreBufferFullEvent); | 41 kStoreBufferFullEvent); |
| 42 } | 42 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 55 store_buffer->Mark(current->buffer[i]); | 55 store_buffer->Mark(current->buffer[i]); |
| 56 } | 56 } |
| 57 current = current->next; | 57 current = current->next; |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace internal | 61 } // namespace internal |
| 62 } // namespace v8 | 62 } // namespace v8 |
| 63 | 63 |
| 64 #endif // V8_STORE_BUFFER_INL_H_ | 64 #endif // V8_STORE_BUFFER_INL_H_ |
| OLD | NEW |