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

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

Issue 2147433002: [ic] [stubs] Don't use Code::flags in megamorphic stub cache hash computations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@split-stub-cache
Patch Set: 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
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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 if (!handler.is_identical_to(code)) { 1017 if (!handler.is_identical_to(code)) {
1018 TRACE_HANDLER_STATS(isolate(), IC_HandlerCacheHit); 1018 TRACE_HANDLER_STATS(isolate(), IC_HandlerCacheHit);
1019 return code; 1019 return code;
1020 } 1020 }
1021 } else { 1021 } else {
1022 // maybe_handler_ is only populated for MONOMORPHIC and POLYMORPHIC ICs. 1022 // maybe_handler_ is only populated for MONOMORPHIC and POLYMORPHIC ICs.
1023 // In MEGAMORPHIC case, check if the handler in the megamorphic stub 1023 // In MEGAMORPHIC case, check if the handler in the megamorphic stub
1024 // cache (which just missed) is different from the cached handler. 1024 // cache (which just missed) is different from the cached handler.
1025 if (state() == MEGAMORPHIC && lookup->GetReceiver()->IsHeapObject()) { 1025 if (state() == MEGAMORPHIC && lookup->GetReceiver()->IsHeapObject()) {
1026 Map* map = Handle<HeapObject>::cast(lookup->GetReceiver())->map(); 1026 Map* map = Handle<HeapObject>::cast(lookup->GetReceiver())->map();
1027 Code* megamorphic_cached_code = 1027 Code* megamorphic_cached_code = stub_cache()->Get(*lookup->name(), map);
1028 stub_cache()->Get(*lookup->name(), map, code->flags());
1029 if (megamorphic_cached_code != *code) { 1028 if (megamorphic_cached_code != *code) {
1030 TRACE_HANDLER_STATS(isolate(), IC_HandlerCacheHit); 1029 TRACE_HANDLER_STATS(isolate(), IC_HandlerCacheHit);
1031 return code; 1030 return code;
1032 } 1031 }
1033 } else { 1032 } else {
1034 TRACE_HANDLER_STATS(isolate(), IC_HandlerCacheHit); 1033 TRACE_HANDLER_STATS(isolate(), IC_HandlerCacheHit);
1035 return code; 1034 return code;
1036 } 1035 }
1037 } 1036 }
1038 } 1037 }
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
3008 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, 3007 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC,
3009 vector->GetKind(vector_slot)); 3008 vector->GetKind(vector_slot));
3010 KeyedLoadICNexus nexus(vector, vector_slot); 3009 KeyedLoadICNexus nexus(vector, vector_slot);
3011 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); 3010 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
3012 ic.UpdateState(receiver, key); 3011 ic.UpdateState(receiver, key);
3013 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); 3012 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key));
3014 } 3013 }
3015 } 3014 }
3016 } // namespace internal 3015 } // namespace internal
3017 } // namespace v8 3016 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698