Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 92c2bc509ae7ff1b61d414841a9690c4361bf3cb..3694955eaf786bc04c07cdf400a4cb06be15ba3d 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -2635,6 +2635,10 @@ class DescriptorArray: public FixedArray { |
// fit in a page). |
static const int kMaxNumberOfDescriptors = 1024 + 512; |
+ static int SizeFor(int number_of_descriptors) { |
+ return ToKeyIndex(number_of_descriptors); |
+ } |
+ |
private: |
// An entry in a DescriptorArray, represented as an (array, index) pair. |
class Entry { |
@@ -4961,6 +4965,11 @@ class Map: public HeapObject { |
Handle<Code> code); |
MUST_USE_RESULT MaybeObject* UpdateCodeCache(String* name, Code* code); |
+ // Extend the descriptor array of the map with the list of descriptors. |
+ // In case of duplicates, the latest descriptor is used. |
+ static void CopyAppendCallbackDescriptors(Handle<Map> map, |
+ Handle<Object> descriptors); |
+ |
// Returns the found code or undefined if absent. |
Object* FindInCodeCache(String* name, Code::Flags flags); |