Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/ic/handler-compiler.cc

Issue 1402393003: Ensure JSProxy correctness for PrototypeIterator uses (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: reword comment Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698