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

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

Issue 2083323002: Version 5.0.71.54 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.0
Patch Set: 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/crankshaft/hydrogen.cc ('k') | src/ic/ic-compiler.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 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.h" 8 #include "src/api.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 } 829 }
830 } 830 }
831 831
832 832
833 bool IC::IsTransitionOfMonomorphicTarget(Map* source_map, Map* target_map) { 833 bool IC::IsTransitionOfMonomorphicTarget(Map* source_map, Map* target_map) {
834 if (source_map == NULL) return true; 834 if (source_map == NULL) return true;
835 if (target_map == NULL) return false; 835 if (target_map == NULL) return false;
836 ElementsKind target_elements_kind = target_map->elements_kind(); 836 ElementsKind target_elements_kind = target_map->elements_kind();
837 bool more_general_transition = IsMoreGeneralElementsKindTransition( 837 bool more_general_transition = IsMoreGeneralElementsKindTransition(
838 source_map->elements_kind(), target_elements_kind); 838 source_map->elements_kind(), target_elements_kind);
839 Map* transitioned_map = 839 Map* transitioned_map = nullptr;
840 more_general_transition 840 if (more_general_transition) {
841 ? source_map->LookupElementsTransitionMap(target_elements_kind) 841 MapHandleList map_list;
842 : NULL; 842 map_list.Add(handle(target_map));
843 843 transitioned_map = source_map->FindElementsKindTransitionedMap(&map_list);
844 }
844 return transitioned_map == target_map; 845 return transitioned_map == target_map;
845 } 846 }
846 847
847 848
848 void IC::PatchCache(Handle<Name> name, Handle<Code> code) { 849 void IC::PatchCache(Handle<Name> name, Handle<Code> code) {
849 switch (state()) { 850 switch (state()) {
850 case UNINITIALIZED: 851 case UNINITIALIZED:
851 case PREMONOMORPHIC: 852 case PREMONOMORPHIC:
852 UpdateMonomorphicIC(code, name); 853 UpdateMonomorphicIC(code, name);
853 break; 854 break;
(...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after
2964 KeyedLoadICNexus nexus(vector, vector_slot); 2965 KeyedLoadICNexus nexus(vector, vector_slot);
2965 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); 2966 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
2966 ic.UpdateState(receiver, key); 2967 ic.UpdateState(receiver, key);
2967 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); 2968 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
2968 } 2969 }
2969 2970
2970 return *result; 2971 return *result;
2971 } 2972 }
2972 } // namespace internal 2973 } // namespace internal
2973 } // namespace v8 2974 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/ic/ic-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698