OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1826 | 1826 |
1827 // Indicator for one component of an AccessorPair. | 1827 // Indicator for one component of an AccessorPair. |
1828 enum AccessorComponent { | 1828 enum AccessorComponent { |
1829 ACCESSOR_GETTER, | 1829 ACCESSOR_GETTER, |
1830 ACCESSOR_SETTER | 1830 ACCESSOR_SETTER |
1831 }; | 1831 }; |
1832 | 1832 |
1833 | 1833 |
1834 enum KeyFilter { SKIP_SYMBOLS, INCLUDE_SYMBOLS }; | 1834 enum KeyFilter { SKIP_SYMBOLS, INCLUDE_SYMBOLS }; |
1835 | 1835 |
1836 enum Enumerability { RESPECT_ENUMERABILITY, IGNORE_ENUMERABILITY }; | |
1837 | 1836 |
1838 enum GetKeysConversion { KEEP_NUMBERS, CONVERT_TO_STRING }; | 1837 enum GetKeysConversion { KEEP_NUMBERS, CONVERT_TO_STRING }; |
1839 | 1838 |
1840 | 1839 |
1841 // JSReceiver includes types on which properties can be defined, i.e., | 1840 // JSReceiver includes types on which properties can be defined, i.e., |
1842 // JSObject and JSProxy. | 1841 // JSObject and JSProxy. |
1843 class JSReceiver: public HeapObject { | 1842 class JSReceiver: public HeapObject { |
1844 public: | 1843 public: |
1845 DECLARE_CAST(JSReceiver) | 1844 DECLARE_CAST(JSReceiver) |
1846 | 1845 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1953 inline static Handle<Smi> GetOrCreateIdentityHash( | 1952 inline static Handle<Smi> GetOrCreateIdentityHash( |
1954 Handle<JSReceiver> object); | 1953 Handle<JSReceiver> object); |
1955 | 1954 |
1956 enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS }; | 1955 enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS }; |
1957 | 1956 |
1958 // Computes the enumerable keys for a JSObject. Used for implementing | 1957 // Computes the enumerable keys for a JSObject. Used for implementing |
1959 // "for (n in object) { }". | 1958 // "for (n in object) { }". |
1960 MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys( | 1959 MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys( |
1961 Handle<JSReceiver> object, KeyCollectionType type, | 1960 Handle<JSReceiver> object, KeyCollectionType type, |
1962 KeyFilter filter = SKIP_SYMBOLS, | 1961 KeyFilter filter = SKIP_SYMBOLS, |
1963 GetKeysConversion getConversion = KEEP_NUMBERS, | 1962 GetKeysConversion getConversion = KEEP_NUMBERS); |
1964 Enumerability enum_policy = RESPECT_ENUMERABILITY); | |
1965 | 1963 |
1966 private: | 1964 private: |
1967 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver); | 1965 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver); |
1968 }; | 1966 }; |
1969 | 1967 |
1970 | 1968 |
1971 // The JSObject describes real heap allocated JavaScript objects with | 1969 // The JSObject describes real heap allocated JavaScript objects with |
1972 // properties. | 1970 // properties. |
1973 // Note that the map of JSObject changes during execution to enable inline | 1971 // Note that the map of JSObject changes during execution to enable inline |
1974 // caching. | 1972 // caching. |
(...skipping 8786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10761 } | 10759 } |
10762 return value; | 10760 return value; |
10763 } | 10761 } |
10764 }; | 10762 }; |
10765 | 10763 |
10766 | 10764 |
10767 } // NOLINT, false-positive due to second-order macros. | 10765 } // NOLINT, false-positive due to second-order macros. |
10768 } // NOLINT, false-positive due to second-order macros. | 10766 } // NOLINT, false-positive due to second-order macros. |
10769 | 10767 |
10770 #endif // V8_OBJECTS_H_ | 10768 #endif // V8_OBJECTS_H_ |
OLD | NEW |