| 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 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2059 Handle<AllocationSite> site = Handle<AllocationSite>::null()); | 2059 Handle<AllocationSite> site = Handle<AllocationSite>::null()); |
| 2060 | 2060 |
| 2061 // Gets global object properties. | 2061 // Gets global object properties. |
| 2062 inline GlobalDictionary* global_dictionary(); | 2062 inline GlobalDictionary* global_dictionary(); |
| 2063 | 2063 |
| 2064 static MaybeHandle<Context> GetFunctionRealm(Handle<JSObject> object); | 2064 static MaybeHandle<Context> GetFunctionRealm(Handle<JSObject> object); |
| 2065 | 2065 |
| 2066 // [elements]: The elements (properties with names that are integers). | 2066 // [elements]: The elements (properties with names that are integers). |
| 2067 // | 2067 // |
| 2068 // Elements can be in two general modes: fast and slow. Each mode | 2068 // Elements can be in two general modes: fast and slow. Each mode |
| 2069 // corrensponds to a set of object representations of elements that | 2069 // corresponds to a set of object representations of elements that |
| 2070 // have something in common. | 2070 // have something in common. |
| 2071 // | 2071 // |
| 2072 // In the fast mode elements is a FixedArray and so each element can | 2072 // In the fast mode elements is a FixedArray and so each element can |
| 2073 // be quickly accessed. This fact is used in the generated code. The | 2073 // be quickly accessed. This fact is used in the generated code. The |
| 2074 // elements array can have one of three maps in this mode: | 2074 // elements array can have one of three maps in this mode: |
| 2075 // fixed_array_map, sloppy_arguments_elements_map or | 2075 // fixed_array_map, sloppy_arguments_elements_map or |
| 2076 // fixed_cow_array_map (for copy-on-write arrays). In the latter case | 2076 // fixed_cow_array_map (for copy-on-write arrays). In the latter case |
| 2077 // the elements array may be shared by a few objects and so before | 2077 // the elements array may be shared by a few objects and so before |
| 2078 // writing to any element the array must be copied. Use | 2078 // writing to any element the array must be copied. Use |
| 2079 // EnsureWritableFastElements in this case. | 2079 // EnsureWritableFastElements in this case. |
| (...skipping 8702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10782 private: | 10782 private: |
| 10783 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessCheckInfo); | 10783 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessCheckInfo); |
| 10784 }; | 10784 }; |
| 10785 | 10785 |
| 10786 | 10786 |
| 10787 class InterceptorInfo: public Struct { | 10787 class InterceptorInfo: public Struct { |
| 10788 public: | 10788 public: |
| 10789 DECL_ACCESSORS(getter, Object) | 10789 DECL_ACCESSORS(getter, Object) |
| 10790 DECL_ACCESSORS(setter, Object) | 10790 DECL_ACCESSORS(setter, Object) |
| 10791 DECL_ACCESSORS(query, Object) | 10791 DECL_ACCESSORS(query, Object) |
| 10792 DECL_ACCESSORS(descriptor, Object) |
| 10792 DECL_ACCESSORS(deleter, Object) | 10793 DECL_ACCESSORS(deleter, Object) |
| 10793 DECL_ACCESSORS(enumerator, Object) | 10794 DECL_ACCESSORS(enumerator, Object) |
| 10794 DECL_ACCESSORS(definer, Object) | 10795 DECL_ACCESSORS(definer, Object) |
| 10795 DECL_ACCESSORS(data, Object) | 10796 DECL_ACCESSORS(data, Object) |
| 10796 DECL_BOOLEAN_ACCESSORS(can_intercept_symbols) | 10797 DECL_BOOLEAN_ACCESSORS(can_intercept_symbols) |
| 10797 DECL_BOOLEAN_ACCESSORS(all_can_read) | 10798 DECL_BOOLEAN_ACCESSORS(all_can_read) |
| 10798 DECL_BOOLEAN_ACCESSORS(non_masking) | 10799 DECL_BOOLEAN_ACCESSORS(non_masking) |
| 10799 | 10800 |
| 10800 inline int flags() const; | 10801 inline int flags() const; |
| 10801 inline void set_flags(int flags); | 10802 inline void set_flags(int flags); |
| 10802 | 10803 |
| 10803 DECLARE_CAST(InterceptorInfo) | 10804 DECLARE_CAST(InterceptorInfo) |
| 10804 | 10805 |
| 10805 // Dispatched behavior. | 10806 // Dispatched behavior. |
| 10806 DECLARE_PRINTER(InterceptorInfo) | 10807 DECLARE_PRINTER(InterceptorInfo) |
| 10807 DECLARE_VERIFIER(InterceptorInfo) | 10808 DECLARE_VERIFIER(InterceptorInfo) |
| 10808 | 10809 |
| 10809 static const int kGetterOffset = HeapObject::kHeaderSize; | 10810 static const int kGetterOffset = HeapObject::kHeaderSize; |
| 10810 static const int kSetterOffset = kGetterOffset + kPointerSize; | 10811 static const int kSetterOffset = kGetterOffset + kPointerSize; |
| 10811 static const int kQueryOffset = kSetterOffset + kPointerSize; | 10812 static const int kQueryOffset = kSetterOffset + kPointerSize; |
| 10812 static const int kDeleterOffset = kQueryOffset + kPointerSize; | 10813 static const int kDescriptorOffset = kQueryOffset + kPointerSize; |
| 10814 static const int kDeleterOffset = kDescriptorOffset + kPointerSize; |
| 10813 static const int kEnumeratorOffset = kDeleterOffset + kPointerSize; | 10815 static const int kEnumeratorOffset = kDeleterOffset + kPointerSize; |
| 10814 static const int kDefinerOffset = kEnumeratorOffset + kPointerSize; | 10816 static const int kDefinerOffset = kEnumeratorOffset + kPointerSize; |
| 10815 static const int kDataOffset = kDefinerOffset + kPointerSize; | 10817 static const int kDataOffset = kDefinerOffset + kPointerSize; |
| 10816 static const int kFlagsOffset = kDataOffset + kPointerSize; | 10818 static const int kFlagsOffset = kDataOffset + kPointerSize; |
| 10817 static const int kSize = kFlagsOffset + kPointerSize; | 10819 static const int kSize = kFlagsOffset + kPointerSize; |
| 10818 | 10820 |
| 10819 static const int kCanInterceptSymbolsBit = 0; | 10821 static const int kCanInterceptSymbolsBit = 0; |
| 10820 static const int kAllCanReadBit = 1; | 10822 static const int kAllCanReadBit = 1; |
| 10821 static const int kNonMasking = 2; | 10823 static const int kNonMasking = 2; |
| 10822 | 10824 |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11203 } | 11205 } |
| 11204 return value; | 11206 return value; |
| 11205 } | 11207 } |
| 11206 }; | 11208 }; |
| 11207 | 11209 |
| 11208 | 11210 |
| 11209 } // NOLINT, false-positive due to second-order macros. | 11211 } // NOLINT, false-positive due to second-order macros. |
| 11210 } // NOLINT, false-positive due to second-order macros. | 11212 } // NOLINT, false-positive due to second-order macros. |
| 11211 | 11213 |
| 11212 #endif // V8_OBJECTS_H_ | 11214 #endif // V8_OBJECTS_H_ |
| OLD | NEW |