Chromium Code Reviews| Index: src/mark-compact.cc |
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
| index 2ff1ce98500e5aa6e9c03faad4bd07b3c3736a8b..c9f68e4771b9797eb0da5fb9ec30583b72552469 100644 |
| --- a/src/mark-compact.cc |
| +++ b/src/mark-compact.cc |
| @@ -2830,6 +2830,12 @@ void MarkCompactCollector::MigrateObject(HeapObject* dst, |
| Address dst_slot = dst_addr; |
| ASSERT(IsAligned(size, kPointerSize)); |
| + bool has_only_tagged_fields = !src->IsConstantPoolArray(); |
| +#if V8_DOUBLE_FIELDS_UNBOXING |
| + InobjectPropertiesHelper helper(src->map()); |
| + has_only_tagged_fields = |
| + has_only_tagged_fields && helper.all_fields_tagged(); |
| +#endif |
| for (int remaining = size / kPointerSize; remaining > 0; remaining--) { |
| Object* value = Memory::Object_at(src_slot); |
| @@ -2838,7 +2844,11 @@ void MarkCompactCollector::MigrateObject(HeapObject* dst, |
| // We special case ConstantPoolArrays below since they could contain |
| // integers value entries which look like tagged pointers. |
| // TODO(mstarzinger): restructure this code to avoid this special-casing. |
| - if (!src->IsConstantPoolArray()) { |
| + if (has_only_tagged_fields |
| +#if V8_DOUBLE_FIELDS_UNBOXING |
| + || helper.IsTagged(src_slot - src_addr) |
|
Toon Verwaest
2014/07/29 15:02:08
#if V8_DOUBLE_FIELDS_UNBOXING
if (.. || ) {
#else
Igor Sheludko
2014/10/30 14:23:43
Done.
|
| +#endif |
| + ) { |
| RecordMigratedSlot(value, dst_slot); |
| } |