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_H_ | 5 #ifndef V8_LOOKUP_H_ |
6 #define V8_LOOKUP_H_ | 6 #define V8_LOOKUP_H_ |
7 | 7 |
8 #include "src/factory.h" | 8 #include "src/factory.h" |
9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 property_details_(PropertyDetails::Empty()), | 52 property_details_(PropertyDetails::Empty()), |
53 isolate_(name->GetIsolate()), | 53 isolate_(name->GetIsolate()), |
54 name_(name), | 54 name_(name), |
55 // kMaxUInt32 isn't a valid index. | 55 // kMaxUInt32 isn't a valid index. |
56 index_(kMaxUInt32), | 56 index_(kMaxUInt32), |
57 receiver_(receiver), | 57 receiver_(receiver), |
58 holder_(GetRoot(receiver_, isolate_)), | 58 holder_(GetRoot(receiver_, isolate_)), |
59 holder_map_(holder_->map(), isolate_), | 59 holder_map_(holder_->map(), isolate_), |
60 initial_holder_(holder_), | 60 initial_holder_(holder_), |
61 number_(DescriptorArray::kNotFound) { | 61 number_(DescriptorArray::kNotFound) { |
| 62 #if 0 // TODO(verwaest): Enable once blocking hacks are removed. |
| 63 #ifdef DEBUG |
| 64 uint32_t index; // Assert that the name is not an array index. |
| 65 DCHECK(!name->AsArrayIndex(&index)); |
| 66 #endif // DEBUG |
| 67 #endif |
62 Next(); | 68 Next(); |
63 } | 69 } |
64 | 70 |
65 LookupIterator(Handle<Object> receiver, Handle<Name> name, | 71 LookupIterator(Handle<Object> receiver, Handle<Name> name, |
66 Handle<JSReceiver> holder, | 72 Handle<JSReceiver> holder, |
67 Configuration configuration = PROTOTYPE_CHAIN) | 73 Configuration configuration = PROTOTYPE_CHAIN) |
68 : configuration_(ComputeConfiguration(configuration, name)), | 74 : configuration_(ComputeConfiguration(configuration, name)), |
69 state_(NOT_FOUND), | 75 state_(NOT_FOUND), |
70 exotic_index_state_(ExoticIndexState::kUninitialized), | 76 exotic_index_state_(ExoticIndexState::kUninitialized), |
71 interceptor_state_(InterceptorState::kUninitialized), | 77 interceptor_state_(InterceptorState::kUninitialized), |
72 property_details_(PropertyDetails::Empty()), | 78 property_details_(PropertyDetails::Empty()), |
73 isolate_(name->GetIsolate()), | 79 isolate_(name->GetIsolate()), |
74 name_(name), | 80 name_(name), |
75 // kMaxUInt32 isn't a valid index. | 81 // kMaxUInt32 isn't a valid index. |
76 index_(kMaxUInt32), | 82 index_(kMaxUInt32), |
77 receiver_(receiver), | 83 receiver_(receiver), |
78 holder_(holder), | 84 holder_(holder), |
79 holder_map_(holder_->map(), isolate_), | 85 holder_map_(holder_->map(), isolate_), |
80 initial_holder_(holder_), | 86 initial_holder_(holder_), |
81 number_(DescriptorArray::kNotFound) { | 87 number_(DescriptorArray::kNotFound) { |
| 88 #if 0 // TODO(verwaest): Enable once blocking hacks are removed. |
| 89 #ifdef DEBUG |
| 90 uint32_t index; // Assert that the name is not an array index. |
| 91 DCHECK(!name->AsArrayIndex(&index)); |
| 92 #endif // DEBUG |
| 93 #endif |
82 Next(); | 94 Next(); |
83 } | 95 } |
84 | 96 |
85 LookupIterator(Isolate* isolate, Handle<Object> receiver, uint32_t index, | 97 LookupIterator(Isolate* isolate, Handle<Object> receiver, uint32_t index, |
86 Configuration configuration = PROTOTYPE_CHAIN) | 98 Configuration configuration = PROTOTYPE_CHAIN) |
87 : configuration_(configuration), | 99 : configuration_(configuration), |
88 state_(NOT_FOUND), | 100 state_(NOT_FOUND), |
89 exotic_index_state_(ExoticIndexState::kUninitialized), | 101 exotic_index_state_(ExoticIndexState::kUninitialized), |
90 interceptor_state_(InterceptorState::kUninitialized), | 102 interceptor_state_(InterceptorState::kUninitialized), |
91 property_details_(PropertyDetails::Empty()), | 103 property_details_(PropertyDetails::Empty()), |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 Handle<JSReceiver> holder_; | 286 Handle<JSReceiver> holder_; |
275 Handle<Map> holder_map_; | 287 Handle<Map> holder_map_; |
276 const Handle<JSReceiver> initial_holder_; | 288 const Handle<JSReceiver> initial_holder_; |
277 uint32_t number_; | 289 uint32_t number_; |
278 }; | 290 }; |
279 | 291 |
280 | 292 |
281 } } // namespace v8::internal | 293 } } // namespace v8::internal |
282 | 294 |
283 #endif // V8_LOOKUP_H_ | 295 #endif // V8_LOOKUP_H_ |
OLD | NEW |