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_LOOKUP_H_ | 5 #ifndef V8_LOOKUP_H_ |
6 #define V8_LOOKUP_H_ | 6 #define V8_LOOKUP_H_ |
7 | 7 |
8 #include "src/factory.h" | 8 #include "src/factory.h" |
9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 PropertyAttributes attributes, | 124 PropertyAttributes attributes, |
125 Object::StoreFromKeyed store_mode); | 125 Object::StoreFromKeyed store_mode); |
126 PropertyKind property_kind() const { | 126 PropertyKind property_kind() const { |
127 ASSERT(has_property_); | 127 ASSERT(has_property_); |
128 return property_kind_; | 128 return property_kind_; |
129 } | 129 } |
130 PropertyDetails property_details() const { | 130 PropertyDetails property_details() const { |
131 ASSERT(has_property_); | 131 ASSERT(has_property_); |
132 return property_details_; | 132 return property_details_; |
133 } | 133 } |
| 134 bool has_fast_properties() const { return !holder_map_->is_dictionary_map(); } |
134 int descriptor_number() const { | 135 int descriptor_number() const { |
135 ASSERT(has_property_); | 136 ASSERT(has_property_); |
136 ASSERT_EQ(DESCRIPTOR, property_encoding_); | 137 ASSERT_EQ(DESCRIPTOR, property_encoding_); |
137 return number_; | 138 return number_; |
138 } | 139 } |
| 140 int dictionary_entry() const { |
| 141 ASSERT(has_property_); |
| 142 ASSERT_EQ(DICTIONARY, property_encoding_); |
| 143 return number_; |
| 144 } |
| 145 bool IsConfigurable() const { return !property_details().IsDontDelete(); } |
| 146 Representation representation() const { |
| 147 return property_details().representation(); |
| 148 } |
| 149 FieldIndex GetFieldIndex() const { |
| 150 ASSERT_EQ(PROPERTY, state_); |
| 151 return FieldIndex::ForLookupIterator(this); |
| 152 } |
139 Handle<Object> GetAccessors() const; | 153 Handle<Object> GetAccessors() const; |
140 Handle<Object> GetDataValue() const; | 154 Handle<Object> GetDataValue() const; |
141 void WriteDataValue(Handle<Object> value); | 155 void WriteDataValue(Handle<Object> value); |
142 | 156 |
143 void InternalizeName(); | 157 void InternalizeName(); |
144 | 158 |
145 private: | 159 private: |
146 Handle<Map> GetReceiverMap() const; | 160 Handle<Map> GetReceiverMap() const; |
147 | 161 |
148 MUST_USE_RESULT bool NextHolder(); | 162 MUST_USE_RESULT bool NextHolder(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 MaybeHandle<Object> maybe_receiver_; | 197 MaybeHandle<Object> maybe_receiver_; |
184 MaybeHandle<JSReceiver> maybe_holder_; | 198 MaybeHandle<JSReceiver> maybe_holder_; |
185 | 199 |
186 int number_; | 200 int number_; |
187 }; | 201 }; |
188 | 202 |
189 | 203 |
190 } } // namespace v8::internal | 204 } } // namespace v8::internal |
191 | 205 |
192 #endif // V8_LOOKUP_H_ | 206 #endif // V8_LOOKUP_H_ |
OLD | NEW |