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

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

Issue 10442015: Rollback of r11638, r11636 on trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 7 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/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 882
883 __ bind(&transition_smi_elements); 883 __ bind(&transition_smi_elements);
884 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); 884 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
885 885
886 // Transition the array appropriately depending on the value type. 886 // Transition the array appropriately depending on the value type.
887 __ CheckMap(eax, 887 __ CheckMap(eax,
888 masm->isolate()->factory()->heap_number_map(), 888 masm->isolate()->factory()->heap_number_map(),
889 &non_double_value, 889 &non_double_value,
890 DONT_DO_SMI_CHECK); 890 DONT_DO_SMI_CHECK);
891 891
892 // Value is a double. Transition FAST_SMI_ELEMENTS -> FAST_DOUBLE_ELEMENTS 892 // Value is a double. Transition FAST_SMI_ONLY_ELEMENTS ->
893 // and complete the store. 893 // FAST_DOUBLE_ELEMENTS and complete the store.
894 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 894 __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS,
895 FAST_DOUBLE_ELEMENTS, 895 FAST_DOUBLE_ELEMENTS,
896 ebx, 896 ebx,
897 edi, 897 edi,
898 &slow); 898 &slow);
899 ElementsTransitionGenerator::GenerateSmiToDouble(masm, &slow); 899 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &slow);
900 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset)); 900 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset));
901 __ jmp(&fast_double_without_map_check); 901 __ jmp(&fast_double_without_map_check);
902 902
903 __ bind(&non_double_value); 903 __ bind(&non_double_value);
904 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS 904 // Value is not a double, FAST_SMI_ONLY_ELEMENTS -> FAST_ELEMENTS
905 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 905 __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS,
906 FAST_ELEMENTS, 906 FAST_ELEMENTS,
907 ebx, 907 ebx,
908 edi, 908 edi,
909 &slow); 909 &slow);
910 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm); 910 ElementsTransitionGenerator::GenerateSmiOnlyToObject(masm);
911 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset)); 911 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset));
912 __ jmp(&finish_object_store); 912 __ jmp(&finish_object_store);
913 913
914 __ bind(&transition_double_elements); 914 __ bind(&transition_double_elements);
915 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a 915 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a
916 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and 916 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and
917 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS 917 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS
918 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); 918 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
919 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, 919 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS,
920 FAST_ELEMENTS, 920 FAST_ELEMENTS,
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 1615
1616 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { 1616 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) {
1617 // ----------- S t a t e ------------- 1617 // ----------- S t a t e -------------
1618 // -- ebx : target map 1618 // -- ebx : target map
1619 // -- edx : receiver 1619 // -- edx : receiver
1620 // -- esp[0] : return address 1620 // -- esp[0] : return address
1621 // ----------------------------------- 1621 // -----------------------------------
1622 // Must return the modified receiver in eax. 1622 // Must return the modified receiver in eax.
1623 if (!FLAG_trace_elements_transitions) { 1623 if (!FLAG_trace_elements_transitions) {
1624 Label fail; 1624 Label fail;
1625 ElementsTransitionGenerator::GenerateSmiToDouble(masm, &fail); 1625 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail);
1626 __ mov(eax, edx); 1626 __ mov(eax, edx);
1627 __ Ret(); 1627 __ Ret();
1628 __ bind(&fail); 1628 __ bind(&fail);
1629 } 1629 }
1630 1630
1631 __ pop(ebx); 1631 __ pop(ebx);
1632 __ push(edx); 1632 __ push(edx);
1633 __ push(ebx); // return address 1633 __ push(ebx); // return address
1634 // Leaving the code managed by the register allocator and return to the 1634 // Leaving the code managed by the register allocator and return to the
1635 // convention of using esi as context register. 1635 // convention of using esi as context register.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1765 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1766 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1766 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1767 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1767 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1768 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1768 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1769 } 1769 }
1770 1770
1771 1771
1772 } } // namespace v8::internal 1772 } } // namespace v8::internal
1773 1773
1774 #endif // V8_TARGET_ARCH_IA32 1774 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698