Index: src/objects-body-descriptors-inl.h |
diff --git a/src/objects-body-descriptors-inl.h b/src/objects-body-descriptors-inl.h |
index d34c0f04e40a9e68bce0b75011441de7a7761209..ff679c984629063c6e1554ec680ad6d5848601f6 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 { |
ulan
2017/03/27 11:23:24
This is the same as FlexibleBodyDescriptor except
|
+ 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 { |