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 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2901 static inline void NoWriteBarrierSet(FixedArray* array, | 2902 static inline void NoWriteBarrierSet(FixedArray* array, |
2902 int index, | 2903 int index, |
2903 Object* value); | 2904 Object* value); |
2904 | 2905 |
2905 private: | 2906 private: |
2906 STATIC_ASSERT(kHeaderSize == Internals::kFixedArrayHeaderSize); | 2907 STATIC_ASSERT(kHeaderSize == Internals::kFixedArrayHeaderSize); |
2907 | 2908 |
2908 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); | 2909 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); |
2909 }; | 2910 }; |
2910 | 2911 |
| 2912 // BoilerplateDescription is a list of properties consisting of name value |
| 2913 // pairs. In addition to the properties, it provides the projected number |
| 2914 // of properties in the backing store. This number includes properties with |
| 2915 // computed names that are not |
| 2916 // in the list. |
| 2917 class BoilerplateDescription : public FixedArray { |
| 2918 public: |
| 2919 Object* name(int index) const; |
| 2920 Object* value(int index) const; |
| 2921 |
| 2922 // The number of boilerplate properties. |
| 2923 int size() const; |
| 2924 |
| 2925 // Number of boilerplate properties and properties with computed names. |
| 2926 int backing_store_size() const; |
| 2927 |
| 2928 void set_backing_store_size(Isolate* isolate, int backing_store_size); |
| 2929 |
| 2930 DECLARE_CAST(BoilerplateDescription) |
| 2931 |
| 2932 private: |
| 2933 bool has_number_of_properties() const; |
| 2934 }; |
2911 | 2935 |
2912 // FixedDoubleArray describes fixed-sized arrays with element type double. | 2936 // FixedDoubleArray describes fixed-sized arrays with element type double. |
2913 class FixedDoubleArray: public FixedArrayBase { | 2937 class FixedDoubleArray: public FixedArrayBase { |
2914 public: | 2938 public: |
2915 // Setter and getter for elements. | 2939 // Setter and getter for elements. |
2916 inline double get_scalar(int index); | 2940 inline double get_scalar(int index); |
2917 inline uint64_t get_representation(int index); | 2941 inline uint64_t get_representation(int index); |
2918 static inline Handle<Object> get(FixedDoubleArray* array, int index, | 2942 static inline Handle<Object> get(FixedDoubleArray* array, int index, |
2919 Isolate* isolate); | 2943 Isolate* isolate); |
2920 inline void set(int index, double value); | 2944 inline void set(int index, double value); |
(...skipping 3464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6385 // of endianess. Also provide endian-independent offset to that 16-bit word. | 6409 // of endianess. Also provide endian-independent offset to that 16-bit word. |
6386 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 0; | 6410 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 0; |
6387 static const int kBitFieldOffset = kInstanceAttributesOffset + 1; | 6411 static const int kBitFieldOffset = kInstanceAttributesOffset + 1; |
6388 #else | 6412 #else |
6389 static const int kBitFieldOffset = kInstanceAttributesOffset + 0; | 6413 static const int kBitFieldOffset = kInstanceAttributesOffset + 0; |
6390 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 1; | 6414 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 1; |
6391 #endif | 6415 #endif |
6392 static const int kInstanceTypeAndBitFieldOffset = | 6416 static const int kInstanceTypeAndBitFieldOffset = |
6393 kInstanceAttributesOffset + 0; | 6417 kInstanceAttributesOffset + 0; |
6394 static const int kBitField2Offset = kInstanceAttributesOffset + 2; | 6418 static const int kBitField2Offset = kInstanceAttributesOffset + 2; |
6395 static const int kUnusedPropertyFieldsByte = 3; | |
6396 static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 3; | 6419 static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 3; |
6397 | 6420 |
6398 STATIC_ASSERT(kInstanceTypeAndBitFieldOffset == | 6421 STATIC_ASSERT(kInstanceTypeAndBitFieldOffset == |
6399 Internals::kMapInstanceTypeAndBitFieldOffset); | 6422 Internals::kMapInstanceTypeAndBitFieldOffset); |
6400 | 6423 |
6401 // Bit positions for bit field. | 6424 // Bit positions for bit field. |
6402 static const int kHasNonInstancePrototype = 0; | 6425 static const int kHasNonInstancePrototype = 0; |
6403 static const int kIsCallable = 1; | 6426 static const int kIsCallable = 1; |
6404 static const int kHasNamedInterceptor = 2; | 6427 static const int kHasNamedInterceptor = 2; |
6405 static const int kHasIndexedInterceptor = 3; | 6428 static const int kHasIndexedInterceptor = 3; |
(...skipping 5245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11651 } | 11674 } |
11652 }; | 11675 }; |
11653 | 11676 |
11654 | 11677 |
11655 } // NOLINT, false-positive due to second-order macros. | 11678 } // NOLINT, false-positive due to second-order macros. |
11656 } // NOLINT, false-positive due to second-order macros. | 11679 } // NOLINT, false-positive due to second-order macros. |
11657 | 11680 |
11658 #include "src/objects/object-macros-undef.h" | 11681 #include "src/objects/object-macros-undef.h" |
11659 | 11682 |
11660 #endif // V8_OBJECTS_H_ | 11683 #endif // V8_OBJECTS_H_ |
OLD | NEW |