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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 void NotFound() { | 169 void NotFound() { |
170 has_property_ = false; | 170 has_property_ = false; |
171 state_ = NOT_FOUND; | 171 state_ = NOT_FOUND; |
172 } | 172 } |
173 | 173 |
174 Heap* heap() const { return isolate_->heap(); } | 174 Heap* heap() const { return isolate_->heap(); } |
175 Factory* factory() const { return isolate_->factory(); } | 175 Factory* factory() const { return isolate_->factory(); } |
176 Handle<Object> GetReceiver() const { return receiver_; } | 176 Handle<Object> GetReceiver() const { return receiver_; } |
177 | 177 |
178 Handle<JSObject> GetStoreTarget() const { | 178 Handle<JSObject> GetStoreTarget() const { |
| 179 DCHECK(receiver_->IsJSObject()); |
179 if (receiver_->IsJSGlobalProxy()) { | 180 if (receiver_->IsJSGlobalProxy()) { |
180 Map* map = JSGlobalProxy::cast(*receiver_)->map(); | 181 Map* map = JSGlobalProxy::cast(*receiver_)->map(); |
181 if (map->has_hidden_prototype()) { | 182 if (map->has_hidden_prototype()) { |
182 return handle(JSGlobalObject::cast(map->prototype()), isolate_); | 183 return handle(JSGlobalObject::cast(map->prototype()), isolate_); |
183 } | 184 } |
184 } | 185 } |
185 return Handle<JSObject>::cast(receiver_); | 186 return Handle<JSObject>::cast(receiver_); |
186 } | 187 } |
187 | 188 |
188 bool is_dictionary_holder() const { return !holder_->HasFastProperties(); } | 189 bool is_dictionary_holder() const { return !holder_->HasFastProperties(); } |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 const Handle<JSReceiver> initial_holder_; | 367 const Handle<JSReceiver> initial_holder_; |
367 const uint32_t index_; | 368 const uint32_t index_; |
368 uint32_t number_; | 369 uint32_t number_; |
369 }; | 370 }; |
370 | 371 |
371 | 372 |
372 } // namespace internal | 373 } // namespace internal |
373 } // namespace v8 | 374 } // namespace v8 |
374 | 375 |
375 #endif // V8_LOOKUP_H_ | 376 #endif // V8_LOOKUP_H_ |
OLD | NEW |