| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
| 9 #include "src/lookup.h" | 9 #include "src/lookup.h" |
| 10 #include "src/lookup-inl.h" | 10 #include "src/lookup-inl.h" |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 245 |
| 246 JSObject::ReoptimizeIfPrototype(receiver); | 246 JSObject::ReoptimizeIfPrototype(receiver); |
| 247 holder_map_ = handle(receiver->map(), isolate_); | 247 holder_map_ = handle(receiver->map(), isolate_); |
| 248 ReloadPropertyInformation(); | 248 ReloadPropertyInformation(); |
| 249 } | 249 } |
| 250 | 250 |
| 251 | 251 |
| 252 bool LookupIterator::HolderIsReceiverOrHiddenPrototype() const { | 252 bool LookupIterator::HolderIsReceiverOrHiddenPrototype() const { |
| 253 DCHECK(has_property_ || state_ == INTERCEPTOR || state_ == JSPROXY); | 253 DCHECK(has_property_ || state_ == INTERCEPTOR || state_ == JSPROXY); |
| 254 // Optimization that only works if configuration_ is not mutable. | 254 // Optimization that only works if configuration_ is not mutable. |
| 255 if (!check_derived()) return true; | 255 if (!check_prototype_chain()) return true; |
| 256 DisallowHeapAllocation no_gc; | 256 DisallowHeapAllocation no_gc; |
| 257 Handle<Object> receiver = GetReceiver(); | 257 Handle<Object> receiver = GetReceiver(); |
| 258 if (!receiver->IsJSReceiver()) return false; | 258 if (!receiver->IsJSReceiver()) return false; |
| 259 Object* current = *receiver; | 259 Object* current = *receiver; |
| 260 JSReceiver* holder = *maybe_holder_.ToHandleChecked(); | 260 JSReceiver* holder = *maybe_holder_.ToHandleChecked(); |
| 261 // JSProxy do not occur as hidden prototypes. | 261 // JSProxy do not occur as hidden prototypes. |
| 262 if (current->IsJSProxy()) { | 262 if (current->IsJSProxy()) { |
| 263 return JSReceiver::cast(current) == holder; | 263 return JSReceiver::cast(current) == holder; |
| 264 } | 264 } |
| 265 PrototypeIterator iter(isolate(), current, | 265 PrototypeIterator iter(isolate(), current, |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 DCHECK_EQ(v8::internal::CONSTANT, property_details_.type()); | 377 DCHECK_EQ(v8::internal::CONSTANT, property_details_.type()); |
| 378 } | 378 } |
| 379 } | 379 } |
| 380 | 380 |
| 381 | 381 |
| 382 void LookupIterator::InternalizeName() { | 382 void LookupIterator::InternalizeName() { |
| 383 if (name_->IsUniqueName()) return; | 383 if (name_->IsUniqueName()) return; |
| 384 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); | 384 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); |
| 385 } | 385 } |
| 386 } } // namespace v8::internal | 386 } } // namespace v8::internal |
| OLD | NEW |