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

Side by Side Diff: src/lookup.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/keys.cc ('k') | src/messages.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/lookup.h" 5 #include "src/lookup.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/elements.h" 9 #include "src/elements.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 // Optimization that only works if configuration_ is not mutable. 489 // Optimization that only works if configuration_ is not mutable.
490 if (!check_prototype_chain()) return true; 490 if (!check_prototype_chain()) return true;
491 DisallowHeapAllocation no_gc; 491 DisallowHeapAllocation no_gc;
492 if (*receiver_ == *holder_) return true; 492 if (*receiver_ == *holder_) return true;
493 if (!receiver_->IsJSReceiver()) return false; 493 if (!receiver_->IsJSReceiver()) return false;
494 JSReceiver* current = JSReceiver::cast(*receiver_); 494 JSReceiver* current = JSReceiver::cast(*receiver_);
495 JSReceiver* object = *holder_; 495 JSReceiver* object = *holder_;
496 if (!current->map()->has_hidden_prototype()) return false; 496 if (!current->map()->has_hidden_prototype()) return false;
497 // JSProxy do not occur as hidden prototypes. 497 // JSProxy do not occur as hidden prototypes.
498 if (object->IsJSProxy()) return false; 498 if (object->IsJSProxy()) return false;
499 PrototypeIterator iter(isolate(), current, 499 PrototypeIterator iter(isolate(), current, kStartAtPrototype,
500 PrototypeIterator::START_AT_PROTOTYPE,
501 PrototypeIterator::END_AT_NON_HIDDEN); 500 PrototypeIterator::END_AT_NON_HIDDEN);
502 while (!iter.IsAtEnd()) { 501 while (!iter.IsAtEnd()) {
503 if (iter.GetCurrent<JSReceiver>() == object) return true; 502 if (iter.GetCurrent<JSReceiver>() == object) return true;
504 iter.Advance(); 503 iter.Advance();
505 } 504 }
506 return false; 505 return false;
507 } 506 }
508 507
509 508
510 Handle<Object> LookupIterator::FetchValue() const { 509 Handle<Object> LookupIterator::FetchValue() const {
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 case v8::internal::kAccessor: 752 case v8::internal::kAccessor:
754 return ACCESSOR; 753 return ACCESSOR;
755 } 754 }
756 755
757 UNREACHABLE(); 756 UNREACHABLE();
758 return state_; 757 return state_;
759 } 758 }
760 759
761 } // namespace internal 760 } // namespace internal
762 } // namespace v8 761 } // namespace v8
OLDNEW
« no previous file with comments | « src/keys.cc ('k') | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698