OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 2897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2908 // Sort the instance descriptors by the hash codes of their keys. | 2908 // Sort the instance descriptors by the hash codes of their keys. |
2909 void Sort(); | 2909 void Sort(); |
2910 | 2910 |
2911 // Search the instance descriptors for given name. | 2911 // Search the instance descriptors for given name. |
2912 INLINE(int Search(Name* name, int number_of_own_descriptors)); | 2912 INLINE(int Search(Name* name, int number_of_own_descriptors)); |
2913 | 2913 |
2914 // As the above, but uses DescriptorLookupCache and updates it when | 2914 // As the above, but uses DescriptorLookupCache and updates it when |
2915 // necessary. | 2915 // necessary. |
2916 INLINE(int SearchWithCache(Name* name, Map* map)); | 2916 INLINE(int SearchWithCache(Name* name, Map* map)); |
2917 | 2917 |
| 2918 bool IsEqualUpTo(DescriptorArray* desc, int nof_descriptors); |
| 2919 |
2918 // Allocates a DescriptorArray, but returns the singleton | 2920 // Allocates a DescriptorArray, but returns the singleton |
2919 // empty descriptor array object if number_of_descriptors is 0. | 2921 // empty descriptor array object if number_of_descriptors is 0. |
2920 static Handle<DescriptorArray> Allocate(Isolate* isolate, | 2922 static Handle<DescriptorArray> Allocate(Isolate* isolate, |
2921 int number_of_descriptors, | 2923 int number_of_descriptors, |
2922 int slack = 0); | 2924 int slack = 0); |
2923 | 2925 |
2924 DECLARE_CAST(DescriptorArray) | 2926 DECLARE_CAST(DescriptorArray) |
2925 | 2927 |
2926 // Constant for denoting key was not found. | 2928 // Constant for denoting key was not found. |
2927 static const int kNotFound = -1; | 2929 static const int kNotFound = -1; |
(...skipping 7809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10737 } | 10739 } |
10738 return value; | 10740 return value; |
10739 } | 10741 } |
10740 }; | 10742 }; |
10741 | 10743 |
10742 | 10744 |
10743 } // NOLINT, false-positive due to second-order macros. | 10745 } // NOLINT, false-positive due to second-order macros. |
10744 } // NOLINT, false-positive due to second-order macros. | 10746 } // NOLINT, false-positive due to second-order macros. |
10745 | 10747 |
10746 #endif // V8_OBJECTS_H_ | 10748 #endif // V8_OBJECTS_H_ |
OLD | NEW |