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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 void LookupIterator::Next() { | 67 void LookupIterator::Next() { |
68 DCHECK_NE(JSPROXY, state_); | 68 DCHECK_NE(JSPROXY, state_); |
69 DCHECK_NE(TRANSITION, state_); | 69 DCHECK_NE(TRANSITION, state_); |
70 DisallowHeapAllocation no_gc; | 70 DisallowHeapAllocation no_gc; |
71 has_property_ = false; | 71 has_property_ = false; |
72 | 72 |
73 JSReceiver* holder = *holder_; | 73 JSReceiver* holder = *holder_; |
74 Map* map = holder->map(); | 74 Map* map = holder->map(); |
75 | 75 |
76 if (map->IsSpecialReceiverMap()) { | 76 if (map->instance_type() <= LAST_SPECIAL_RECEIVER_TYPE) { |
77 state_ = IsElement() ? LookupInSpecialHolder<true>(map, holder) | 77 state_ = IsElement() ? LookupInSpecialHolder<true>(map, holder) |
78 : LookupInSpecialHolder<false>(map, holder); | 78 : LookupInSpecialHolder<false>(map, holder); |
79 if (IsFound()) return; | 79 if (IsFound()) return; |
80 } | 80 } |
81 | 81 |
82 IsElement() ? NextInternal<true>(map, holder) | 82 IsElement() ? NextInternal<true>(map, holder) |
83 : NextInternal<false>(map, holder); | 83 : NextInternal<false>(map, holder); |
84 } | 84 } |
85 | 85 |
86 template <bool is_element> | 86 template <bool is_element> |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 | 870 |
871 // We have found a cached property! Modify the iterator accordingly. | 871 // We have found a cached property! Modify the iterator accordingly. |
872 name_ = maybe_name.ToHandleChecked(); | 872 name_ = maybe_name.ToHandleChecked(); |
873 Restart(); | 873 Restart(); |
874 CHECK_EQ(state(), LookupIterator::DATA); | 874 CHECK_EQ(state(), LookupIterator::DATA); |
875 return true; | 875 return true; |
876 } | 876 } |
877 | 877 |
878 } // namespace internal | 878 } // namespace internal |
879 } // namespace v8 | 879 } // namespace v8 |
OLD | NEW |