| 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 #include "src/heap/store-buffer.h" | 5 #include "src/heap/store-buffer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "src/counters.h" | 9 #include "src/counters.h" |
| 10 #include "src/heap/store-buffer-inl.h" | 10 #include "src/heap/store-buffer-inl.h" |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 if (heap_object->IsFixedTypedArrayBase()) { | 492 if (heap_object->IsFixedTypedArrayBase()) { |
| 493 FindPointersToNewSpaceInRegion( | 493 FindPointersToNewSpaceInRegion( |
| 494 obj_address + FixedTypedArrayBase::kBasePointerOffset, | 494 obj_address + FixedTypedArrayBase::kBasePointerOffset, |
| 495 obj_address + FixedTypedArrayBase::kHeaderSize, | 495 obj_address + FixedTypedArrayBase::kHeaderSize, |
| 496 slot_callback); | 496 slot_callback); |
| 497 } else if (heap_object->IsBytecodeArray()) { | 497 } else if (heap_object->IsBytecodeArray()) { |
| 498 FindPointersToNewSpaceInRegion( | 498 FindPointersToNewSpaceInRegion( |
| 499 obj_address + BytecodeArray::kConstantPoolOffset, | 499 obj_address + BytecodeArray::kConstantPoolOffset, |
| 500 obj_address + BytecodeArray::kHeaderSize, | 500 obj_address + BytecodeArray::kHeaderSize, |
| 501 slot_callback); | 501 slot_callback); |
| 502 } else if (heap_object->IsJSArrayBuffer()) { |
| 503 FindPointersToNewSpaceInRegion( |
| 504 obj_address + |
| 505 JSArrayBuffer::BodyDescriptor::kStartOffset, |
| 506 obj_address + JSArrayBuffer::kByteLengthOffset + |
| 507 kPointerSize, |
| 508 slot_callback); |
| 509 FindPointersToNewSpaceInRegion( |
| 510 obj_address + JSArrayBuffer::kSize, |
| 511 obj_address + JSArrayBuffer::kSizeWithInternalFields, |
| 512 slot_callback); |
| 502 } else if (FLAG_unbox_double_fields) { | 513 } else if (FLAG_unbox_double_fields) { |
| 503 LayoutDescriptorHelper helper(heap_object->map()); | 514 LayoutDescriptorHelper helper(heap_object->map()); |
| 504 DCHECK(!helper.all_fields_tagged()); | 515 DCHECK(!helper.all_fields_tagged()); |
| 505 for (int offset = start_offset; offset < end_offset;) { | 516 for (int offset = start_offset; offset < end_offset;) { |
| 506 int end_of_region_offset; | 517 int end_of_region_offset; |
| 507 if (helper.IsTagged(offset, end_offset, | 518 if (helper.IsTagged(offset, end_offset, |
| 508 &end_of_region_offset)) { | 519 &end_of_region_offset)) { |
| 509 FindPointersToNewSpaceInRegion( | 520 FindPointersToNewSpaceInRegion( |
| 510 obj_address + offset, | 521 obj_address + offset, |
| 511 obj_address + end_of_region_offset, slot_callback); | 522 obj_address + end_of_region_offset, slot_callback); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 DCHECK(start_of_current_page_ != store_buffer_->Top()); | 640 DCHECK(start_of_current_page_ != store_buffer_->Top()); |
| 630 store_buffer_->SetTop(start_of_current_page_); | 641 store_buffer_->SetTop(start_of_current_page_); |
| 631 } | 642 } |
| 632 } else { | 643 } else { |
| 633 UNREACHABLE(); | 644 UNREACHABLE(); |
| 634 } | 645 } |
| 635 } | 646 } |
| 636 | 647 |
| 637 } // namespace internal | 648 } // namespace internal |
| 638 } // namespace v8 | 649 } // namespace v8 |
| OLD | NEW |