| 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 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2735 // ----------- S t a t e ------------- | 2735 // ----------- S t a t e ------------- |
| 2736 // -- rax : value | 2736 // -- rax : value |
| 2737 // -- rcx : key | 2737 // -- rcx : key |
| 2738 // -- rdx : receiver | 2738 // -- rdx : receiver |
| 2739 // -- rsp[0] : return address | 2739 // -- rsp[0] : return address |
| 2740 // ----------------------------------- | 2740 // ----------------------------------- |
| 2741 | 2741 |
| 2742 ElementsKind elements_kind = receiver_map->elements_kind(); | 2742 ElementsKind elements_kind = receiver_map->elements_kind(); |
| 2743 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; | 2743 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; |
| 2744 Handle<Code> stub = | 2744 Handle<Code> stub = |
| 2745 KeyedStoreElementStub(is_js_array, elements_kind, grow_mode_).GetCode(); | 2745 KeyedStoreElementStub(is_js_array, |
| 2746 elements_kind, |
| 2747 grow_mode_).GetCode(isolate()); |
| 2746 | 2748 |
| 2747 __ DispatchMap(rdx, receiver_map, stub, DO_SMI_CHECK); | 2749 __ DispatchMap(rdx, receiver_map, stub, DO_SMI_CHECK); |
| 2748 | 2750 |
| 2749 Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss(); | 2751 Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss(); |
| 2750 __ jmp(ic, RelocInfo::CODE_TARGET); | 2752 __ jmp(ic, RelocInfo::CODE_TARGET); |
| 2751 | 2753 |
| 2752 // Return the generated code. | 2754 // Return the generated code. |
| 2753 return GetCode(Code::NORMAL, factory()->empty_string()); | 2755 return GetCode(Code::NORMAL, factory()->empty_string()); |
| 2754 } | 2756 } |
| 2755 | 2757 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2974 // ----------- S t a t e ------------- | 2976 // ----------- S t a t e ------------- |
| 2975 // -- rax : key | 2977 // -- rax : key |
| 2976 // -- rdx : receiver | 2978 // -- rdx : receiver |
| 2977 // -- rsp[0] : return address | 2979 // -- rsp[0] : return address |
| 2978 // ----------------------------------- | 2980 // ----------------------------------- |
| 2979 ElementsKind elements_kind = receiver_map->elements_kind(); | 2981 ElementsKind elements_kind = receiver_map->elements_kind(); |
| 2980 if (receiver_map->has_fast_elements() || | 2982 if (receiver_map->has_fast_elements() || |
| 2981 receiver_map->has_external_array_elements()) { | 2983 receiver_map->has_external_array_elements()) { |
| 2982 Handle<Code> stub = KeyedLoadFastElementStub( | 2984 Handle<Code> stub = KeyedLoadFastElementStub( |
| 2983 receiver_map->instance_type() == JS_ARRAY_TYPE, | 2985 receiver_map->instance_type() == JS_ARRAY_TYPE, |
| 2984 elements_kind).GetCode(); | 2986 elements_kind).GetCode(isolate()); |
| 2985 __ DispatchMap(rdx, receiver_map, stub, DO_SMI_CHECK); | 2987 __ DispatchMap(rdx, receiver_map, stub, DO_SMI_CHECK); |
| 2986 } else { | 2988 } else { |
| 2987 Handle<Code> stub = | 2989 Handle<Code> stub = |
| 2988 KeyedLoadDictionaryElementStub().GetCode(); | 2990 KeyedLoadDictionaryElementStub().GetCode(isolate()); |
| 2989 __ DispatchMap(rdx, receiver_map, stub, DO_SMI_CHECK); | 2991 __ DispatchMap(rdx, receiver_map, stub, DO_SMI_CHECK); |
| 2990 } | 2992 } |
| 2991 | 2993 |
| 2992 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | 2994 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); |
| 2993 | 2995 |
| 2994 // Return the generated code. | 2996 // Return the generated code. |
| 2995 return GetCode(Code::NORMAL, factory()->empty_string()); | 2997 return GetCode(Code::NORMAL, factory()->empty_string()); |
| 2996 } | 2998 } |
| 2997 | 2999 |
| 2998 | 3000 |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3696 __ jmp(ic_slow, RelocInfo::CODE_TARGET); | 3698 __ jmp(ic_slow, RelocInfo::CODE_TARGET); |
| 3697 } | 3699 } |
| 3698 } | 3700 } |
| 3699 | 3701 |
| 3700 | 3702 |
| 3701 #undef __ | 3703 #undef __ |
| 3702 | 3704 |
| 3703 } } // namespace v8::internal | 3705 } } // namespace v8::internal |
| 3704 | 3706 |
| 3705 #endif // V8_TARGET_ARCH_X64 | 3707 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |