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 | 5 |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex); | 920 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex); |
921 __ Branch(&non_double_value, ne, t0, Operand(at)); | 921 __ Branch(&non_double_value, ne, t0, Operand(at)); |
922 | 922 |
923 // Value is a double. Transition FAST_SMI_ELEMENTS -> | 923 // Value is a double. Transition FAST_SMI_ELEMENTS -> |
924 // FAST_DOUBLE_ELEMENTS and complete the store. | 924 // FAST_DOUBLE_ELEMENTS and complete the store. |
925 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, | 925 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, |
926 FAST_DOUBLE_ELEMENTS, | 926 FAST_DOUBLE_ELEMENTS, |
927 receiver_map, | 927 receiver_map, |
928 t0, | 928 t0, |
929 slow); | 929 slow); |
930 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3 | |
931 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, | 930 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, |
932 FAST_DOUBLE_ELEMENTS); | 931 FAST_DOUBLE_ELEMENTS); |
933 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, slow); | 932 ElementsTransitionGenerator::GenerateSmiToDouble( |
| 933 masm, receiver, key, value, receiver_map, mode, slow); |
934 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 934 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); |
935 __ jmp(&fast_double_without_map_check); | 935 __ jmp(&fast_double_without_map_check); |
936 | 936 |
937 __ bind(&non_double_value); | 937 __ bind(&non_double_value); |
938 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS | 938 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS |
939 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, | 939 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, |
940 FAST_ELEMENTS, | 940 FAST_ELEMENTS, |
941 receiver_map, | 941 receiver_map, |
942 t0, | 942 t0, |
943 slow); | 943 slow); |
944 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3 | |
945 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS); | 944 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS); |
946 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm, mode, | 945 ElementsTransitionGenerator::GenerateMapChangeElementsTransition( |
947 slow); | 946 masm, receiver, key, value, receiver_map, mode, slow); |
948 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 947 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); |
949 __ jmp(&finish_object_store); | 948 __ jmp(&finish_object_store); |
950 | 949 |
951 __ bind(&transition_double_elements); | 950 __ bind(&transition_double_elements); |
952 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a | 951 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a |
953 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and | 952 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and |
954 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS | 953 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS |
955 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, | 954 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, |
956 FAST_ELEMENTS, | 955 FAST_ELEMENTS, |
957 receiver_map, | 956 receiver_map, |
958 t0, | 957 t0, |
959 slow); | 958 slow); |
960 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3 | |
961 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); | 959 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); |
962 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); | 960 ElementsTransitionGenerator::GenerateDoubleToObject( |
| 961 masm, receiver, key, value, receiver_map, mode, slow); |
963 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 962 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); |
964 __ jmp(&finish_object_store); | 963 __ jmp(&finish_object_store); |
965 } | 964 } |
966 | 965 |
967 | 966 |
968 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, | 967 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
969 StrictMode strict_mode) { | 968 StrictMode strict_mode) { |
970 // ---------- S t a t e -------------- | 969 // ---------- S t a t e -------------- |
971 // -- a0 : value | 970 // -- a0 : value |
972 // -- a1 : key | 971 // -- a1 : key |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1290 } else { | 1289 } else { |
1291 ASSERT(Assembler::IsBne(branch_instr)); | 1290 ASSERT(Assembler::IsBne(branch_instr)); |
1292 patcher.ChangeBranchCondition(eq); | 1291 patcher.ChangeBranchCondition(eq); |
1293 } | 1292 } |
1294 } | 1293 } |
1295 | 1294 |
1296 | 1295 |
1297 } } // namespace v8::internal | 1296 } } // namespace v8::internal |
1298 | 1297 |
1299 #endif // V8_TARGET_ARCH_MIPS | 1298 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |