Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index b929d8567f5c7463a35873db6674d0080c4d5009..57c93366b845a812a6f2193a1ea4c22a6d911b6e 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -2753,12 +2753,23 @@ void MarkCompactCollector::MigrateObject(HeapObject* dst, HeapObject* src, |
Address dst_slot = dst_addr; |
DCHECK(IsAligned(size, kPointerSize)); |
+ bool may_contain_raw_values = src->MayContainRawValues(); |
+#if V8_DOUBLE_FIELDS_UNBOXING |
+ InobjectPropertiesHelper helper(src->map()); |
+ bool has_only_tagged_fields = helper.all_fields_tagged(); |
+#endif |
for (int remaining = size / kPointerSize; remaining > 0; remaining--) { |
Object* value = Memory::Object_at(src_slot); |
Memory::Object_at(dst_slot) = value; |
- if (!src->MayContainRawValues()) { |
+#if V8_DOUBLE_FIELDS_UNBOXING |
+ if (!may_contain_raw_values && |
+ (has_only_tagged_fields || helper.IsTagged(src_slot - src_addr))) |
+#else |
+ if (!may_contain_raw_values) |
+#endif |
+ { |
RecordMigratedSlot(value, dst_slot); |
} |