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

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

Issue 11817017: Additional work to get array literal allocation tracking working, even with --always-opt (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Quick adjustment to bit fields Created 7 years, 11 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.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 // 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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 __ CompareRoot(r9, Heap::kHeapNumberMapRootIndex); 702 __ CompareRoot(r9, Heap::kHeapNumberMapRootIndex);
703 __ j(not_equal, &non_double_value); 703 __ j(not_equal, &non_double_value);
704 704
705 // Value is a double. Transition FAST_SMI_ELEMENTS -> 705 // Value is a double. Transition FAST_SMI_ELEMENTS ->
706 // FAST_DOUBLE_ELEMENTS and complete the store. 706 // FAST_DOUBLE_ELEMENTS and complete the store.
707 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 707 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
708 FAST_DOUBLE_ELEMENTS, 708 FAST_DOUBLE_ELEMENTS,
709 rbx, 709 rbx,
710 rdi, 710 rdi,
711 slow); 711 slow);
712 ElementsTransitionGenerator::GenerateSmiToDouble(masm, slow); 712 AllocationSiteMode mode = AllocationSiteInfo::GetMode(FAST_SMI_ELEMENTS,
713 FAST_DOUBLE_ELEMENTS);
714 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, slow);
713 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); 715 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset));
714 __ jmp(&fast_double_without_map_check); 716 __ jmp(&fast_double_without_map_check);
715 717
716 __ bind(&non_double_value); 718 __ bind(&non_double_value);
717 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS 719 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS
718 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 720 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
719 FAST_ELEMENTS, 721 FAST_ELEMENTS,
720 rbx, 722 rbx,
721 rdi, 723 rdi,
722 slow); 724 slow);
723 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm); 725 mode = AllocationSiteInfo::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS);
726 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm, mode,
727 slow);
724 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); 728 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset));
725 __ jmp(&finish_object_store); 729 __ jmp(&finish_object_store);
726 730
727 __ bind(&transition_double_elements); 731 __ bind(&transition_double_elements);
728 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a 732 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a
729 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and 733 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and
730 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS 734 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS
731 __ movq(rbx, FieldOperand(rdx, HeapObject::kMapOffset)); 735 __ movq(rbx, FieldOperand(rdx, HeapObject::kMapOffset));
732 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, 736 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS,
733 FAST_ELEMENTS, 737 FAST_ELEMENTS,
734 rbx, 738 rbx,
735 rdi, 739 rdi,
736 slow); 740 slow);
737 ElementsTransitionGenerator::GenerateDoubleToObject(masm, slow); 741 mode = AllocationSiteInfo::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS);
742 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow);
738 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); 743 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset));
739 __ jmp(&finish_object_store); 744 __ jmp(&finish_object_store);
740 } 745 }
741 746
742 747
743 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, 748 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
744 StrictModeFlag strict_mode) { 749 StrictModeFlag strict_mode) {
745 // ----------- S t a t e ------------- 750 // ----------- S t a t e -------------
746 // -- rax : value 751 // -- rax : value
747 // -- rcx : key 752 // -- rcx : key
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 1668
1664 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { 1669 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) {
1665 // ----------- S t a t e ------------- 1670 // ----------- S t a t e -------------
1666 // -- rbx : target map 1671 // -- rbx : target map
1667 // -- rdx : receiver 1672 // -- rdx : receiver
1668 // -- rsp[0] : return address 1673 // -- rsp[0] : return address
1669 // ----------------------------------- 1674 // -----------------------------------
1670 // Must return the modified receiver in eax. 1675 // Must return the modified receiver in eax.
1671 if (!FLAG_trace_elements_transitions) { 1676 if (!FLAG_trace_elements_transitions) {
1672 Label fail; 1677 Label fail;
1673 ElementsTransitionGenerator::GenerateSmiToDouble(masm, &fail); 1678 AllocationSiteMode mode = AllocationSiteInfo::GetMode(FAST_SMI_ELEMENTS,
1679 FAST_DOUBLE_ELEMENTS);
1680 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, &fail);
1674 __ movq(rax, rdx); 1681 __ movq(rax, rdx);
1675 __ Ret(); 1682 __ Ret();
1676 __ bind(&fail); 1683 __ bind(&fail);
1677 } 1684 }
1678 1685
1679 __ pop(rbx); 1686 __ pop(rbx);
1680 __ push(rdx); 1687 __ push(rdx);
1681 __ push(rbx); // return address 1688 __ push(rbx); // return address
1682 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); 1689 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1);
1683 } 1690 }
1684 1691
1685 1692
1686 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( 1693 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject(
1687 MacroAssembler* masm) { 1694 MacroAssembler* masm) {
1688 // ----------- S t a t e ------------- 1695 // ----------- S t a t e -------------
1689 // -- rbx : target map 1696 // -- rbx : target map
1690 // -- rdx : receiver 1697 // -- rdx : receiver
1691 // -- rsp[0] : return address 1698 // -- rsp[0] : return address
1692 // ----------------------------------- 1699 // -----------------------------------
1693 // Must return the modified receiver in eax. 1700 // Must return the modified receiver in eax.
1694 if (!FLAG_trace_elements_transitions) { 1701 if (!FLAG_trace_elements_transitions) {
1695 Label fail; 1702 Label fail;
1696 ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail); 1703 AllocationSiteMode mode = AllocationSiteInfo::GetMode(FAST_DOUBLE_ELEMENTS,
1704 FAST_ELEMENTS);
1705 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail);
1697 __ movq(rax, rdx); 1706 __ movq(rax, rdx);
1698 __ Ret(); 1707 __ Ret();
1699 __ bind(&fail); 1708 __ bind(&fail);
1700 } 1709 }
1701 1710
1702 __ pop(rbx); 1711 __ pop(rbx);
1703 __ push(rdx); 1712 __ push(rdx);
1704 __ push(rbx); // return address 1713 __ push(rbx); // return address
1705 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); 1714 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1);
1706 } 1715 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1782 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1774 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1783 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1775 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1784 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1776 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1785 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1777 } 1786 }
1778 1787
1779 1788
1780 } } // namespace v8::internal 1789 } } // namespace v8::internal
1781 1790
1782 #endif // V8_TARGET_ARCH_X64 1791 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/lithium-codegen-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698