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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // - StringSet | 82 // - StringSet |
83 // - CompilationCacheTable | 83 // - CompilationCacheTable |
84 // - CodeCacheHashTable | 84 // - CodeCacheHashTable |
85 // - MapCache | 85 // - MapCache |
86 // - OrderedHashTable | 86 // - OrderedHashTable |
87 // - OrderedHashSet | 87 // - OrderedHashSet |
88 // - OrderedHashMap | 88 // - OrderedHashMap |
89 // - Context | 89 // - Context |
90 // - TypeFeedbackMetadata | 90 // - TypeFeedbackMetadata |
91 // - TypeFeedbackVector | 91 // - TypeFeedbackVector |
| 92 // - TemplateList |
| 93 // - TransitionArray |
92 // - ScopeInfo | 94 // - ScopeInfo |
93 // - TransitionArray | |
94 // - ScriptContextTable | 95 // - ScriptContextTable |
95 // - WeakFixedArray | 96 // - WeakFixedArray |
96 // - FixedDoubleArray | 97 // - FixedDoubleArray |
97 // - Name | 98 // - Name |
98 // - String | 99 // - String |
99 // - SeqString | 100 // - SeqString |
100 // - SeqOneByteString | 101 // - SeqOneByteString |
101 // - SeqTwoByteString | 102 // - SeqTwoByteString |
102 // - SlicedString | 103 // - SlicedString |
103 // - ConsString | 104 // - ConsString |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 class PropertyCell; | 879 class PropertyCell; |
879 class PropertyDescriptor; | 880 class PropertyDescriptor; |
880 class SafepointEntry; | 881 class SafepointEntry; |
881 class SharedFunctionInfo; | 882 class SharedFunctionInfo; |
882 class StringStream; | 883 class StringStream; |
883 class TypeFeedbackInfo; | 884 class TypeFeedbackInfo; |
884 class TypeFeedbackMetadata; | 885 class TypeFeedbackMetadata; |
885 class TypeFeedbackVector; | 886 class TypeFeedbackVector; |
886 class WeakCell; | 887 class WeakCell; |
887 class TransitionArray; | 888 class TransitionArray; |
888 | 889 class TemplateList; |
889 | 890 |
890 // A template-ized version of the IsXXX functions. | 891 // A template-ized version of the IsXXX functions. |
891 template <class C> inline bool Is(Object* obj); | 892 template <class C> inline bool Is(Object* obj); |
892 | 893 |
893 #ifdef VERIFY_HEAP | 894 #ifdef VERIFY_HEAP |
894 #define DECLARE_VERIFIER(Name) void Name##Verify(); | 895 #define DECLARE_VERIFIER(Name) void Name##Verify(); |
895 #else | 896 #else |
896 #define DECLARE_VERIFIER(Name) | 897 #define DECLARE_VERIFIER(Name) |
897 #endif | 898 #endif |
898 | 899 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 V(AccessCheckNeeded) \ | 1017 V(AccessCheckNeeded) \ |
1017 V(Callable) \ | 1018 V(Callable) \ |
1018 V(Function) \ | 1019 V(Function) \ |
1019 V(Constructor) \ | 1020 V(Constructor) \ |
1020 V(TemplateInfo) \ | 1021 V(TemplateInfo) \ |
1021 V(Filler) \ | 1022 V(Filler) \ |
1022 V(FixedArrayBase) \ | 1023 V(FixedArrayBase) \ |
1023 V(External) \ | 1024 V(External) \ |
1024 V(Struct) \ | 1025 V(Struct) \ |
1025 V(Cell) \ | 1026 V(Cell) \ |
| 1027 V(TemplateList) \ |
1026 V(PropertyCell) \ | 1028 V(PropertyCell) \ |
1027 V(WeakCell) \ | 1029 V(WeakCell) \ |
1028 V(ObjectHashTable) \ | 1030 V(ObjectHashTable) \ |
1029 V(ObjectHashSet) \ | 1031 V(ObjectHashSet) \ |
1030 V(WeakHashTable) \ | 1032 V(WeakHashTable) \ |
1031 V(OrderedHashTable) | 1033 V(OrderedHashTable) |
1032 | 1034 |
1033 #define ODDBALL_LIST(V) \ | 1035 #define ODDBALL_LIST(V) \ |
1034 V(Undefined, undefined_value) \ | 1036 V(Undefined, undefined_value) \ |
1035 V(Null, null_value) \ | 1037 V(Null, null_value) \ |
(...skipping 3910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4946 // Layout description for handler table based on return addresses. | 4948 // Layout description for handler table based on return addresses. |
4947 static const int kReturnOffsetIndex = 0; | 4949 static const int kReturnOffsetIndex = 0; |
4948 static const int kReturnHandlerIndex = 1; | 4950 static const int kReturnHandlerIndex = 1; |
4949 static const int kReturnEntrySize = 2; | 4951 static const int kReturnEntrySize = 2; |
4950 | 4952 |
4951 // Encoding of the {handler} field. | 4953 // Encoding of the {handler} field. |
4952 class HandlerPredictionField : public BitField<CatchPrediction, 0, 2> {}; | 4954 class HandlerPredictionField : public BitField<CatchPrediction, 0, 2> {}; |
4953 class HandlerOffsetField : public BitField<int, 2, 30> {}; | 4955 class HandlerOffsetField : public BitField<int, 2, 30> {}; |
4954 }; | 4956 }; |
4955 | 4957 |
| 4958 class TemplateList : public FixedArray { |
| 4959 public: |
| 4960 static Handle<TemplateList> New(Isolate* isolate, int size); |
| 4961 inline int length() const; |
| 4962 inline Object* get(int index) const; |
| 4963 inline void set(int index, Object* value); |
| 4964 static Handle<TemplateList> Add(Isolate* isolate, Handle<TemplateList> list, |
| 4965 Handle<Object> value); |
| 4966 DECLARE_CAST(TemplateList) |
| 4967 private: |
| 4968 static const int kLengthIndex = 0; |
| 4969 static const int kFirstElementIndex = kLengthIndex + 1; |
| 4970 DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateList); |
| 4971 }; |
4956 | 4972 |
4957 // Code describes objects with on-the-fly generated machine code. | 4973 // Code describes objects with on-the-fly generated machine code. |
4958 class Code: public HeapObject { | 4974 class Code: public HeapObject { |
4959 public: | 4975 public: |
4960 // Opaque data type for encapsulating code flags like kind, inline | 4976 // Opaque data type for encapsulating code flags like kind, inline |
4961 // cache state, and arguments count. | 4977 // cache state, and arguments count. |
4962 typedef uint32_t Flags; | 4978 typedef uint32_t Flags; |
4963 | 4979 |
4964 #define NON_IC_KIND_LIST(V) \ | 4980 #define NON_IC_KIND_LIST(V) \ |
4965 V(FUNCTION) \ | 4981 V(FUNCTION) \ |
(...skipping 6069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11035 } | 11051 } |
11036 return value; | 11052 return value; |
11037 } | 11053 } |
11038 }; | 11054 }; |
11039 | 11055 |
11040 | 11056 |
11041 } // NOLINT, false-positive due to second-order macros. | 11057 } // NOLINT, false-positive due to second-order macros. |
11042 } // NOLINT, false-positive due to second-order macros. | 11058 } // NOLINT, false-positive due to second-order macros. |
11043 | 11059 |
11044 #endif // V8_OBJECTS_H_ | 11060 #endif // V8_OBJECTS_H_ |
OLD | NEW |