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 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1498 | 1498 |
1499 // Tries to convert an object to an array length. Returns true and sets the | 1499 // Tries to convert an object to an array length. Returns true and sets the |
1500 // output parameter if it succeeds. | 1500 // output parameter if it succeeds. |
1501 inline bool ToArrayLength(uint32_t* index); | 1501 inline bool ToArrayLength(uint32_t* index); |
1502 | 1502 |
1503 // Tries to convert an object to an array index. Returns true and sets the | 1503 // Tries to convert an object to an array index. Returns true and sets the |
1504 // output parameter if it succeeds. Equivalent to ToArrayLength, but does not | 1504 // output parameter if it succeeds. Equivalent to ToArrayLength, but does not |
1505 // allow kMaxUInt32. | 1505 // allow kMaxUInt32. |
1506 inline bool ToArrayIndex(uint32_t* index); | 1506 inline bool ToArrayIndex(uint32_t* index); |
1507 | 1507 |
| 1508 // Returns true if the result of iterating over the object is the same |
| 1509 // (including observable effects) as simply accessing the properties between 0 |
| 1510 // and length. |
| 1511 bool IterationHasObservableEffects(); |
| 1512 |
1508 DECLARE_VERIFIER(Object) | 1513 DECLARE_VERIFIER(Object) |
1509 #ifdef VERIFY_HEAP | 1514 #ifdef VERIFY_HEAP |
1510 // Verify a pointer is a valid object pointer. | 1515 // Verify a pointer is a valid object pointer. |
1511 static void VerifyPointer(Object* p); | 1516 static void VerifyPointer(Object* p); |
1512 #endif | 1517 #endif |
1513 | 1518 |
1514 inline void VerifyApiCallResultType(); | 1519 inline void VerifyApiCallResultType(); |
1515 | 1520 |
1516 // ES6 19.1.3.6 Object.prototype.toString | 1521 // ES6 19.1.3.6 Object.prototype.toString |
1517 MUST_USE_RESULT static MaybeHandle<String> ObjectProtoToString( | 1522 MUST_USE_RESULT static MaybeHandle<String> ObjectProtoToString( |
(...skipping 10421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11939 } | 11944 } |
11940 return value; | 11945 return value; |
11941 } | 11946 } |
11942 }; | 11947 }; |
11943 | 11948 |
11944 | 11949 |
11945 } // NOLINT, false-positive due to second-order macros. | 11950 } // NOLINT, false-positive due to second-order macros. |
11946 } // NOLINT, false-positive due to second-order macros. | 11951 } // NOLINT, false-positive due to second-order macros. |
11947 | 11952 |
11948 #endif // V8_OBJECTS_H_ | 11953 #endif // V8_OBJECTS_H_ |
OLD | NEW |