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

Side by Side Diff: src/x64/ic-x64.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/x64/codegen-x64.cc ('k') | src/x64/macro-assembler-x64.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_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic-inl.h" 10 #include "src/ic-inl.h"
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 666
667 // Value is a double. Transition FAST_SMI_ELEMENTS -> 667 // Value is a double. Transition FAST_SMI_ELEMENTS ->
668 // FAST_DOUBLE_ELEMENTS and complete the store. 668 // FAST_DOUBLE_ELEMENTS and complete the store.
669 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 669 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
670 FAST_DOUBLE_ELEMENTS, 670 FAST_DOUBLE_ELEMENTS,
671 rbx, 671 rbx,
672 rdi, 672 rdi,
673 slow); 673 slow);
674 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, 674 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS,
675 FAST_DOUBLE_ELEMENTS); 675 FAST_DOUBLE_ELEMENTS);
676 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, slow); 676 ElementsTransitionGenerator::GenerateSmiToDouble(
677 masm, receiver, key, value, rbx, mode, slow);
677 __ movp(rbx, FieldOperand(receiver, JSObject::kElementsOffset)); 678 __ movp(rbx, FieldOperand(receiver, JSObject::kElementsOffset));
678 __ jmp(&fast_double_without_map_check); 679 __ jmp(&fast_double_without_map_check);
679 680
680 __ bind(&non_double_value); 681 __ bind(&non_double_value);
681 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS 682 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS
682 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 683 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
683 FAST_ELEMENTS, 684 FAST_ELEMENTS,
684 rbx, 685 rbx,
685 rdi, 686 rdi,
686 slow); 687 slow);
687 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS); 688 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS);
688 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm, mode, 689 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(
689 slow); 690 masm, receiver, key, value, rbx, mode, slow);
690 __ movp(rbx, FieldOperand(receiver, JSObject::kElementsOffset)); 691 __ movp(rbx, FieldOperand(receiver, JSObject::kElementsOffset));
691 __ jmp(&finish_object_store); 692 __ jmp(&finish_object_store);
692 693
693 __ bind(&transition_double_elements); 694 __ bind(&transition_double_elements);
694 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a 695 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a
695 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and 696 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and
696 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS 697 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS
697 __ movp(rbx, FieldOperand(receiver, HeapObject::kMapOffset)); 698 __ movp(rbx, FieldOperand(receiver, HeapObject::kMapOffset));
698 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, 699 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS,
699 FAST_ELEMENTS, 700 FAST_ELEMENTS,
700 rbx, 701 rbx,
701 rdi, 702 rdi,
702 slow); 703 slow);
703 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); 704 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS);
704 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); 705 ElementsTransitionGenerator::GenerateDoubleToObject(
706 masm, receiver, key, value, rbx, mode, slow);
705 __ movp(rbx, FieldOperand(receiver, JSObject::kElementsOffset)); 707 __ movp(rbx, FieldOperand(receiver, JSObject::kElementsOffset));
706 __ jmp(&finish_object_store); 708 __ jmp(&finish_object_store);
707 } 709 }
708 710
709 711
710 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, 712 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
711 StrictMode strict_mode) { 713 StrictMode strict_mode) {
712 // Return address is on the stack. 714 // Return address is on the stack.
713 Label slow, slow_with_tagged_index, fast_object, fast_object_grow; 715 Label slow, slow_with_tagged_index, fast_object, fast_object_grow;
714 Label fast_double, fast_double_grow; 716 Label fast_double, fast_double_grow;
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1279 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1278 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1280 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1279 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1281 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1280 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1282 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1281 } 1283 }
1282 1284
1283 1285
1284 } } // namespace v8::internal 1286 } } // namespace v8::internal
1285 1287
1286 #endif // V8_TARGET_ARCH_X64 1288 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698