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

Side by Side Diff: src/ic/ic.cc

Issue 2728293005: [ic] Completely unroll polymorphic IC map checks (Closed)
Patch Set: Remove assert for maximal size Created 3 years, 9 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
« src/ic/accessor-assembler.cc ('K') | « src/ic/ic.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/ic.h" 5 #include "src/ic/ic.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/api-arguments-inl.h" 10 #include "src/api-arguments-inl.h"
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 handler_to_overwrite = i; 764 handler_to_overwrite = i;
765 } else if (handler_to_overwrite == -1 && 765 } else if (handler_to_overwrite == -1 &&
766 IsTransitionOfMonomorphicTarget(*current_map, *map)) { 766 IsTransitionOfMonomorphicTarget(*current_map, *map)) {
767 handler_to_overwrite = i; 767 handler_to_overwrite = i;
768 } 768 }
769 } 769 }
770 770
771 int number_of_valid_maps = 771 int number_of_valid_maps =
772 number_of_maps - deprecated_maps - (handler_to_overwrite != -1); 772 number_of_maps - deprecated_maps - (handler_to_overwrite != -1);
773 773
774 if (number_of_valid_maps >= 4) return false; 774 if (number_of_valid_maps >= kMaxPolymorphicMapCount) return false;
775 if (number_of_maps == 0 && state() != MONOMORPHIC && state() != POLYMORPHIC) { 775 if (number_of_maps == 0 && state() != MONOMORPHIC && state() != POLYMORPHIC) {
776 return false; 776 return false;
777 } 777 }
778 DCHECK(UseVector()); 778 DCHECK(UseVector());
779 if (!nexus()->FindHandlers(&handlers, maps.length())) return false; 779 if (!nexus()->FindHandlers(&handlers, maps.length())) return false;
780 780
781 number_of_valid_maps++; 781 number_of_valid_maps++;
782 if (number_of_valid_maps > 1 && is_keyed()) return false; 782 if (number_of_valid_maps > 1 && is_keyed()) return false;
783 if (number_of_valid_maps == 1) { 783 if (number_of_valid_maps == 1) {
784 ConfigureVectorState(name, receiver_map(), handler); 784 ConfigureVectorState(name, receiver_map(), handler);
(...skipping 2428 matching lines...) Expand 10 before | Expand all | Expand 10 after
3213 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); 3213 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state());
3214 it.Next(); 3214 it.Next();
3215 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, 3215 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
3216 Object::GetProperty(&it)); 3216 Object::GetProperty(&it));
3217 } 3217 }
3218 3218
3219 return *result; 3219 return *result;
3220 } 3220 }
3221 } // namespace internal 3221 } // namespace internal
3222 } // namespace v8 3222 } // namespace v8
OLDNEW
« src/ic/accessor-assembler.cc ('K') | « src/ic/ic.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698