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 2167493003: [ic] [stubs] Don't use Code::flags in megamorphic stub cache hash computations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@stub-cache-fix
Patch Set: Rebasing Created 4 years, 5 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/ic/ia32/stub-cache-ia32.cc ('k') | src/ic/mips/stub-cache-mips.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-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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 if (!handler.is_identical_to(code)) { 1036 if (!handler.is_identical_to(code)) {
1037 TRACE_HANDLER_STATS(isolate(), IC_HandlerCacheHit); 1037 TRACE_HANDLER_STATS(isolate(), IC_HandlerCacheHit);
1038 return code; 1038 return code;
1039 } 1039 }
1040 } else { 1040 } else {
1041 // maybe_handler_ is only populated for MONOMORPHIC and POLYMORPHIC ICs. 1041 // maybe_handler_ is only populated for MONOMORPHIC and POLYMORPHIC ICs.
1042 // In MEGAMORPHIC case, check if the handler in the megamorphic stub 1042 // In MEGAMORPHIC case, check if the handler in the megamorphic stub
1043 // cache (which just missed) is different from the cached handler. 1043 // cache (which just missed) is different from the cached handler.
1044 if (state() == MEGAMORPHIC && lookup->GetReceiver()->IsHeapObject()) { 1044 if (state() == MEGAMORPHIC && lookup->GetReceiver()->IsHeapObject()) {
1045 Map* map = Handle<HeapObject>::cast(lookup->GetReceiver())->map(); 1045 Map* map = Handle<HeapObject>::cast(lookup->GetReceiver())->map();
1046 Code* megamorphic_cached_code = 1046 Code* megamorphic_cached_code = stub_cache()->Get(*lookup->name(), map);
1047 stub_cache()->Get(*lookup->name(), map, code->flags());
1048 if (megamorphic_cached_code != *code) { 1047 if (megamorphic_cached_code != *code) {
1049 TRACE_HANDLER_STATS(isolate(), IC_HandlerCacheHit); 1048 TRACE_HANDLER_STATS(isolate(), IC_HandlerCacheHit);
1050 return code; 1049 return code;
1051 } 1050 }
1052 } else { 1051 } else {
1053 TRACE_HANDLER_STATS(isolate(), IC_HandlerCacheHit); 1052 TRACE_HANDLER_STATS(isolate(), IC_HandlerCacheHit);
1054 return code; 1053 return code;
1055 } 1054 }
1056 } 1055 }
1057 } 1056 }
(...skipping 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after
3013 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, 3012 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC,
3014 vector->GetKind(vector_slot)); 3013 vector->GetKind(vector_slot));
3015 KeyedLoadICNexus nexus(vector, vector_slot); 3014 KeyedLoadICNexus nexus(vector, vector_slot);
3016 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); 3015 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
3017 ic.UpdateState(receiver, key); 3016 ic.UpdateState(receiver, key);
3018 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); 3017 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key));
3019 } 3018 }
3020 } 3019 }
3021 } // namespace internal 3020 } // namespace internal
3022 } // namespace v8 3021 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/ia32/stub-cache-ia32.cc ('k') | src/ic/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698