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/x64/ic-x64.cc

Issue 10442015: Rollback of r11638, r11636 on trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 6 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/full-codegen-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 __ ret(0); 762 __ ret(0);
763 763
764 __ bind(&transition_smi_elements); 764 __ bind(&transition_smi_elements);
765 __ movq(rbx, FieldOperand(rdx, HeapObject::kMapOffset)); 765 __ movq(rbx, FieldOperand(rdx, HeapObject::kMapOffset));
766 766
767 // Transition the array appropriately depending on the value type. 767 // Transition the array appropriately depending on the value type.
768 __ movq(r9, FieldOperand(rax, HeapObject::kMapOffset)); 768 __ movq(r9, FieldOperand(rax, HeapObject::kMapOffset));
769 __ CompareRoot(r9, Heap::kHeapNumberMapRootIndex); 769 __ CompareRoot(r9, Heap::kHeapNumberMapRootIndex);
770 __ j(not_equal, &non_double_value); 770 __ j(not_equal, &non_double_value);
771 771
772 // Value is a double. Transition FAST_SMI_ELEMENTS -> 772 // Value is a double. Transition FAST_SMI_ONLY_ELEMENTS ->
773 // FAST_DOUBLE_ELEMENTS and complete the store. 773 // FAST_DOUBLE_ELEMENTS and complete the store.
774 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 774 __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS,
775 FAST_DOUBLE_ELEMENTS, 775 FAST_DOUBLE_ELEMENTS,
776 rbx, 776 rbx,
777 rdi, 777 rdi,
778 &slow); 778 &slow);
779 ElementsTransitionGenerator::GenerateSmiToDouble(masm, &slow); 779 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &slow);
780 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); 780 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset));
781 __ jmp(&fast_double_without_map_check); 781 __ jmp(&fast_double_without_map_check);
782 782
783 __ bind(&non_double_value); 783 __ bind(&non_double_value);
784 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS 784 // Value is not a double, FAST_SMI_ONLY_ELEMENTS -> FAST_ELEMENTS
785 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 785 __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS,
786 FAST_ELEMENTS, 786 FAST_ELEMENTS,
787 rbx, 787 rbx,
788 rdi, 788 rdi,
789 &slow); 789 &slow);
790 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm); 790 ElementsTransitionGenerator::GenerateSmiOnlyToObject(masm);
791 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); 791 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset));
792 __ jmp(&finish_object_store); 792 __ jmp(&finish_object_store);
793 793
794 __ bind(&transition_double_elements); 794 __ bind(&transition_double_elements);
795 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a 795 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a
796 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and 796 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and
797 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS 797 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS
798 __ movq(rbx, FieldOperand(rdx, HeapObject::kMapOffset)); 798 __ movq(rbx, FieldOperand(rdx, HeapObject::kMapOffset));
799 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, 799 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS,
800 FAST_ELEMENTS, 800 FAST_ELEMENTS,
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
1635 1635
1636 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { 1636 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) {
1637 // ----------- S t a t e ------------- 1637 // ----------- S t a t e -------------
1638 // -- rbx : target map 1638 // -- rbx : target map
1639 // -- rdx : receiver 1639 // -- rdx : receiver
1640 // -- rsp[0] : return address 1640 // -- rsp[0] : return address
1641 // ----------------------------------- 1641 // -----------------------------------
1642 // Must return the modified receiver in eax. 1642 // Must return the modified receiver in eax.
1643 if (!FLAG_trace_elements_transitions) { 1643 if (!FLAG_trace_elements_transitions) {
1644 Label fail; 1644 Label fail;
1645 ElementsTransitionGenerator::GenerateSmiToDouble(masm, &fail); 1645 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail);
1646 __ movq(rax, rdx); 1646 __ movq(rax, rdx);
1647 __ Ret(); 1647 __ Ret();
1648 __ bind(&fail); 1648 __ bind(&fail);
1649 } 1649 }
1650 1650
1651 __ pop(rbx); 1651 __ pop(rbx);
1652 __ push(rdx); 1652 __ push(rdx);
1653 __ push(rbx); // return address 1653 __ push(rbx); // return address
1654 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); 1654 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1);
1655 } 1655 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1778 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1778 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1779 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1779 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1780 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1780 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1781 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1781 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1782 } 1782 }
1783 1783
1784 1784
1785 } } // namespace v8::internal 1785 } } // namespace v8::internal
1786 1786
1787 #endif // V8_TARGET_ARCH_X64 1787 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698