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 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 V(FrameArray) \ | 1044 V(FrameArray) \ |
1045 V(TransitionArray) \ | 1045 V(TransitionArray) \ |
1046 V(LiteralsArray) \ | 1046 V(LiteralsArray) \ |
1047 V(TypeFeedbackMetadata) \ | 1047 V(TypeFeedbackMetadata) \ |
1048 V(TypeFeedbackVector) \ | 1048 V(TypeFeedbackVector) \ |
1049 V(DeoptimizationInputData) \ | 1049 V(DeoptimizationInputData) \ |
1050 V(DeoptimizationOutputData) \ | 1050 V(DeoptimizationOutputData) \ |
1051 V(DependentCode) \ | 1051 V(DependentCode) \ |
1052 V(HandlerTable) \ | 1052 V(HandlerTable) \ |
1053 V(FixedArray) \ | 1053 V(FixedArray) \ |
| 1054 V(BoilerplateDescription) \ |
1054 V(FixedDoubleArray) \ | 1055 V(FixedDoubleArray) \ |
1055 V(WeakFixedArray) \ | 1056 V(WeakFixedArray) \ |
1056 V(ArrayList) \ | 1057 V(ArrayList) \ |
1057 V(RegExpMatchInfo) \ | 1058 V(RegExpMatchInfo) \ |
1058 V(Context) \ | 1059 V(Context) \ |
1059 V(ScriptContextTable) \ | 1060 V(ScriptContextTable) \ |
1060 V(NativeContext) \ | 1061 V(NativeContext) \ |
1061 V(ScopeInfo) \ | 1062 V(ScopeInfo) \ |
1062 V(ModuleInfo) \ | 1063 V(ModuleInfo) \ |
1063 V(JSBoundFunction) \ | 1064 V(JSBoundFunction) \ |
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2899 static inline void NoWriteBarrierSet(FixedArray* array, | 2900 static inline void NoWriteBarrierSet(FixedArray* array, |
2900 int index, | 2901 int index, |
2901 Object* value); | 2902 Object* value); |
2902 | 2903 |
2903 private: | 2904 private: |
2904 STATIC_ASSERT(kHeaderSize == Internals::kFixedArrayHeaderSize); | 2905 STATIC_ASSERT(kHeaderSize == Internals::kFixedArrayHeaderSize); |
2905 | 2906 |
2906 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); | 2907 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); |
2907 }; | 2908 }; |
2908 | 2909 |
| 2910 // BoilerplateDescription is a list of properties consisting of name value |
| 2911 // pairs. In addition to the properties, it provides the number of all |
| 2912 // properties. This number includes properties with computed names that are not |
| 2913 // in the list. We need the total number for allocating space in the property |
| 2914 // backing store. |
| 2915 class BoilerplateDescription : public FixedArray { |
| 2916 public: |
| 2917 // Number of boilerplate properties and properties with computed names. |
| 2918 int number_of_all_properties() const; |
| 2919 |
| 2920 // The number of boilerplate properties. |
| 2921 int size() const; |
| 2922 |
| 2923 Object* name(int index) const; |
| 2924 Object* value(int index) const; |
| 2925 |
| 2926 DECLARE_CAST(BoilerplateDescription) |
| 2927 |
| 2928 private: |
| 2929 bool has_number_of_properties() const; |
| 2930 }; |
2909 | 2931 |
2910 // FixedDoubleArray describes fixed-sized arrays with element type double. | 2932 // FixedDoubleArray describes fixed-sized arrays with element type double. |
2911 class FixedDoubleArray: public FixedArrayBase { | 2933 class FixedDoubleArray: public FixedArrayBase { |
2912 public: | 2934 public: |
2913 // Setter and getter for elements. | 2935 // Setter and getter for elements. |
2914 inline double get_scalar(int index); | 2936 inline double get_scalar(int index); |
2915 inline uint64_t get_representation(int index); | 2937 inline uint64_t get_representation(int index); |
2916 static inline Handle<Object> get(FixedDoubleArray* array, int index, | 2938 static inline Handle<Object> get(FixedDoubleArray* array, int index, |
2917 Isolate* isolate); | 2939 Isolate* isolate); |
2918 inline void set(int index, double value); | 2940 inline void set(int index, double value); |
(...skipping 3463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6382 // of endianess. Also provide endian-independent offset to that 16-bit word. | 6404 // of endianess. Also provide endian-independent offset to that 16-bit word. |
6383 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 0; | 6405 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 0; |
6384 static const int kBitFieldOffset = kInstanceAttributesOffset + 1; | 6406 static const int kBitFieldOffset = kInstanceAttributesOffset + 1; |
6385 #else | 6407 #else |
6386 static const int kBitFieldOffset = kInstanceAttributesOffset + 0; | 6408 static const int kBitFieldOffset = kInstanceAttributesOffset + 0; |
6387 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 1; | 6409 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 1; |
6388 #endif | 6410 #endif |
6389 static const int kInstanceTypeAndBitFieldOffset = | 6411 static const int kInstanceTypeAndBitFieldOffset = |
6390 kInstanceAttributesOffset + 0; | 6412 kInstanceAttributesOffset + 0; |
6391 static const int kBitField2Offset = kInstanceAttributesOffset + 2; | 6413 static const int kBitField2Offset = kInstanceAttributesOffset + 2; |
6392 static const int kUnusedPropertyFieldsByte = 3; | |
6393 static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 3; | 6414 static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 3; |
6394 | 6415 |
6395 STATIC_ASSERT(kInstanceTypeAndBitFieldOffset == | 6416 STATIC_ASSERT(kInstanceTypeAndBitFieldOffset == |
6396 Internals::kMapInstanceTypeAndBitFieldOffset); | 6417 Internals::kMapInstanceTypeAndBitFieldOffset); |
6397 | 6418 |
6398 // Bit positions for bit field. | 6419 // Bit positions for bit field. |
6399 static const int kHasNonInstancePrototype = 0; | 6420 static const int kHasNonInstancePrototype = 0; |
6400 static const int kIsCallable = 1; | 6421 static const int kIsCallable = 1; |
6401 static const int kHasNamedInterceptor = 2; | 6422 static const int kHasNamedInterceptor = 2; |
6402 static const int kHasIndexedInterceptor = 3; | 6423 static const int kHasIndexedInterceptor = 3; |
(...skipping 5245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11648 } | 11669 } |
11649 }; | 11670 }; |
11650 | 11671 |
11651 | 11672 |
11652 } // NOLINT, false-positive due to second-order macros. | 11673 } // NOLINT, false-positive due to second-order macros. |
11653 } // NOLINT, false-positive due to second-order macros. | 11674 } // NOLINT, false-positive due to second-order macros. |
11654 | 11675 |
11655 #include "src/objects/object-macros-undef.h" | 11676 #include "src/objects/object-macros-undef.h" |
11656 | 11677 |
11657 #endif // V8_OBJECTS_H_ | 11678 #endif // V8_OBJECTS_H_ |
OLD | NEW |