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 7259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7270 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ | 7270 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ |
7271 k##name, | 7271 k##name, |
7272 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) | 7272 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) |
7273 ATOMIC_FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) | 7273 ATOMIC_FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) |
7274 #undef DECLARE_FUNCTION_ID | 7274 #undef DECLARE_FUNCTION_ID |
7275 // Fake id for a special case of Math.pow. Note, it continues the | 7275 // Fake id for a special case of Math.pow. Note, it continues the |
7276 // list of math functions. | 7276 // list of math functions. |
7277 kMathPowHalf, | 7277 kMathPowHalf, |
7278 // These are manually assigned to special getters during bootstrapping. | 7278 // These are manually assigned to special getters during bootstrapping. |
7279 kArrayBufferByteLength, | 7279 kArrayBufferByteLength, |
| 7280 kArrayEntries, |
| 7281 kArrayKeys, |
| 7282 kArrayValues, |
| 7283 kArrayIteratorNext, |
7280 kDataViewBuffer, | 7284 kDataViewBuffer, |
7281 kDataViewByteLength, | 7285 kDataViewByteLength, |
7282 kDataViewByteOffset, | 7286 kDataViewByteOffset, |
7283 kGlobalDecodeURI, | 7287 kGlobalDecodeURI, |
7284 kGlobalDecodeURIComponent, | 7288 kGlobalDecodeURIComponent, |
7285 kGlobalEncodeURI, | 7289 kGlobalEncodeURI, |
7286 kGlobalEncodeURIComponent, | 7290 kGlobalEncodeURIComponent, |
7287 kGlobalEscape, | 7291 kGlobalEscape, |
7288 kGlobalUnescape, | 7292 kGlobalUnescape, |
7289 kGlobalIsFinite, | 7293 kGlobalIsFinite, |
7290 kGlobalIsNaN, | 7294 kGlobalIsNaN, |
7291 kTypedArrayByteLength, | 7295 kTypedArrayByteLength, |
7292 kTypedArrayByteOffset, | 7296 kTypedArrayByteOffset, |
| 7297 kTypedArrayEntries, |
| 7298 kTypedArrayKeys, |
7293 kTypedArrayLength, | 7299 kTypedArrayLength, |
| 7300 kTypedArrayValues, |
7294 kSharedArrayBufferByteLength, | 7301 kSharedArrayBufferByteLength, |
7295 kStringIterator, | 7302 kStringIterator, |
7296 kStringIteratorNext, | 7303 kStringIteratorNext, |
7297 }; | 7304 }; |
7298 | 7305 |
7299 | 7306 |
7300 // Result of searching in an optimized code map of a SharedFunctionInfo. Note | 7307 // Result of searching in an optimized code map of a SharedFunctionInfo. Note |
7301 // that both {code} and {literals} can be NULL to pass search result status. | 7308 // that both {code} and {literals} can be NULL to pass search result status. |
7302 struct CodeAndLiterals { | 7309 struct CodeAndLiterals { |
7303 Code* code; // Cached optimized code. | 7310 Code* code; // Cached optimized code. |
(...skipping 3380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10684 // [object]: the [[IteratedObject]] internal field. | 10691 // [object]: the [[IteratedObject]] internal field. |
10685 DECL_ACCESSORS(object, Object) | 10692 DECL_ACCESSORS(object, Object) |
10686 | 10693 |
10687 // [index]: The [[ArrayIteratorNextIndex]] internal field. | 10694 // [index]: The [[ArrayIteratorNextIndex]] internal field. |
10688 DECL_ACCESSORS(index, Object) | 10695 DECL_ACCESSORS(index, Object) |
10689 | 10696 |
10690 // [map]: The Map of the [[IteratedObject]] field at the time the iterator is | 10697 // [map]: The Map of the [[IteratedObject]] field at the time the iterator is |
10691 // allocated. | 10698 // allocated. |
10692 DECL_ACCESSORS(object_map, Object) | 10699 DECL_ACCESSORS(object_map, Object) |
10693 | 10700 |
| 10701 // Return the ElementsKind that a JSArrayIterator's [[IteratedObject]] is |
| 10702 // expected to have, based on its instance type. |
| 10703 static ElementsKind ElementsKindForInstanceType(InstanceType instance_type); |
| 10704 |
10694 static const int kIteratedObjectOffset = JSObject::kHeaderSize; | 10705 static const int kIteratedObjectOffset = JSObject::kHeaderSize; |
10695 static const int kNextIndexOffset = kIteratedObjectOffset + kPointerSize; | 10706 static const int kNextIndexOffset = kIteratedObjectOffset + kPointerSize; |
10696 static const int kIteratedObjectMapOffset = kNextIndexOffset + kPointerSize; | 10707 static const int kIteratedObjectMapOffset = kNextIndexOffset + kPointerSize; |
10697 static const int kSize = kIteratedObjectMapOffset + kPointerSize; | 10708 static const int kSize = kIteratedObjectMapOffset + kPointerSize; |
10698 | 10709 |
10699 private: | 10710 private: |
10700 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayIterator); | 10711 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayIterator); |
10701 }; | 10712 }; |
10702 | 10713 |
10703 class JSStringIterator : public JSObject { | 10714 class JSStringIterator : public JSObject { |
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11805 } | 11816 } |
11806 return value; | 11817 return value; |
11807 } | 11818 } |
11808 }; | 11819 }; |
11809 | 11820 |
11810 | 11821 |
11811 } // NOLINT, false-positive due to second-order macros. | 11822 } // NOLINT, false-positive due to second-order macros. |
11812 } // NOLINT, false-positive due to second-order macros. | 11823 } // NOLINT, false-positive due to second-order macros. |
11813 | 11824 |
11814 #endif // V8_OBJECTS_H_ | 11825 #endif // V8_OBJECTS_H_ |
OLD | NEW |