OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 | 1047 |
1048 TRACE_IC("LoadIC", name, state, target()); | 1048 TRACE_IC("LoadIC", name, state, target()); |
1049 } | 1049 } |
1050 | 1050 |
1051 | 1051 |
1052 Handle<Code> KeyedLoadIC::GetElementStubWithoutMapCheck( | 1052 Handle<Code> KeyedLoadIC::GetElementStubWithoutMapCheck( |
1053 bool is_js_array, | 1053 bool is_js_array, |
1054 ElementsKind elements_kind, | 1054 ElementsKind elements_kind, |
1055 KeyedAccessGrowMode grow_mode) { | 1055 KeyedAccessGrowMode grow_mode) { |
1056 ASSERT(grow_mode == DO_NOT_ALLOW_JSARRAY_GROWTH); | 1056 ASSERT(grow_mode == DO_NOT_ALLOW_JSARRAY_GROWTH); |
1057 return KeyedLoadElementStub(elements_kind).GetCode(); | 1057 if (IsFastElementsKind(elements_kind) || |
| 1058 IsExternalArrayElementsKind(elements_kind)) { |
| 1059 return KeyedLoadFastElementStub(is_js_array, elements_kind).GetCode(); |
| 1060 } else { |
| 1061 ASSERT(elements_kind == DICTIONARY_ELEMENTS); |
| 1062 return KeyedLoadDictionaryElementStub().GetCode(); |
| 1063 } |
1058 } | 1064 } |
1059 | 1065 |
1060 | 1066 |
1061 Handle<Code> KeyedLoadIC::ComputePolymorphicStub( | 1067 Handle<Code> KeyedLoadIC::ComputePolymorphicStub( |
1062 MapHandleList* receiver_maps, | 1068 MapHandleList* receiver_maps, |
1063 StrictModeFlag strict_mode, | 1069 StrictModeFlag strict_mode, |
1064 KeyedAccessGrowMode growth_mode) { | 1070 KeyedAccessGrowMode growth_mode) { |
1065 CodeHandleList handler_ics(receiver_maps->length()); | 1071 CodeHandleList handler_ics(receiver_maps->length()); |
1066 for (int i = 0; i < receiver_maps->length(); ++i) { | 1072 for (int i = 0; i < receiver_maps->length(); ++i) { |
1067 Handle<Map> receiver_map = receiver_maps->at(i); | 1073 Handle<Map> receiver_map = receiver_maps->at(i); |
(...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2769 #undef ADDR | 2775 #undef ADDR |
2770 }; | 2776 }; |
2771 | 2777 |
2772 | 2778 |
2773 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2779 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2774 return IC_utilities[id]; | 2780 return IC_utilities[id]; |
2775 } | 2781 } |
2776 | 2782 |
2777 | 2783 |
2778 } } // namespace v8::internal | 2784 } } // namespace v8::internal |
OLD | NEW |