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 return INTEGER_INDEXED_EXOTIC; |
| 50 } |
47 if (check_interceptor() && map->has_named_interceptor()) { | 51 if (check_interceptor() && map->has_named_interceptor()) { |
48 return INTERCEPTOR; | 52 return INTERCEPTOR; |
49 } | 53 } |
50 // Fall through. | 54 // Fall through. |
51 case INTERCEPTOR: | 55 case INTERCEPTOR: |
52 if (map->is_dictionary_map()) { | 56 if (map->is_dictionary_map()) { |
53 NameDictionary* dict = JSObject::cast(holder)->property_dictionary(); | 57 NameDictionary* dict = JSObject::cast(holder)->property_dictionary(); |
54 number_ = dict->FindEntry(name_); | 58 number_ = dict->FindEntry(name_); |
55 if (number_ == NameDictionary::kNotFound) return NOT_FOUND; | 59 if (number_ == NameDictionary::kNotFound) return NOT_FOUND; |
56 property_details_ = dict->DetailsAt(number_); | 60 property_details_ = dict->DetailsAt(number_); |
(...skipping 11 matching lines...) Expand all Loading... |
68 has_property_ = true; | 72 has_property_ = true; |
69 switch (property_details_.kind()) { | 73 switch (property_details_.kind()) { |
70 case v8::internal::kData: | 74 case v8::internal::kData: |
71 return DATA; | 75 return DATA; |
72 case v8::internal::kAccessor: | 76 case v8::internal::kAccessor: |
73 return ACCESSOR; | 77 return ACCESSOR; |
74 } | 78 } |
75 case ACCESSOR: | 79 case ACCESSOR: |
76 case DATA: | 80 case DATA: |
77 return NOT_FOUND; | 81 return NOT_FOUND; |
| 82 case INTEGER_INDEXED_EXOTIC: |
78 case JSPROXY: | 83 case JSPROXY: |
79 case TRANSITION: | 84 case TRANSITION: |
80 UNREACHABLE(); | 85 UNREACHABLE(); |
81 } | 86 } |
82 UNREACHABLE(); | 87 UNREACHABLE(); |
83 return state_; | 88 return state_; |
84 } | 89 } |
85 } | 90 } |
86 } // namespace v8::internal | 91 } // namespace v8::internal |
87 | 92 |
88 #endif // V8_LOOKUP_INL_H_ | 93 #endif // V8_LOOKUP_INL_H_ |
OLD | NEW |