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

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

Issue 1135353003: Factor out handling of mixed objects preprocessing after migration (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 6 months 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
Index: src/heap/store-buffer.cc
diff --git a/src/heap/store-buffer.cc b/src/heap/store-buffer.cc
index 04f24bab354bfb89c039ad18b2e89d69471e6ff0..3d588ab9c5e07b4ec0d800df593616b1da8e41b6 100644
--- a/src/heap/store-buffer.cc
+++ b/src/heap/store-buffer.cc
@@ -483,16 +483,24 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback) {
for (HeapObject* heap_object = iterator.Next(); heap_object != NULL;
heap_object = iterator.Next()) {
// We iterate over objects that contain new space pointers only.
- bool may_contain_raw_values = heap_object->MayContainRawValues();
- if (!may_contain_raw_values) {
- Address obj_address = heap_object->address();
- const int start_offset = HeapObject::kHeaderSize;
- const int end_offset = heap_object->Size();
-#if V8_DOUBLE_FIELDS_UNBOXING
- LayoutDescriptorHelper helper(heap_object->map());
- bool has_only_tagged_fields = helper.all_fields_tagged();
+ Address obj_address = heap_object->address();
+ const int start_offset = HeapObject::kHeaderSize;
+ const int end_offset = heap_object->Size();
- if (!has_only_tagged_fields) {
+ switch (heap_object->ContentType()) {
+ case HeapObjectContents::kTaggedValues: {
+ 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);
+ break;
+ }
+
+ case HeapObjectContents::kMixedValues: {
+#if V8_DOUBLE_FIELDS_UNBOXING
Igor Sheludko 2015/06/08 10:45:12 Same here.
+ LayoutDescriptorHelper helper(heap_object->map());
+ DCHECK(!helper.all_fields_tagged());
for (int offset = start_offset; offset < end_offset;) {
int end_of_region_offset;
if (helper.IsTagged(offset, end_offset,
@@ -503,16 +511,14 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback) {
}
offset = end_of_region_offset;
}
- } else {
+#else
+ UNREACHABLE();
#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);
-#if V8_DOUBLE_FIELDS_UNBOXING
+ break;
}
-#endif
+
+ case HeapObjectContents::kRawValues:
+ break;
}
}
}

Powered by Google App Engine
This is Rietveld 408576698