| 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 10301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10312 PropertyDescriptor* desc, ShouldThrow should_throw); | 10312 PropertyDescriptor* desc, ShouldThrow should_throw); |
| 10313 | 10313 |
| 10314 static bool AnythingToArrayLength(Isolate* isolate, | 10314 static bool AnythingToArrayLength(Isolate* isolate, |
| 10315 Handle<Object> length_object, | 10315 Handle<Object> length_object, |
| 10316 uint32_t* output); | 10316 uint32_t* output); |
| 10317 MUST_USE_RESULT static Maybe<bool> ArraySetLength(Isolate* isolate, | 10317 MUST_USE_RESULT static Maybe<bool> ArraySetLength(Isolate* isolate, |
| 10318 Handle<JSArray> a, | 10318 Handle<JSArray> a, |
| 10319 PropertyDescriptor* desc, | 10319 PropertyDescriptor* desc, |
| 10320 ShouldThrow should_throw); | 10320 ShouldThrow should_throw); |
| 10321 | 10321 |
| 10322 // Checks whether the Array has the current realm's Array.prototype as its |
| 10323 // prototype. This function is best-effort and only gives a conservative |
| 10324 // approximation, erring on the side of false, in particular with respect |
| 10325 // to Proxies and objects with a hidden prototype. |
| 10326 inline bool HasArrayPrototype(Isolate* isolate); |
| 10327 |
| 10322 DECLARE_CAST(JSArray) | 10328 DECLARE_CAST(JSArray) |
| 10323 | 10329 |
| 10324 // Dispatched behavior. | 10330 // Dispatched behavior. |
| 10325 DECLARE_PRINTER(JSArray) | 10331 DECLARE_PRINTER(JSArray) |
| 10326 DECLARE_VERIFIER(JSArray) | 10332 DECLARE_VERIFIER(JSArray) |
| 10327 | 10333 |
| 10328 // Number of element slots to pre-allocate for an empty array. | 10334 // Number of element slots to pre-allocate for an empty array. |
| 10329 static const int kPreallocatedArrayElements = 4; | 10335 static const int kPreallocatedArrayElements = 4; |
| 10330 | 10336 |
| 10331 // Layout description. | 10337 // Layout description. |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10919 } | 10925 } |
| 10920 return value; | 10926 return value; |
| 10921 } | 10927 } |
| 10922 }; | 10928 }; |
| 10923 | 10929 |
| 10924 | 10930 |
| 10925 } // NOLINT, false-positive due to second-order macros. | 10931 } // NOLINT, false-positive due to second-order macros. |
| 10926 } // NOLINT, false-positive due to second-order macros. | 10932 } // NOLINT, false-positive due to second-order macros. |
| 10927 | 10933 |
| 10928 #endif // V8_OBJECTS_H_ | 10934 #endif // V8_OBJECTS_H_ |
| OLD | NEW |