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

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

Issue 393693003: MIPS: Use register parameters in ElementsTransitionGenerator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add mips64 port. Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/mips64/codegen-mips64.cc ('k') | src/mips64/macro-assembler-mips64.h » ('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 5
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
10 10
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex); 931 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex);
932 __ Branch(&non_double_value, ne, a4, Operand(at)); 932 __ Branch(&non_double_value, ne, a4, Operand(at));
933 933
934 // Value is a double. Transition FAST_SMI_ELEMENTS -> 934 // Value is a double. Transition FAST_SMI_ELEMENTS ->
935 // FAST_DOUBLE_ELEMENTS and complete the store. 935 // FAST_DOUBLE_ELEMENTS and complete the store.
936 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 936 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
937 FAST_DOUBLE_ELEMENTS, 937 FAST_DOUBLE_ELEMENTS,
938 receiver_map, 938 receiver_map,
939 a4, 939 a4,
940 slow); 940 slow);
941 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3
942 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, 941 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS,
943 FAST_DOUBLE_ELEMENTS); 942 FAST_DOUBLE_ELEMENTS);
944 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, slow); 943 ElementsTransitionGenerator::GenerateSmiToDouble(
944 masm, receiver, key, value, receiver_map, mode, slow);
945 __ ld(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 945 __ ld(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
946 __ jmp(&fast_double_without_map_check); 946 __ jmp(&fast_double_without_map_check);
947 947
948 __ bind(&non_double_value); 948 __ bind(&non_double_value);
949 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS 949 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS
950 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 950 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
951 FAST_ELEMENTS, 951 FAST_ELEMENTS,
952 receiver_map, 952 receiver_map,
953 a4, 953 a4,
954 slow); 954 slow);
955 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3
956 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS); 955 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS);
957 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm, mode, 956 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(
958 slow); 957 masm, receiver, key, value, receiver_map, mode, slow);
959 __ ld(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 958 __ ld(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
960 __ jmp(&finish_object_store); 959 __ jmp(&finish_object_store);
961 960
962 __ bind(&transition_double_elements); 961 __ bind(&transition_double_elements);
963 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a 962 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a
964 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and 963 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and
965 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS 964 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS
966 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, 965 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS,
967 FAST_ELEMENTS, 966 FAST_ELEMENTS,
968 receiver_map, 967 receiver_map,
969 a4, 968 a4,
970 slow); 969 slow);
971 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3
972 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); 970 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS);
973 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); 971 ElementsTransitionGenerator::GenerateDoubleToObject(
972 masm, receiver, key, value, receiver_map, mode, slow);
974 __ ld(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 973 __ ld(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
975 __ jmp(&finish_object_store); 974 __ jmp(&finish_object_store);
976 } 975 }
977 976
978 977
979 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, 978 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
980 StrictMode strict_mode) { 979 StrictMode strict_mode) {
981 // ---------- S t a t e -------------- 980 // ---------- S t a t e --------------
982 // -- a0 : value 981 // -- a0 : value
983 // -- a1 : key 982 // -- a1 : key
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 } else { 1299 } else {
1301 ASSERT(Assembler::IsBne(branch_instr)); 1300 ASSERT(Assembler::IsBne(branch_instr));
1302 patcher.ChangeBranchCondition(eq); 1301 patcher.ChangeBranchCondition(eq);
1303 } 1302 }
1304 } 1303 }
1305 1304
1306 1305
1307 } } // namespace v8::internal 1306 } } // namespace v8::internal
1308 1307
1309 #endif // V8_TARGET_ARCH_MIPS64 1308 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/codegen-mips64.cc ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698