| 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/lookup.h" | 5 #include "src/lookup.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/elements.h" | 9 #include "src/elements.h" |
| 10 #include "src/field-type.h" | 10 #include "src/field-type.h" |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 Map* const map, JSReceiver* const holder) { | 797 Map* const map, JSReceiver* const holder) { |
| 798 DisallowHeapAllocation no_gc; | 798 DisallowHeapAllocation no_gc; |
| 799 if (interceptor_state_ == InterceptorState::kProcessNonMasking) { | 799 if (interceptor_state_ == InterceptorState::kProcessNonMasking) { |
| 800 return NOT_FOUND; | 800 return NOT_FOUND; |
| 801 } | 801 } |
| 802 | 802 |
| 803 if (is_element) { | 803 if (is_element) { |
| 804 JSObject* js_object = JSObject::cast(holder); | 804 JSObject* js_object = JSObject::cast(holder); |
| 805 ElementsAccessor* accessor = js_object->GetElementsAccessor(); | 805 ElementsAccessor* accessor = js_object->GetElementsAccessor(); |
| 806 FixedArrayBase* backing_store = js_object->elements(); | 806 FixedArrayBase* backing_store = js_object->elements(); |
| 807 number_ = accessor->GetEntryForIndex(js_object, backing_store, index_); | 807 number_ = |
| 808 accessor->GetEntryForIndex(isolate_, js_object, backing_store, index_); |
| 808 if (number_ == kMaxUInt32) { | 809 if (number_ == kMaxUInt32) { |
| 809 return holder->IsJSTypedArray() ? INTEGER_INDEXED_EXOTIC : NOT_FOUND; | 810 return holder->IsJSTypedArray() ? INTEGER_INDEXED_EXOTIC : NOT_FOUND; |
| 810 } | 811 } |
| 811 property_details_ = accessor->GetDetails(js_object, number_); | 812 property_details_ = accessor->GetDetails(js_object, number_); |
| 812 } else if (!map->is_dictionary_map()) { | 813 } else if (!map->is_dictionary_map()) { |
| 813 DescriptorArray* descriptors = map->instance_descriptors(); | 814 DescriptorArray* descriptors = map->instance_descriptors(); |
| 814 int number = descriptors->SearchWithCache(isolate_, *name_, map); | 815 int number = descriptors->SearchWithCache(isolate_, *name_, map); |
| 815 if (number == DescriptorArray::kNotFound) return NotFound(holder); | 816 if (number == DescriptorArray::kNotFound) return NotFound(holder); |
| 816 number_ = static_cast<uint32_t>(number); | 817 number_ = static_cast<uint32_t>(number); |
| 817 property_details_ = descriptors->GetDetails(number_); | 818 property_details_ = descriptors->GetDetails(number_); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 | 868 |
| 868 // We have found a cached property! Modify the iterator accordingly. | 869 // We have found a cached property! Modify the iterator accordingly. |
| 869 name_ = maybe_name.ToHandleChecked(); | 870 name_ = maybe_name.ToHandleChecked(); |
| 870 Restart(); | 871 Restart(); |
| 871 CHECK_EQ(state(), LookupIterator::DATA); | 872 CHECK_EQ(state(), LookupIterator::DATA); |
| 872 return true; | 873 return true; |
| 873 } | 874 } |
| 874 | 875 |
| 875 } // namespace internal | 876 } // namespace internal |
| 876 } // namespace v8 | 877 } // namespace v8 |
| OLD | NEW |