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_INL_H_ | 5 #ifndef V8_LOOKUP_INL_H_ |
6 #define V8_LOOKUP_INL_H_ | 6 #define V8_LOOKUP_INL_H_ |
7 | 7 |
8 #include "src/lookup.h" | 8 #include "src/lookup.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 26 matching lines...) Expand all Loading... |
37 DisallowHeapAllocation no_gc; | 37 DisallowHeapAllocation no_gc; |
38 switch (state_) { | 38 switch (state_) { |
39 case NOT_FOUND: | 39 case NOT_FOUND: |
40 if (map->IsJSProxyMap()) return JSPROXY; | 40 if (map->IsJSProxyMap()) return JSPROXY; |
41 if (map->is_access_check_needed() && | 41 if (map->is_access_check_needed() && |
42 !isolate_->IsInternallyUsedPropertyName(name_)) { | 42 !isolate_->IsInternallyUsedPropertyName(name_)) { |
43 return ACCESS_CHECK; | 43 return ACCESS_CHECK; |
44 } | 44 } |
45 // Fall through. | 45 // Fall through. |
46 case ACCESS_CHECK: | 46 case ACCESS_CHECK: |
| 47 if (exotic_index_state_ != ExoticIndexState::kNoIndex && |
| 48 IsIntegerIndexedExotic(holder)) { |
| 49 has_property_ = true; |
| 50 return INTEGER_INDEXED_EXOTIC; |
| 51 } |
47 if (check_interceptor() && map->has_named_interceptor()) { | 52 if (check_interceptor() && map->has_named_interceptor()) { |
48 return INTERCEPTOR; | 53 return INTERCEPTOR; |
49 } | 54 } |
50 // Fall through. | 55 // Fall through. |
51 case INTERCEPTOR: | 56 case INTERCEPTOR: |
52 if (map->is_dictionary_map()) { | 57 if (map->is_dictionary_map()) { |
53 NameDictionary* dict = JSObject::cast(holder)->property_dictionary(); | 58 NameDictionary* dict = JSObject::cast(holder)->property_dictionary(); |
54 number_ = dict->FindEntry(name_); | 59 number_ = dict->FindEntry(name_); |
55 if (number_ == NameDictionary::kNotFound) return NOT_FOUND; | 60 if (number_ == NameDictionary::kNotFound) return NOT_FOUND; |
56 property_details_ = dict->DetailsAt(number_); | 61 property_details_ = dict->DetailsAt(number_); |
(...skipping 11 matching lines...) Expand all Loading... |
68 has_property_ = true; | 73 has_property_ = true; |
69 switch (property_details_.kind()) { | 74 switch (property_details_.kind()) { |
70 case v8::internal::kData: | 75 case v8::internal::kData: |
71 return DATA; | 76 return DATA; |
72 case v8::internal::kAccessor: | 77 case v8::internal::kAccessor: |
73 return ACCESSOR; | 78 return ACCESSOR; |
74 } | 79 } |
75 case ACCESSOR: | 80 case ACCESSOR: |
76 case DATA: | 81 case DATA: |
77 return NOT_FOUND; | 82 return NOT_FOUND; |
| 83 case INTEGER_INDEXED_EXOTIC: |
78 case JSPROXY: | 84 case JSPROXY: |
79 case TRANSITION: | 85 case TRANSITION: |
80 UNREACHABLE(); | 86 UNREACHABLE(); |
81 } | 87 } |
82 UNREACHABLE(); | 88 UNREACHABLE(); |
83 return state_; | 89 return state_; |
84 } | 90 } |
85 } | 91 } |
86 } // namespace v8::internal | 92 } // namespace v8::internal |
87 | 93 |
88 #endif // V8_LOOKUP_INL_H_ | 94 #endif // V8_LOOKUP_INL_H_ |
OLD | NEW |