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 28 matching lines...) Expand all Loading... |
39 TRANSITION, | 39 TRANSITION, |
40 // Set state_ to BEFORE_PROPERTY to ensure that the next lookup will be a | 40 // Set state_ to BEFORE_PROPERTY to ensure that the next lookup will be a |
41 // PROPERTY lookup. | 41 // PROPERTY lookup. |
42 BEFORE_PROPERTY = INTERCEPTOR | 42 BEFORE_PROPERTY = INTERCEPTOR |
43 }; | 43 }; |
44 | 44 |
45 LookupIterator(Handle<Object> receiver, Handle<Name> name, | 45 LookupIterator(Handle<Object> receiver, Handle<Name> name, |
46 Configuration configuration = PROTOTYPE_CHAIN) | 46 Configuration configuration = PROTOTYPE_CHAIN) |
47 : configuration_(ComputeConfiguration(configuration, name)), | 47 : configuration_(ComputeConfiguration(configuration, name)), |
48 state_(NOT_FOUND), | 48 state_(NOT_FOUND), |
49 property_details_(NONE, FIELD, 0), | 49 property_details_(NONE, DATA_FIELD, 0), |
50 isolate_(name->GetIsolate()), | 50 isolate_(name->GetIsolate()), |
51 name_(name), | 51 name_(name), |
52 receiver_(receiver), | 52 receiver_(receiver), |
53 number_(DescriptorArray::kNotFound) { | 53 number_(DescriptorArray::kNotFound) { |
54 holder_ = GetRoot(); | 54 holder_ = GetRoot(); |
55 holder_map_ = handle(holder_->map(), isolate_); | 55 holder_map_ = handle(holder_->map(), isolate_); |
56 Next(); | 56 Next(); |
57 } | 57 } |
58 | 58 |
59 LookupIterator(Handle<Object> receiver, Handle<Name> name, | 59 LookupIterator(Handle<Object> receiver, Handle<Name> name, |
60 Handle<JSReceiver> holder, | 60 Handle<JSReceiver> holder, |
61 Configuration configuration = PROTOTYPE_CHAIN) | 61 Configuration configuration = PROTOTYPE_CHAIN) |
62 : configuration_(ComputeConfiguration(configuration, name)), | 62 : configuration_(ComputeConfiguration(configuration, name)), |
63 state_(NOT_FOUND), | 63 state_(NOT_FOUND), |
64 property_details_(NONE, FIELD, 0), | 64 property_details_(NONE, DATA_FIELD, 0), |
65 isolate_(name->GetIsolate()), | 65 isolate_(name->GetIsolate()), |
66 name_(name), | 66 name_(name), |
67 holder_map_(holder->map(), isolate_), | 67 holder_map_(holder->map(), isolate_), |
68 receiver_(receiver), | 68 receiver_(receiver), |
69 holder_(holder), | 69 holder_(holder), |
70 number_(DescriptorArray::kNotFound) { | 70 number_(DescriptorArray::kNotFound) { |
71 Next(); | 71 Next(); |
72 } | 72 } |
73 | 73 |
74 Isolate* isolate() const { return isolate_; } | 74 Isolate* isolate() const { return isolate_; } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 Handle<Object> receiver_; | 197 Handle<Object> receiver_; |
198 Handle<JSReceiver> holder_; | 198 Handle<JSReceiver> holder_; |
199 | 199 |
200 int number_; | 200 int number_; |
201 }; | 201 }; |
202 | 202 |
203 | 203 |
204 } } // namespace v8::internal | 204 } } // namespace v8::internal |
205 | 205 |
206 #endif // V8_LOOKUP_H_ | 206 #endif // V8_LOOKUP_H_ |
OLD | NEW |