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

Unified Diff: src/heap/objects-visiting.h

Issue 726713003: LayoutDescriptorHelper is now able to calculate the length of contiguous regions of tagged/non-tagg… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased 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 | « src/heap/mark-compact.cc ('k') | src/heap/store-buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/objects-visiting.h
diff --git a/src/heap/objects-visiting.h b/src/heap/objects-visiting.h
index 30054f058afbfb413cac4336881f6f763aa01eda..f8c58dd8169f657bd0a223fbc6b4cab2caf2e1ef 100644
--- a/src/heap/objects-visiting.h
+++ b/src/heap/objects-visiting.h
@@ -226,16 +226,14 @@ class BodyVisitorBase : public AllStatic {
DCHECK(IsAligned(start_offset, kPointerSize) &&
IsAligned(end_offset, kPointerSize));
- InobjectPropertiesHelper helper(object->map());
+ LayoutDescriptorHelper helper(object->map());
DCHECK(!helper.all_fields_tagged());
-
- for (int offset = start_offset; offset < end_offset;
- offset += kPointerSize) {
- // Visit tagged fields only.
- if (helper.IsTagged(offset)) {
- // TODO(ishell): call this once for contiguous region of tagged fields.
- IterateRawPointers(heap, object, offset, offset + kPointerSize);
+ for (int offset = start_offset; offset < end_offset;) {
+ int end_of_region_offset;
+ if (helper.IsTagged(offset, end_offset, &end_of_region_offset)) {
+ IterateRawPointers(heap, object, offset, end_of_region_offset);
}
+ offset = end_of_region_offset;
}
}
};
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/store-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698