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

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
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/objects.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 04f24bab354bfb89c039ad18b2e89d69471e6ff0..3c880de5319fc754391a2fb8a80902cdd98f0645 100644
--- a/src/heap/store-buffer.cc
+++ b/src/heap/store-buffer.cc
@@ -483,36 +483,42 @@ 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();
-
- if (!has_only_tagged_fields) {
- 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);
- }
- offset = end_of_region_offset;
- }
- } else {
-#endif
+ Address obj_address = heap_object->address();
+ const int start_offset = HeapObject::kHeaderSize;
+ const int end_offset = heap_object->Size();
+
+ 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);
-#if V8_DOUBLE_FIELDS_UNBOXING
+ break;
}
-#endif
+
+ case HeapObjectContents::kMixedValues: {
+ if (FLAG_unbox_double_fields) {
+ 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,
+ &end_of_region_offset)) {
+ FindPointersToNewSpaceInRegion(
+ obj_address + offset,
+ obj_address + end_of_region_offset, slot_callback);
+ }
+ offset = end_of_region_offset;
+ }
+ } else {
+ UNREACHABLE();
+ }
+ break;
+ }
+
+ case HeapObjectContents::kRawValues:
+ break;
}
}
}
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698