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

Unified Diff: src/mark-compact.cc

Issue 391693002: In-object double fields unboxing (for 64-bit only). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/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);
}

Powered by Google App Engine
This is Rietveld 408576698