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/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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 } | 980 } |
981 return PropertyICCompiler::ComputeMonomorphic( | 981 return PropertyICCompiler::ComputeMonomorphic( |
982 Code::LOAD_IC, name, handle(global->map()), handler, | 982 Code::LOAD_IC, name, handle(global->map()), handler, |
983 LoadICState(CONTEXTUAL).GetExtraICState()); | 983 LoadICState(CONTEXTUAL).GetExtraICState()); |
984 } | 984 } |
985 | 985 |
986 | 986 |
987 Handle<Code> LoadIC::initialize_stub_in_optimized_code( | 987 Handle<Code> LoadIC::initialize_stub_in_optimized_code( |
988 Isolate* isolate, ExtraICState extra_state, State initialization_state) { | 988 Isolate* isolate, ExtraICState extra_state, State initialization_state) { |
989 if (FLAG_vector_ics) { | 989 if (FLAG_vector_ics) { |
990 return VectorLoadStub(isolate, LoadICState(extra_state)).GetCode(); | 990 return VectorRawLoadStub(isolate, LoadICState(extra_state)).GetCode(); |
991 } | 991 } |
992 return PropertyICCompiler::ComputeLoad(isolate, initialization_state, | 992 return PropertyICCompiler::ComputeLoad(isolate, initialization_state, |
993 extra_state); | 993 extra_state); |
994 } | 994 } |
995 | 995 |
996 | 996 |
997 Handle<Code> KeyedLoadIC::initialize_stub(Isolate* isolate) { | 997 Handle<Code> KeyedLoadIC::initialize_stub(Isolate* isolate) { |
998 if (FLAG_vector_ics) { | 998 if (FLAG_vector_ics) { |
999 return KeyedLoadICTrampolineStub(isolate).GetCode(); | 999 return KeyedLoadICTrampolineStub(isolate).GetCode(); |
1000 } | 1000 } |
1001 | 1001 |
1002 return isolate->builtins()->KeyedLoadIC_Initialize(); | 1002 return isolate->builtins()->KeyedLoadIC_Initialize(); |
1003 } | 1003 } |
1004 | 1004 |
1005 | 1005 |
1006 Handle<Code> KeyedLoadIC::initialize_stub_in_optimized_code( | 1006 Handle<Code> KeyedLoadIC::initialize_stub_in_optimized_code( |
1007 Isolate* isolate, State initialization_state) { | 1007 Isolate* isolate, State initialization_state) { |
1008 if (FLAG_vector_ics) { | 1008 if (FLAG_vector_ics) { |
1009 return VectorKeyedLoadStub(isolate).GetCode(); | 1009 return VectorRawKeyedLoadStub(isolate).GetCode(); |
1010 } | 1010 } |
1011 switch (initialization_state) { | 1011 switch (initialization_state) { |
1012 case UNINITIALIZED: | 1012 case UNINITIALIZED: |
1013 return isolate->builtins()->KeyedLoadIC_Initialize(); | 1013 return isolate->builtins()->KeyedLoadIC_Initialize(); |
1014 case PREMONOMORPHIC: | 1014 case PREMONOMORPHIC: |
1015 return isolate->builtins()->KeyedLoadIC_PreMonomorphic(); | 1015 return isolate->builtins()->KeyedLoadIC_PreMonomorphic(); |
1016 case MEGAMORPHIC: | 1016 case MEGAMORPHIC: |
1017 return isolate->builtins()->KeyedLoadIC_Megamorphic(); | 1017 return isolate->builtins()->KeyedLoadIC_Megamorphic(); |
1018 default: | 1018 default: |
1019 UNREACHABLE(); | 1019 UNREACHABLE(); |
(...skipping 2028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3048 static const Address IC_utilities[] = { | 3048 static const Address IC_utilities[] = { |
3049 #define ADDR(name) FUNCTION_ADDR(name), | 3049 #define ADDR(name) FUNCTION_ADDR(name), |
3050 IC_UTIL_LIST(ADDR) NULL | 3050 IC_UTIL_LIST(ADDR) NULL |
3051 #undef ADDR | 3051 #undef ADDR |
3052 }; | 3052 }; |
3053 | 3053 |
3054 | 3054 |
3055 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 3055 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
3056 } | 3056 } |
3057 } // namespace v8::internal | 3057 } // namespace v8::internal |
OLD | NEW |