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

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

Issue 389283002: Use register parameters in ElementsTransitionGenerator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/arm64/codegen-arm64.cc ('k') | src/codegen.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/arm64/assembler-arm64.h" 9 #include "src/arm64/assembler-arm64.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 __ JumpIfNotRoot(x10, Heap::kHeapNumberMapRootIndex, &non_double_value); 1021 __ JumpIfNotRoot(x10, Heap::kHeapNumberMapRootIndex, &non_double_value);
1022 1022
1023 // Value is a double. Transition FAST_SMI_ELEMENTS -> 1023 // Value is a double. Transition FAST_SMI_ELEMENTS ->
1024 // FAST_DOUBLE_ELEMENTS and complete the store. 1024 // FAST_DOUBLE_ELEMENTS and complete the store.
1025 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 1025 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
1026 FAST_DOUBLE_ELEMENTS, 1026 FAST_DOUBLE_ELEMENTS,
1027 receiver_map, 1027 receiver_map,
1028 x10, 1028 x10,
1029 x11, 1029 x11,
1030 slow); 1030 slow);
1031 ASSERT(receiver_map.Is(x3)); // Transition code expects map in x3.
1032 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, 1031 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS,
1033 FAST_DOUBLE_ELEMENTS); 1032 FAST_DOUBLE_ELEMENTS);
1034 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, slow); 1033 ElementsTransitionGenerator::GenerateSmiToDouble(
1034 masm, receiver, key, value, receiver_map, mode, slow);
1035 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1035 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1036 __ B(&fast_double_without_map_check); 1036 __ B(&fast_double_without_map_check);
1037 1037
1038 __ Bind(&non_double_value); 1038 __ Bind(&non_double_value);
1039 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS. 1039 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS.
1040 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 1040 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
1041 FAST_ELEMENTS, 1041 FAST_ELEMENTS,
1042 receiver_map, 1042 receiver_map,
1043 x10, 1043 x10,
1044 x11, 1044 x11,
1045 slow); 1045 slow);
1046 ASSERT(receiver_map.Is(x3)); // Transition code expects map in x3. 1046
1047 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS); 1047 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS);
1048 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm, mode, 1048 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(
1049 slow); 1049 masm, receiver, key, value, receiver_map, mode, slow);
1050
1050 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1051 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1051 __ B(&finish_store); 1052 __ B(&finish_store);
1052 1053
1053 __ Bind(&transition_double_elements); 1054 __ Bind(&transition_double_elements);
1054 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a 1055 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a
1055 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and 1056 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and
1056 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS 1057 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS
1057 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, 1058 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS,
1058 FAST_ELEMENTS, 1059 FAST_ELEMENTS,
1059 receiver_map, 1060 receiver_map,
1060 x10, 1061 x10,
1061 x11, 1062 x11,
1062 slow); 1063 slow);
1063 ASSERT(receiver_map.Is(x3)); // Transition code expects map in x3.
1064 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); 1064 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS);
1065 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); 1065 ElementsTransitionGenerator::GenerateDoubleToObject(
1066 masm, receiver, key, value, receiver_map, mode, slow);
1066 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1067 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1067 __ B(&finish_store); 1068 __ B(&finish_store);
1068 } 1069 }
1069 1070
1070 1071
1071 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, 1072 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
1072 StrictMode strict_mode) { 1073 StrictMode strict_mode) {
1073 ASM_LOCATION("KeyedStoreIC::GenerateGeneric"); 1074 ASM_LOCATION("KeyedStoreIC::GenerateGeneric");
1074 Label slow; 1075 Label slow;
1075 Label array; 1076 Label array;
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ); 1336 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ);
1336 // This is JumpIfSmi(smi_reg, branch_imm). 1337 // This is JumpIfSmi(smi_reg, branch_imm).
1337 patcher.tbz(smi_reg, 0, branch_imm); 1338 patcher.tbz(smi_reg, 0, branch_imm);
1338 } 1339 }
1339 } 1340 }
1340 1341
1341 1342
1342 } } // namespace v8::internal 1343 } } // namespace v8::internal
1343 1344
1344 #endif // V8_TARGET_ARCH_ARM64 1345 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/codegen-arm64.cc ('k') | src/codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698