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

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

Issue 10209027: Implement tracking and optimizations of packed arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: New upload Created 8 years, 8 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
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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 890
891 __ bind(&transition_smi_elements); 891 __ bind(&transition_smi_elements);
892 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); 892 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
893 893
894 // Transition the array appropriately depending on the value type. 894 // Transition the array appropriately depending on the value type.
895 __ CheckMap(eax, 895 __ CheckMap(eax,
896 masm->isolate()->factory()->heap_number_map(), 896 masm->isolate()->factory()->heap_number_map(),
897 &non_double_value, 897 &non_double_value,
898 DONT_DO_SMI_CHECK); 898 DONT_DO_SMI_CHECK);
899 899
900 // Value is a double. Transition FAST_SMI_ONLY_ELEMENTS -> 900 // Value is a double. Transition Smi elements ->
901 // FAST_DOUBLE_ELEMENTS and complete the store. 901 // double and complete the store.
902 __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS, 902 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
903 FAST_DOUBLE_ELEMENTS, 903 FAST_DOUBLE_ELEMENTS,
904 ebx, 904 ebx,
905 edi, 905 edi,
906 &slow); 906 &slow);
907 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &slow); 907 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &slow);
908 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset)); 908 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset));
909 __ jmp(&fast_double_without_map_check); 909 __ jmp(&fast_double_without_map_check);
910 910
911 __ bind(&non_double_value); 911 __ bind(&non_double_value);
912 // Value is not a double, FAST_SMI_ONLY_ELEMENTS -> FAST_ELEMENTS 912 // Value is not a double, FAST_SMI_ONLY_ELEMENTS -> FAST_ELEMENTS
913 __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS, 913 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
914 FAST_ELEMENTS, 914 FAST_ELEMENTS,
915 ebx, 915 ebx,
916 edi, 916 edi,
917 &slow); 917 &slow);
918 ElementsTransitionGenerator::GenerateSmiOnlyToObject(masm); 918 ElementsTransitionGenerator::GenerateMapChangeElementTransition(masm);
919 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset)); 919 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset));
920 __ jmp(&finish_object_store); 920 __ jmp(&finish_object_store);
921 921
922 __ bind(&transition_double_elements); 922 __ bind(&transition_double_elements);
923 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a 923 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a
924 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and 924 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and
925 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS 925 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS
926 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); 926 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
927 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, 927 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS,
928 FAST_ELEMENTS, 928 FAST_ELEMENTS,
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 Condition cc = *jmp_address == Assembler::kJncShortOpcode 1769 Condition cc = *jmp_address == Assembler::kJncShortOpcode
1770 ? not_zero 1770 ? not_zero
1771 : zero; 1771 : zero;
1772 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1772 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1773 } 1773 }
1774 1774
1775 1775
1776 } } // namespace v8::internal 1776 } } // namespace v8::internal
1777 1777
1778 #endif // V8_TARGET_ARCH_IA32 1778 #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') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698