OLD | NEW |
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 "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-arguments-inl.h" | 8 #include "src/api-arguments-inl.h" |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 | 727 |
728 if (number_of_valid_maps >= 4) return false; | 728 if (number_of_valid_maps >= 4) return false; |
729 if (number_of_maps == 0 && state() != MONOMORPHIC && state() != POLYMORPHIC) { | 729 if (number_of_maps == 0 && state() != MONOMORPHIC && state() != POLYMORPHIC) { |
730 return false; | 730 return false; |
731 } | 731 } |
732 DCHECK(UseVector()); | 732 DCHECK(UseVector()); |
733 if (!nexus()->FindHandlers(&handlers, maps.length())) return false; | 733 if (!nexus()->FindHandlers(&handlers, maps.length())) return false; |
734 | 734 |
735 number_of_valid_maps++; | 735 number_of_valid_maps++; |
736 if (number_of_valid_maps > 1 && is_keyed()) return false; | 736 if (number_of_valid_maps > 1 && is_keyed()) return false; |
737 Handle<Code> ic; | |
738 if (number_of_valid_maps == 1) { | 737 if (number_of_valid_maps == 1) { |
739 ConfigureVectorState(name, receiver_map(), code); | 738 ConfigureVectorState(name, receiver_map(), code); |
740 } else { | 739 } else { |
741 if (handler_to_overwrite >= 0) { | 740 if (handler_to_overwrite >= 0) { |
742 handlers.Set(handler_to_overwrite, code); | 741 handlers.Set(handler_to_overwrite, code); |
743 if (!map.is_identical_to(maps.at(handler_to_overwrite))) { | 742 if (!map.is_identical_to(maps.at(handler_to_overwrite))) { |
744 maps.Set(handler_to_overwrite, map); | 743 maps.Set(handler_to_overwrite, map); |
745 } | 744 } |
746 } else { | 745 } else { |
747 maps.Add(map); | 746 maps.Add(map); |
(...skipping 2166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2914 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); | 2913 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); |
2915 it.Next(); | 2914 it.Next(); |
2916 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 2915 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
2917 Object::GetProperty(&it)); | 2916 Object::GetProperty(&it)); |
2918 } | 2917 } |
2919 | 2918 |
2920 return *result; | 2919 return *result; |
2921 } | 2920 } |
2922 } // namespace internal | 2921 } // namespace internal |
2923 } // namespace v8 | 2922 } // namespace v8 |
OLD | NEW |