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

Side by Side Diff: src/arm/ic-arm.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/arm/codegen-arm.cc ('k') | src/arm/macro-assembler-arm.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/arm/assembler-arm.h" 9 #include "src/arm/assembler-arm.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 __ CompareRoot(r4, Heap::kHeapNumberMapRootIndex); 982 __ CompareRoot(r4, Heap::kHeapNumberMapRootIndex);
983 __ b(ne, &non_double_value); 983 __ b(ne, &non_double_value);
984 984
985 // Value is a double. Transition FAST_SMI_ELEMENTS -> 985 // Value is a double. Transition FAST_SMI_ELEMENTS ->
986 // FAST_DOUBLE_ELEMENTS and complete the store. 986 // FAST_DOUBLE_ELEMENTS and complete the store.
987 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 987 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
988 FAST_DOUBLE_ELEMENTS, 988 FAST_DOUBLE_ELEMENTS,
989 receiver_map, 989 receiver_map,
990 r4, 990 r4,
991 slow); 991 slow);
992 ASSERT(receiver_map.is(r3)); // Transition code expects map in r3
993 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, 992 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS,
994 FAST_DOUBLE_ELEMENTS); 993 FAST_DOUBLE_ELEMENTS);
995 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, slow); 994 ElementsTransitionGenerator::GenerateSmiToDouble(
995 masm, receiver, key, value, receiver_map, mode, slow);
996 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 996 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
997 __ jmp(&fast_double_without_map_check); 997 __ jmp(&fast_double_without_map_check);
998 998
999 __ bind(&non_double_value); 999 __ bind(&non_double_value);
1000 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS 1000 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS
1001 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 1001 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
1002 FAST_ELEMENTS, 1002 FAST_ELEMENTS,
1003 receiver_map, 1003 receiver_map,
1004 r4, 1004 r4,
1005 slow); 1005 slow);
1006 ASSERT(receiver_map.is(r3)); // Transition code expects map in r3
1007 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS); 1006 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS);
1008 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm, mode, 1007 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(
1009 slow); 1008 masm, receiver, key, value, receiver_map, mode, slow);
1010 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1009 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1011 __ jmp(&finish_object_store); 1010 __ jmp(&finish_object_store);
1012 1011
1013 __ bind(&transition_double_elements); 1012 __ bind(&transition_double_elements);
1014 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a 1013 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a
1015 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and 1014 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and
1016 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS 1015 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS
1017 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, 1016 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS,
1018 FAST_ELEMENTS, 1017 FAST_ELEMENTS,
1019 receiver_map, 1018 receiver_map,
1020 r4, 1019 r4,
1021 slow); 1020 slow);
1022 ASSERT(receiver_map.is(r3)); // Transition code expects map in r3
1023 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); 1021 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS);
1024 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); 1022 ElementsTransitionGenerator::GenerateDoubleToObject(
1023 masm, receiver, key, value, receiver_map, mode, slow);
1025 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1024 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1026 __ jmp(&finish_object_store); 1025 __ jmp(&finish_object_store);
1027 } 1026 }
1028 1027
1029 1028
1030 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, 1029 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
1031 StrictMode strict_mode) { 1030 StrictMode strict_mode) {
1032 // ---------- S t a t e -------------- 1031 // ---------- S t a t e --------------
1033 // -- r0 : value 1032 // -- r0 : value
1034 // -- r1 : key 1033 // -- r1 : key
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 } else { 1285 } else {
1287 ASSERT(Assembler::GetCondition(branch_instr) == ne); 1286 ASSERT(Assembler::GetCondition(branch_instr) == ne);
1288 patcher.EmitCondition(eq); 1287 patcher.EmitCondition(eq);
1289 } 1288 }
1290 } 1289 }
1291 1290
1292 1291
1293 } } // namespace v8::internal 1292 } } // namespace v8::internal
1294 1293
1295 #endif // V8_TARGET_ARCH_ARM 1294 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698