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

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

Issue 988653003: Use platform specific stubs for vector-based Load/KeyedLoad. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Included the MIPs port from Paul and Akos. Created 5 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
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-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/v8.h" 5 #include "src/v8.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 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 } 981 }
982 return PropertyICCompiler::ComputeMonomorphic( 982 return PropertyICCompiler::ComputeMonomorphic(
983 Code::LOAD_IC, name, handle(global->map()), handler, 983 Code::LOAD_IC, name, handle(global->map()), handler,
984 LoadICState(CONTEXTUAL).GetExtraICState()); 984 LoadICState(CONTEXTUAL).GetExtraICState());
985 } 985 }
986 986
987 987
988 Handle<Code> LoadIC::initialize_stub_in_optimized_code( 988 Handle<Code> LoadIC::initialize_stub_in_optimized_code(
989 Isolate* isolate, ExtraICState extra_state, State initialization_state) { 989 Isolate* isolate, ExtraICState extra_state, State initialization_state) {
990 if (FLAG_vector_ics) { 990 if (FLAG_vector_ics) {
991 return VectorLoadStub(isolate, LoadICState(extra_state)).GetCode(); 991 return VectorRawLoadStub(isolate, LoadICState(extra_state)).GetCode();
992 } 992 }
993 return PropertyICCompiler::ComputeLoad(isolate, initialization_state, 993 return PropertyICCompiler::ComputeLoad(isolate, initialization_state,
994 extra_state); 994 extra_state);
995 } 995 }
996 996
997 997
998 Handle<Code> KeyedLoadIC::initialize_stub(Isolate* isolate) { 998 Handle<Code> KeyedLoadIC::initialize_stub(Isolate* isolate) {
999 if (FLAG_vector_ics) { 999 if (FLAG_vector_ics) {
1000 return KeyedLoadICTrampolineStub(isolate).GetCode(); 1000 return KeyedLoadICTrampolineStub(isolate).GetCode();
1001 } 1001 }
1002 1002
1003 return isolate->builtins()->KeyedLoadIC_Initialize(); 1003 return isolate->builtins()->KeyedLoadIC_Initialize();
1004 } 1004 }
1005 1005
1006 1006
1007 Handle<Code> KeyedLoadIC::initialize_stub_in_optimized_code( 1007 Handle<Code> KeyedLoadIC::initialize_stub_in_optimized_code(
1008 Isolate* isolate, State initialization_state) { 1008 Isolate* isolate, State initialization_state) {
1009 if (FLAG_vector_ics) { 1009 if (FLAG_vector_ics) {
1010 return VectorKeyedLoadStub(isolate).GetCode(); 1010 return VectorRawKeyedLoadStub(isolate).GetCode();
1011 } 1011 }
1012 switch (initialization_state) { 1012 switch (initialization_state) {
1013 case UNINITIALIZED: 1013 case UNINITIALIZED:
1014 return isolate->builtins()->KeyedLoadIC_Initialize(); 1014 return isolate->builtins()->KeyedLoadIC_Initialize();
1015 case PREMONOMORPHIC: 1015 case PREMONOMORPHIC:
1016 return isolate->builtins()->KeyedLoadIC_PreMonomorphic(); 1016 return isolate->builtins()->KeyedLoadIC_PreMonomorphic();
1017 case MEGAMORPHIC: 1017 case MEGAMORPHIC:
1018 return isolate->builtins()->KeyedLoadIC_Megamorphic(); 1018 return isolate->builtins()->KeyedLoadIC_Megamorphic();
1019 default: 1019 default:
1020 UNREACHABLE(); 1020 UNREACHABLE();
(...skipping 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after
3055 static const Address IC_utilities[] = { 3055 static const Address IC_utilities[] = {
3056 #define ADDR(name) FUNCTION_ADDR(name), 3056 #define ADDR(name) FUNCTION_ADDR(name),
3057 IC_UTIL_LIST(ADDR) NULL 3057 IC_UTIL_LIST(ADDR) NULL
3058 #undef ADDR 3058 #undef ADDR
3059 }; 3059 };
3060 3060
3061 3061
3062 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } 3062 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; }
3063 } 3063 }
3064 } // namespace v8::internal 3064 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698