| 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/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 10155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10166 PropertyDescriptor* desc, ShouldThrow should_throw); | 10166 PropertyDescriptor* desc, ShouldThrow should_throw); |
| 10167 | 10167 |
| 10168 static bool AnythingToArrayLength(Isolate* isolate, | 10168 static bool AnythingToArrayLength(Isolate* isolate, |
| 10169 Handle<Object> length_object, | 10169 Handle<Object> length_object, |
| 10170 uint32_t* output); | 10170 uint32_t* output); |
| 10171 MUST_USE_RESULT static Maybe<bool> ArraySetLength(Isolate* isolate, | 10171 MUST_USE_RESULT static Maybe<bool> ArraySetLength(Isolate* isolate, |
| 10172 Handle<JSArray> a, | 10172 Handle<JSArray> a, |
| 10173 PropertyDescriptor* desc, | 10173 PropertyDescriptor* desc, |
| 10174 ShouldThrow should_throw); | 10174 ShouldThrow should_throw); |
| 10175 | 10175 |
| 10176 // Checks whether the Array has the current realm's Array.prototype as its |
| 10177 // prototype. This function is best-effort and only gives a conservative |
| 10178 // approximation, erring on the side of false, in particular with respect |
| 10179 // to Proxies and objects with a hidden prototype. |
| 10180 inline bool HasArrayPrototype(Isolate* isolate); |
| 10181 |
| 10176 DECLARE_CAST(JSArray) | 10182 DECLARE_CAST(JSArray) |
| 10177 | 10183 |
| 10178 // Dispatched behavior. | 10184 // Dispatched behavior. |
| 10179 DECLARE_PRINTER(JSArray) | 10185 DECLARE_PRINTER(JSArray) |
| 10180 DECLARE_VERIFIER(JSArray) | 10186 DECLARE_VERIFIER(JSArray) |
| 10181 | 10187 |
| 10182 // Number of element slots to pre-allocate for an empty array. | 10188 // Number of element slots to pre-allocate for an empty array. |
| 10183 static const int kPreallocatedArrayElements = 4; | 10189 static const int kPreallocatedArrayElements = 4; |
| 10184 | 10190 |
| 10185 // Layout description. | 10191 // Layout description. |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10782 } | 10788 } |
| 10783 return value; | 10789 return value; |
| 10784 } | 10790 } |
| 10785 }; | 10791 }; |
| 10786 | 10792 |
| 10787 | 10793 |
| 10788 } // NOLINT, false-positive due to second-order macros. | 10794 } // NOLINT, false-positive due to second-order macros. |
| 10789 } // NOLINT, false-positive due to second-order macros. | 10795 } // NOLINT, false-positive due to second-order macros. |
| 10790 | 10796 |
| 10791 #endif // V8_OBJECTS_H_ | 10797 #endif // V8_OBJECTS_H_ |
| OLD | NEW |