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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
9 #include "src/lookup.h" | 9 #include "src/lookup.h" |
10 #include "src/lookup-inl.h" | 10 #include "src/lookup-inl.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 FieldIndex field_index = FieldIndex::ForDescriptor(*holder_map_, number_); | 231 FieldIndex field_index = FieldIndex::ForDescriptor(*holder_map_, number_); |
232 return JSObject::FastPropertyAt(holder, property_details_.representation(), | 232 return JSObject::FastPropertyAt(holder, property_details_.representation(), |
233 field_index); | 233 field_index); |
234 } else { | 234 } else { |
235 result = holder_map_->instance_descriptors()->GetValue(number_); | 235 result = holder_map_->instance_descriptors()->GetValue(number_); |
236 } | 236 } |
237 return handle(result, isolate_); | 237 return handle(result, isolate_); |
238 } | 238 } |
239 | 239 |
240 | 240 |
| 241 int LookupIterator::GetAccessorIndex() const { |
| 242 DCHECK(has_property_); |
| 243 DCHECK(!holder_map_->is_dictionary_map()); |
| 244 DCHECK_EQ(v8::internal::ACCESSOR_CONSTANT, property_details_.type()); |
| 245 return descriptor_number(); |
| 246 } |
| 247 |
| 248 |
241 int LookupIterator::GetConstantIndex() const { | 249 int LookupIterator::GetConstantIndex() const { |
242 DCHECK(has_property_); | 250 DCHECK(has_property_); |
243 DCHECK(!holder_map_->is_dictionary_map()); | 251 DCHECK(!holder_map_->is_dictionary_map()); |
244 DCHECK_EQ(v8::internal::DATA_CONSTANT, property_details_.type()); | 252 DCHECK_EQ(v8::internal::DATA_CONSTANT, property_details_.type()); |
245 return descriptor_number(); | 253 return descriptor_number(); |
246 } | 254 } |
247 | 255 |
248 | 256 |
249 FieldIndex LookupIterator::GetFieldIndex() const { | 257 FieldIndex LookupIterator::GetFieldIndex() const { |
250 DCHECK(has_property_); | 258 DCHECK(has_property_); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 } | 337 } |
330 return false; | 338 return false; |
331 } | 339 } |
332 | 340 |
333 | 341 |
334 void LookupIterator::InternalizeName() { | 342 void LookupIterator::InternalizeName() { |
335 if (name_->IsUniqueName()) return; | 343 if (name_->IsUniqueName()) return; |
336 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); | 344 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); |
337 } | 345 } |
338 } } // namespace v8::internal | 346 } } // namespace v8::internal |
OLD | NEW |