| 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/ic/handler-compiler.h" | 5 #include "src/ic/handler-compiler.h" |
| 6 | 6 |
| 7 #include "src/cpu-profiler.h" | 7 #include "src/cpu-profiler.h" |
| 8 #include "src/ic/call-optimization.h" | 8 #include "src/ic/call-optimization.h" |
| 9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
| 10 #include "src/ic/ic-inl.h" | 10 #include "src/ic/ic-inl.h" |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 bool lost_holder_register = false; | 323 bool lost_holder_register = false; |
| 324 auto holder_orig = holder(); | 324 auto holder_orig = holder(); |
| 325 // non masking interceptors must check the entire chain, so temporarily reset | 325 // non masking interceptors must check the entire chain, so temporarily reset |
| 326 // the holder to be that last element for the FrontendHeader call. | 326 // the holder to be that last element for the FrontendHeader call. |
| 327 if (holder()->GetNamedInterceptor()->non_masking()) { | 327 if (holder()->GetNamedInterceptor()->non_masking()) { |
| 328 DCHECK(!inline_followup); | 328 DCHECK(!inline_followup); |
| 329 JSObject* last = *holder(); | 329 JSObject* last = *holder(); |
| 330 PrototypeIterator iter(isolate(), last); | 330 PrototypeIterator iter(isolate(), last); |
| 331 while (!iter.IsAtEnd()) { | 331 while (!iter.IsAtEnd()) { |
| 332 lost_holder_register = true; | 332 lost_holder_register = true; |
| 333 last = JSObject::cast(iter.GetCurrent()); | 333 last = iter.GetCurrent<JSObject>(); |
| 334 iter.Advance(); | 334 iter.Advance(); |
| 335 } | 335 } |
| 336 auto last_handle = handle(last); | 336 auto last_handle = handle(last); |
| 337 set_holder(last_handle); | 337 set_holder(last_handle); |
| 338 } | 338 } |
| 339 Register reg = FrontendHeader(receiver(), it->name(), &miss, RETURN_HOLDER); | 339 Register reg = FrontendHeader(receiver(), it->name(), &miss, RETURN_HOLDER); |
| 340 // Reset the holder so further calculations are correct. | 340 // Reset the holder so further calculations are correct. |
| 341 set_holder(holder_orig); | 341 set_holder(holder_orig); |
| 342 if (lost_holder_register) { | 342 if (lost_holder_register) { |
| 343 if (*it->GetReceiver() == *holder()) { | 343 if (*it->GetReceiver() == *holder()) { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 // Check that we are allowed to write this. | 429 // Check that we are allowed to write this. |
| 430 bool is_nonexistent = holder()->map() == transition->GetBackPointer(); | 430 bool is_nonexistent = holder()->map() == transition->GetBackPointer(); |
| 431 if (is_nonexistent) { | 431 if (is_nonexistent) { |
| 432 // Find the top object. | 432 // Find the top object. |
| 433 Handle<JSObject> last; | 433 Handle<JSObject> last; |
| 434 PrototypeIterator::WhereToEnd end = | 434 PrototypeIterator::WhereToEnd end = |
| 435 name->IsPrivate() ? PrototypeIterator::END_AT_NON_HIDDEN | 435 name->IsPrivate() ? PrototypeIterator::END_AT_NON_HIDDEN |
| 436 : PrototypeIterator::END_AT_NULL; | 436 : PrototypeIterator::END_AT_NULL; |
| 437 PrototypeIterator iter(isolate(), holder()); | 437 PrototypeIterator iter(isolate(), holder()); |
| 438 while (!iter.IsAtEnd(end)) { | 438 while (!iter.IsAtEnd(end)) { |
| 439 last = Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter)); | 439 last = PrototypeIterator::GetCurrent<JSObject>(iter); |
| 440 iter.Advance(); | 440 iter.Advance(); |
| 441 } | 441 } |
| 442 if (!last.is_null()) set_holder(last); | 442 if (!last.is_null()) set_holder(last); |
| 443 NonexistentFrontendHeader(name, &miss, scratch1(), scratch2()); | 443 NonexistentFrontendHeader(name, &miss, scratch1(), scratch2()); |
| 444 } else { | 444 } else { |
| 445 FrontendHeader(receiver(), name, &miss, DONT_RETURN_ANYTHING); | 445 FrontendHeader(receiver(), name, &miss, DONT_RETURN_ANYTHING); |
| 446 DCHECK(holder()->HasFastProperties()); | 446 DCHECK(holder()->HasFastProperties()); |
| 447 } | 447 } |
| 448 | 448 |
| 449 int descriptor = transition->LastAdded(); | 449 int descriptor = transition->LastAdded(); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 : kNoExtraICState); | 600 : kNoExtraICState); |
| 601 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); | 601 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); |
| 602 } | 602 } |
| 603 } | 603 } |
| 604 | 604 |
| 605 handlers->Add(cached_stub); | 605 handlers->Add(cached_stub); |
| 606 } | 606 } |
| 607 } | 607 } |
| 608 } // namespace internal | 608 } // namespace internal |
| 609 } // namespace v8 | 609 } // namespace v8 |
| OLD | NEW |