OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PROPERTY_H_ | 5 #ifndef V8_PROPERTY_H_ |
6 #define V8_PROPERTY_H_ | 6 #define V8_PROPERTY_H_ |
7 | 7 |
8 #include "src/factory.h" | 8 #include "src/factory.h" |
9 #include "src/field-index.h" | 9 #include "src/field-index.h" |
10 #include "src/field-index-inl.h" | 10 #include "src/field-index-inl.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 details_(attributes, type, representation, field_index) { } | 66 details_(attributes, type, representation, field_index) { } |
67 | 67 |
68 friend class DescriptorArray; | 68 friend class DescriptorArray; |
69 friend class Map; | 69 friend class Map; |
70 }; | 70 }; |
71 | 71 |
72 | 72 |
73 OStream& operator<<(OStream& os, const Descriptor& d); | 73 OStream& operator<<(OStream& os, const Descriptor& d); |
74 | 74 |
75 | 75 |
76 class FieldDescriptor V8_FINAL : public Descriptor { | 76 class FieldDescriptor FINAL : public Descriptor { |
77 public: | 77 public: |
78 FieldDescriptor(Handle<Name> key, | 78 FieldDescriptor(Handle<Name> key, |
79 int field_index, | 79 int field_index, |
80 PropertyAttributes attributes, | 80 PropertyAttributes attributes, |
81 Representation representation) | 81 Representation representation) |
82 : Descriptor(key, HeapType::Any(key->GetIsolate()), attributes, | 82 : Descriptor(key, HeapType::Any(key->GetIsolate()), attributes, |
83 FIELD, representation, field_index) {} | 83 FIELD, representation, field_index) {} |
84 FieldDescriptor(Handle<Name> key, | 84 FieldDescriptor(Handle<Name> key, |
85 int field_index, | 85 int field_index, |
86 Handle<HeapType> field_type, | 86 Handle<HeapType> field_type, |
87 PropertyAttributes attributes, | 87 PropertyAttributes attributes, |
88 Representation representation) | 88 Representation representation) |
89 : Descriptor(key, field_type, attributes, FIELD, | 89 : Descriptor(key, field_type, attributes, FIELD, |
90 representation, field_index) { } | 90 representation, field_index) { } |
91 }; | 91 }; |
92 | 92 |
93 | 93 |
94 class ConstantDescriptor V8_FINAL : public Descriptor { | 94 class ConstantDescriptor FINAL : public Descriptor { |
95 public: | 95 public: |
96 ConstantDescriptor(Handle<Name> key, | 96 ConstantDescriptor(Handle<Name> key, |
97 Handle<Object> value, | 97 Handle<Object> value, |
98 PropertyAttributes attributes) | 98 PropertyAttributes attributes) |
99 : Descriptor(key, value, attributes, CONSTANT, | 99 : Descriptor(key, value, attributes, CONSTANT, |
100 value->OptimalRepresentation()) {} | 100 value->OptimalRepresentation()) {} |
101 }; | 101 }; |
102 | 102 |
103 | 103 |
104 class CallbacksDescriptor V8_FINAL : public Descriptor { | 104 class CallbacksDescriptor FINAL : public Descriptor { |
105 public: | 105 public: |
106 CallbacksDescriptor(Handle<Name> key, | 106 CallbacksDescriptor(Handle<Name> key, |
107 Handle<Object> foreign, | 107 Handle<Object> foreign, |
108 PropertyAttributes attributes) | 108 PropertyAttributes attributes) |
109 : Descriptor(key, foreign, attributes, CALLBACKS, | 109 : Descriptor(key, foreign, attributes, CALLBACKS, |
110 Representation::Tagged()) {} | 110 Representation::Tagged()) {} |
111 }; | 111 }; |
112 | 112 |
113 | 113 |
114 class LookupResult V8_FINAL BASE_EMBEDDED { | 114 class LookupResult FINAL BASE_EMBEDDED { |
115 public: | 115 public: |
116 explicit LookupResult(Isolate* isolate) | 116 explicit LookupResult(Isolate* isolate) |
117 : isolate_(isolate), | 117 : isolate_(isolate), |
118 next_(isolate->top_lookup_result()), | 118 next_(isolate->top_lookup_result()), |
119 lookup_type_(NOT_FOUND), | 119 lookup_type_(NOT_FOUND), |
120 holder_(NULL), | 120 holder_(NULL), |
121 transition_(NULL), | 121 transition_(NULL), |
122 details_(NONE, NORMAL, Representation::None()) { | 122 details_(NONE, NORMAL, Representation::None()) { |
123 isolate->set_top_lookup_result(this); | 123 isolate->set_top_lookup_result(this); |
124 } | 124 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 Map* transition_; | 246 Map* transition_; |
247 int number_; | 247 int number_; |
248 PropertyDetails details_; | 248 PropertyDetails details_; |
249 }; | 249 }; |
250 | 250 |
251 | 251 |
252 OStream& operator<<(OStream& os, const LookupResult& r); | 252 OStream& operator<<(OStream& os, const LookupResult& r); |
253 } } // namespace v8::internal | 253 } } // namespace v8::internal |
254 | 254 |
255 #endif // V8_PROPERTY_H_ | 255 #endif // V8_PROPERTY_H_ |
OLD | NEW |