Index: src/objects-body-descriptors-inl.h |
diff --git a/src/objects-body-descriptors-inl.h b/src/objects-body-descriptors-inl.h |
index 920cb0772b3c124602c0f21870ba6ecdd5c4cd0a..3f54f6f690cdb85f929d586563ec24ffd9130ee9 100644 |
--- a/src/objects-body-descriptors-inl.h |
+++ b/src/objects-body-descriptors-inl.h |
@@ -131,6 +131,31 @@ class JSObject::BodyDescriptor final : public BodyDescriptorBase { |
} |
}; |
+class JSObject::FastBodyDescriptor final : public BodyDescriptorBase { |
+ public: |
+ static const int kStartOffset = JSReceiver::kPropertiesOffset; |
+ |
+ static bool IsValidSlot(HeapObject* obj, int offset) { |
+ return offset >= kStartOffset; |
+ } |
+ |
+ template <typename ObjectVisitor> |
+ static inline void IterateBody(HeapObject* obj, int object_size, |
+ ObjectVisitor* v) { |
+ IteratePointers(obj, kStartOffset, object_size, v); |
+ } |
+ |
+ template <typename StaticVisitor> |
+ static inline void IterateBody(HeapObject* obj, int object_size) { |
+ Heap* heap = obj->GetHeap(); |
+ IteratePointers<StaticVisitor>(heap, obj, kStartOffset, object_size); |
+ } |
+ |
+ static inline int SizeOf(Map* map, HeapObject* object) { |
+ return map->instance_size(); |
+ } |
+}; |
+ |
// Iterates the function object according to the visiting policy. |
template <JSFunction::BodyVisitingPolicy body_visiting_policy> |
class JSFunction::BodyDescriptorImpl final : public BodyDescriptorBase { |