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

Unified Diff: src/heap/heap.cc

Issue 768113002: Do not call Heap::IterateAndMarkPointersToFromSpace() for unboxed double fields. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « no previous file | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 8415de1901d3944ea2713dc9cc59e15787941e19..b1738ee7256beb292c6f702fe69977ae1bde25f1 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1800,8 +1800,29 @@ Address Heap::DoScavenge(ObjectVisitor* scavenge_visitor,
// for pointers to from semispace instead of looking for pointers
// to new space.
DCHECK(!target->IsMap());
- IterateAndMarkPointersToFromSpace(
- target->address(), target->address() + size, &ScavengeObject);
+ Address start_address = target->address();
+ Address end_address = start_address + size;
+#if V8_DOUBLE_FIELDS_UNBOXING
+ InobjectPropertiesHelper helper(target->map());
+ bool has_only_tagged_fields = helper.all_fields_tagged();
+
+ if (!has_only_tagged_fields) {
+ for (Address slot = start_address; slot < end_address;
+ slot += kPointerSize) {
+ if (helper.IsTagged(static_cast<int>(slot - start_address))) {
+ // TODO(ishell): call this once for contiguous region
+ // of tagged fields.
+ IterateAndMarkPointersToFromSpace(slot, slot + kPointerSize,
+ &ScavengeObject);
+ }
+ }
+ } else {
+#endif
+ IterateAndMarkPointersToFromSpace(start_address, end_address,
+ &ScavengeObject);
+#if V8_DOUBLE_FIELDS_UNBOXING
+ }
+#endif
}
}
« no previous file with comments | « no previous file | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698