| 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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 | 702 |
| 703 // All the following types are subtypes of JSReceiver, which corresponds to | 703 // All the following types are subtypes of JSReceiver, which corresponds to |
| 704 // objects in the JS sense. The first and the last type in this range are | 704 // objects in the JS sense. The first and the last type in this range are |
| 705 // the two forms of function. This organization enables using the same | 705 // the two forms of function. This organization enables using the same |
| 706 // compares for checking the JS_RECEIVER and the NONCALLABLE_JS_OBJECT range. | 706 // compares for checking the JS_RECEIVER and the NONCALLABLE_JS_OBJECT range. |
| 707 JS_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE | 707 JS_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE |
| 708 JS_GLOBAL_OBJECT_TYPE, // FIRST_JS_OBJECT_TYPE | 708 JS_GLOBAL_OBJECT_TYPE, // FIRST_JS_OBJECT_TYPE |
| 709 JS_GLOBAL_PROXY_TYPE, | 709 JS_GLOBAL_PROXY_TYPE, |
| 710 // Like JS_OBJECT_TYPE, but requires access checks and/or has interceptors. | 710 // Like JS_OBJECT_TYPE, but requires access checks and/or has interceptors. |
| 711 JS_SPECIAL_API_OBJECT_TYPE, // LAST_SPECIAL_RECEIVER_TYPE | 711 JS_SPECIAL_API_OBJECT_TYPE, // LAST_SPECIAL_RECEIVER_TYPE |
| 712 JS_VALUE_TYPE, | 712 JS_VALUE_TYPE, // LAST_CUSTOM_ELEMENTS_RECEIVER |
| 713 JS_MESSAGE_OBJECT_TYPE, | 713 JS_MESSAGE_OBJECT_TYPE, |
| 714 JS_DATE_TYPE, | 714 JS_DATE_TYPE, |
| 715 JS_OBJECT_TYPE, | 715 JS_OBJECT_TYPE, |
| 716 JS_CONTEXT_EXTENSION_OBJECT_TYPE, | 716 JS_CONTEXT_EXTENSION_OBJECT_TYPE, |
| 717 JS_GENERATOR_OBJECT_TYPE, | 717 JS_GENERATOR_OBJECT_TYPE, |
| 718 JS_MODULE_TYPE, | 718 JS_MODULE_TYPE, |
| 719 JS_ARRAY_TYPE, | 719 JS_ARRAY_TYPE, |
| 720 JS_ARRAY_BUFFER_TYPE, | 720 JS_ARRAY_BUFFER_TYPE, |
| 721 JS_TYPED_ARRAY_TYPE, | 721 JS_TYPED_ARRAY_TYPE, |
| 722 JS_DATA_VIEW_TYPE, | 722 JS_DATA_VIEW_TYPE, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 753 // are not continuous in this enum! The enum ranges instead reflect the | 753 // are not continuous in this enum! The enum ranges instead reflect the |
| 754 // external class names, where proxies are treated as either ordinary objects, | 754 // external class names, where proxies are treated as either ordinary objects, |
| 755 // or functions. | 755 // or functions. |
| 756 FIRST_JS_RECEIVER_TYPE = JS_PROXY_TYPE, | 756 FIRST_JS_RECEIVER_TYPE = JS_PROXY_TYPE, |
| 757 LAST_JS_RECEIVER_TYPE = LAST_TYPE, | 757 LAST_JS_RECEIVER_TYPE = LAST_TYPE, |
| 758 // Boundaries for testing the types represented as JSObject | 758 // Boundaries for testing the types represented as JSObject |
| 759 FIRST_JS_OBJECT_TYPE = JS_GLOBAL_OBJECT_TYPE, | 759 FIRST_JS_OBJECT_TYPE = JS_GLOBAL_OBJECT_TYPE, |
| 760 LAST_JS_OBJECT_TYPE = LAST_TYPE, | 760 LAST_JS_OBJECT_TYPE = LAST_TYPE, |
| 761 // Boundary for testing JSReceivers that need special property lookup handling | 761 // Boundary for testing JSReceivers that need special property lookup handling |
| 762 LAST_SPECIAL_RECEIVER_TYPE = JS_SPECIAL_API_OBJECT_TYPE, | 762 LAST_SPECIAL_RECEIVER_TYPE = JS_SPECIAL_API_OBJECT_TYPE, |
| 763 // Boundary case for testing JSReceivers that may have elements while having |
| 764 // an empty fixed array as elements backing store. This is true for string |
| 765 // wrappers. |
| 766 LAST_CUSTOM_ELEMENTS_RECEIVER = JS_VALUE_TYPE, |
| 763 }; | 767 }; |
| 764 | 768 |
| 765 STATIC_ASSERT(JS_OBJECT_TYPE == Internals::kJSObjectType); | 769 STATIC_ASSERT(JS_OBJECT_TYPE == Internals::kJSObjectType); |
| 766 STATIC_ASSERT(FIRST_NONSTRING_TYPE == Internals::kFirstNonstringType); | 770 STATIC_ASSERT(FIRST_NONSTRING_TYPE == Internals::kFirstNonstringType); |
| 767 STATIC_ASSERT(ODDBALL_TYPE == Internals::kOddballType); | 771 STATIC_ASSERT(ODDBALL_TYPE == Internals::kOddballType); |
| 768 STATIC_ASSERT(FOREIGN_TYPE == Internals::kForeignType); | 772 STATIC_ASSERT(FOREIGN_TYPE == Internals::kForeignType); |
| 769 | 773 |
| 770 | 774 |
| 771 std::ostream& operator<<(std::ostream& os, InstanceType instance_type); | 775 std::ostream& operator<<(std::ostream& os, InstanceType instance_type); |
| 772 | 776 |
| (...skipping 10119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10892 } | 10896 } |
| 10893 return value; | 10897 return value; |
| 10894 } | 10898 } |
| 10895 }; | 10899 }; |
| 10896 | 10900 |
| 10897 | 10901 |
| 10898 } // NOLINT, false-positive due to second-order macros. | 10902 } // NOLINT, false-positive due to second-order macros. |
| 10899 } // NOLINT, false-positive due to second-order macros. | 10903 } // NOLINT, false-positive due to second-order macros. |
| 10900 | 10904 |
| 10901 #endif // V8_OBJECTS_H_ | 10905 #endif // V8_OBJECTS_H_ |
| OLD | NEW |