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

Unified Diff: src/objects-body-descriptors.h

Issue 2774553003: Fast body iteration for objects without unboxed fields. (Closed)
Patch Set: simplify Created 3 years, 9 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
« no previous file with comments | « src/objects.h ('k') | src/objects-body-descriptors-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-body-descriptors.h
diff --git a/src/objects-body-descriptors.h b/src/objects-body-descriptors.h
index 3efaae9c9785b63c926b0acc548b893057bb83ca..9f080eb7551bd6e2cbe2c6ea42dca3cd7c91a7da 100644
--- a/src/objects-body-descriptors.h
+++ b/src/objects-body-descriptors.h
@@ -82,7 +82,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase {
template <typename ObjectVisitor>
static inline void IterateBody(HeapObject* obj, ObjectVisitor* v) {
- IterateBodyImpl(obj, start_offset, end_offset, v);
+ IteratePointers(obj, start_offset, end_offset, v);
}
template <typename ObjectVisitor>
@@ -94,7 +94,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase {
template <typename StaticVisitor>
static inline void IterateBody(HeapObject* obj) {
Heap* heap = obj->GetHeap();
- IterateBodyImpl<StaticVisitor>(heap, obj, start_offset, end_offset);
+ IteratePointers<StaticVisitor>(heap, obj, start_offset, end_offset);
}
template <typename StaticVisitor>
@@ -113,20 +113,19 @@ class FlexibleBodyDescriptor final : public BodyDescriptorBase {
static const int kStartOffset = start_offset;
static bool IsValidSlot(HeapObject* obj, int offset) {
- if (offset < kStartOffset) return false;
- return IsValidSlotImpl(obj, offset);
+ return (offset >= kStartOffset);
}
template <typename ObjectVisitor>
static inline void IterateBody(HeapObject* obj, int object_size,
ObjectVisitor* v) {
- IterateBodyImpl(obj, start_offset, object_size, v);
+ IteratePointers(obj, start_offset, object_size, v);
}
template <typename StaticVisitor>
static inline void IterateBody(HeapObject* obj, int object_size) {
Heap* heap = obj->GetHeap();
- IterateBodyImpl<StaticVisitor>(heap, obj, start_offset, object_size);
+ IteratePointers<StaticVisitor>(heap, obj, start_offset, object_size);
}
static inline int SizeOf(Map* map, HeapObject* object);
« no previous file with comments | « src/objects.h ('k') | src/objects-body-descriptors-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698