Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Unified Diff: src/heap/store-buffer.cc

Issue 726713003: LayoutDescriptorHelper is now able to calculate the length of contiguous regions of tagged/non-tagg… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/objects-visiting.h ('k') | src/layout-descriptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/store-buffer.cc
diff --git a/src/heap/store-buffer.cc b/src/heap/store-buffer.cc
index eae3594a18a38b7e1b79803d3d72a9fedd55b278..aac68116ce840f3ca72715c41aaa3809ac028173 100644
--- a/src/heap/store-buffer.cc
+++ b/src/heap/store-buffer.cc
@@ -512,24 +512,28 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback,
bool may_contain_raw_values = heap_object->MayContainRawValues();
if (!may_contain_raw_values) {
Address obj_address = heap_object->address();
- Address start_address = obj_address + HeapObject::kHeaderSize;
- Address end_address = obj_address + heap_object->Size();
+ const int start_offset = HeapObject::kHeaderSize;
+ const int end_offset = heap_object->Size();
#if V8_DOUBLE_FIELDS_UNBOXING
- InobjectPropertiesHelper helper(heap_object->map());
+ LayoutDescriptorHelper helper(heap_object->map());
bool has_only_tagged_fields = helper.all_fields_tagged();
if (!has_only_tagged_fields) {
- for (Address slot = start_address; slot < end_address;
- slot += kPointerSize) {
- if (helper.IsTagged(static_cast<int>(slot - obj_address))) {
- // TODO(ishell): call this once for contiguous region
- // of tagged fields.
- FindPointersToNewSpaceInRegion(slot, slot + kPointerSize,
- slot_callback, clear_maps);
+ for (int offset = start_offset; offset < end_offset;) {
+ int end_of_region_offset;
+ if (helper.IsTagged(offset, end_offset,
+ &end_of_region_offset)) {
+ FindPointersToNewSpaceInRegion(
+ obj_address + offset,
+ obj_address + end_of_region_offset, slot_callback,
+ clear_maps);
}
+ offset = end_of_region_offset;
}
} else {
#endif
+ Address start_address = obj_address + start_offset;
+ Address end_address = obj_address + end_offset;
// Object has only tagged fields.
FindPointersToNewSpaceInRegion(start_address, end_address,
slot_callback, clear_maps);
« no previous file with comments | « src/heap/objects-visiting.h ('k') | src/layout-descriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698