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

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

Issue 2036493006: Keep prototype maps in dictionary mode until ICs see them (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: make ignition tests happy Created 4 years, 6 months 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/globals.h ('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/field-type.h" 7 #include "src/field-type.h"
8 #include "src/ic/call-optimization.h" 8 #include "src/ic/call-optimization.h"
9 #include "src/ic/ic-inl.h" 9 #include "src/ic/ic-inl.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 PushVectorAndSlot(); 437 PushVectorAndSlot();
438 438
439 // Check that we are allowed to write this. 439 // Check that we are allowed to write this.
440 bool is_nonexistent = holder()->map() == transition->GetBackPointer(); 440 bool is_nonexistent = holder()->map() == transition->GetBackPointer();
441 if (is_nonexistent) { 441 if (is_nonexistent) {
442 // Find the top object. 442 // Find the top object.
443 Handle<JSObject> last; 443 Handle<JSObject> last;
444 PrototypeIterator::WhereToEnd end = 444 PrototypeIterator::WhereToEnd end =
445 name->IsPrivate() ? PrototypeIterator::END_AT_NON_HIDDEN 445 name->IsPrivate() ? PrototypeIterator::END_AT_NON_HIDDEN
446 : PrototypeIterator::END_AT_NULL; 446 : PrototypeIterator::END_AT_NULL;
447 PrototypeIterator iter(isolate(), holder(), 447 PrototypeIterator iter(isolate(), holder(), kStartAtPrototype, end);
448 PrototypeIterator::START_AT_PROTOTYPE, end);
449 while (!iter.IsAtEnd()) { 448 while (!iter.IsAtEnd()) {
450 last = PrototypeIterator::GetCurrent<JSObject>(iter); 449 last = PrototypeIterator::GetCurrent<JSObject>(iter);
451 iter.Advance(); 450 iter.Advance();
452 } 451 }
453 if (!last.is_null()) set_holder(last); 452 if (!last.is_null()) set_holder(last);
454 NonexistentFrontendHeader(name, &miss, scratch1(), scratch2()); 453 NonexistentFrontendHeader(name, &miss, scratch1(), scratch2());
455 } else { 454 } else {
456 FrontendHeader(receiver(), name, &miss, DONT_RETURN_ANYTHING); 455 FrontendHeader(receiver(), name, &miss, DONT_RETURN_ANYTHING);
457 DCHECK(holder()->HasFastProperties()); 456 DCHECK(holder()->HasFastProperties());
458 } 457 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 LoadICState state = LoadICState(kNoExtraICState); 606 LoadICState state = LoadICState(kNoExtraICState);
608 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); 607 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode();
609 } 608 }
610 } 609 }
611 610
612 handlers->Add(cached_stub); 611 handlers->Add(cached_stub);
613 } 612 }
614 } 613 }
615 } // namespace internal 614 } // namespace internal
616 } // namespace v8 615 } // namespace v8
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698