| 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/ic/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
| 8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
| 9 #include "src/ic/ic-inl.h" | 9 #include "src/ic/ic-inl.h" |
| 10 #include "src/isolate-inl.h" | 10 #include "src/isolate-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 // Casting to JSObject is fine here. The LookupIterator makes sure to |
| 334 // look behind non-masking interceptors during the original lookup, and |
| 335 // we wouldn't try to compile a handler if there was a Proxy anywhere. |
| 333 last = iter.GetCurrent<JSObject>(); | 336 last = iter.GetCurrent<JSObject>(); |
| 334 iter.Advance(); | 337 iter.Advance(); |
| 335 } | 338 } |
| 336 auto last_handle = handle(last); | 339 auto last_handle = handle(last); |
| 337 set_holder(last_handle); | 340 set_holder(last_handle); |
| 338 } | 341 } |
| 339 Register reg = FrontendHeader(receiver(), it->name(), &miss, RETURN_HOLDER); | 342 Register reg = FrontendHeader(receiver(), it->name(), &miss, RETURN_HOLDER); |
| 340 // Reset the holder so further calculations are correct. | 343 // Reset the holder so further calculations are correct. |
| 341 set_holder(holder_orig); | 344 set_holder(holder_orig); |
| 342 if (lost_holder_register) { | 345 if (lost_holder_register) { |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 : kNoExtraICState); | 605 : kNoExtraICState); |
| 603 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); | 606 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); |
| 604 } | 607 } |
| 605 } | 608 } |
| 606 | 609 |
| 607 handlers->Add(cached_stub); | 610 handlers->Add(cached_stub); |
| 608 } | 611 } |
| 609 } | 612 } |
| 610 } // namespace internal | 613 } // namespace internal |
| 611 } // namespace v8 | 614 } // namespace v8 |
| OLD | NEW |