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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 6546036: Combine typed and pixel arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix wrong external element call Created 9 years, 10 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 } 914 }
915 915
916 916
917 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { 917 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) {
918 Register result = ToRegister(instr->result()); 918 Register result = ToRegister(instr->result());
919 Register array = ToRegister(instr->InputAt(0)); 919 Register array = ToRegister(instr->InputAt(0));
920 __ movq(result, FieldOperand(array, FixedArray::kLengthOffset)); 920 __ movq(result, FieldOperand(array, FixedArray::kLengthOffset));
921 } 921 }
922 922
923 923
924 void LCodeGen::DoPixelArrayLength(LPixelArrayLength* instr) { 924 void LCodeGen::DoExternalArrayLength(LExternalArrayLength* instr) {
925 Register result = ToRegister(instr->result()); 925 Register result = ToRegister(instr->result());
926 Register array = ToRegister(instr->InputAt(0)); 926 Register array = ToRegister(instr->InputAt(0));
927 __ movq(result, FieldOperand(array, PixelArray::kLengthOffset)); 927 __ movq(result, FieldOperand(array, ExternalPixelArray::kLengthOffset));
928 } 928 }
929 929
930 930
931 void LCodeGen::DoValueOf(LValueOf* instr) { 931 void LCodeGen::DoValueOf(LValueOf* instr) {
932 Abort("Unimplemented: %s", "DoValueOf"); 932 Abort("Unimplemented: %s", "DoValueOf");
933 } 933 }
934 934
935 935
936 void LCodeGen::DoBitNotI(LBitNotI* instr) { 936 void LCodeGen::DoBitNotI(LBitNotI* instr) {
937 LOperand* input = instr->InputAt(0); 937 LOperand* input = instr->InputAt(0);
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 void LCodeGen::DoLoadElements(LLoadElements* instr) { 1788 void LCodeGen::DoLoadElements(LLoadElements* instr) {
1789 Register result = ToRegister(instr->result()); 1789 Register result = ToRegister(instr->result());
1790 Register input = ToRegister(instr->InputAt(0)); 1790 Register input = ToRegister(instr->InputAt(0));
1791 __ movq(result, FieldOperand(input, JSObject::kElementsOffset)); 1791 __ movq(result, FieldOperand(input, JSObject::kElementsOffset));
1792 if (FLAG_debug_code) { 1792 if (FLAG_debug_code) {
1793 NearLabel done; 1793 NearLabel done;
1794 __ Cmp(FieldOperand(result, HeapObject::kMapOffset), 1794 __ Cmp(FieldOperand(result, HeapObject::kMapOffset),
1795 Factory::fixed_array_map()); 1795 Factory::fixed_array_map());
1796 __ j(equal, &done); 1796 __ j(equal, &done);
1797 __ Cmp(FieldOperand(result, HeapObject::kMapOffset), 1797 __ Cmp(FieldOperand(result, HeapObject::kMapOffset),
1798 Factory::pixel_array_map()); 1798 Factory::external_pixel_array_map());
1799 __ j(equal, &done); 1799 __ j(equal, &done);
1800 __ Cmp(FieldOperand(result, HeapObject::kMapOffset), 1800 __ Cmp(FieldOperand(result, HeapObject::kMapOffset),
1801 Factory::fixed_cow_array_map()); 1801 Factory::fixed_cow_array_map());
1802 __ Check(equal, "Check for fast elements failed."); 1802 __ Check(equal, "Check for fast elements failed.");
1803 __ bind(&done); 1803 __ bind(&done);
1804 } 1804 }
1805 } 1805 }
1806 1806
1807 1807
1808 void LCodeGen::DoLoadPixelArrayExternalPointer( 1808 void LCodeGen::DoLoadExternalArrayPointer(
1809 LLoadPixelArrayExternalPointer* instr) { 1809 LLoadExternalArrayPointer* instr) {
1810 Register result = ToRegister(instr->result()); 1810 Register result = ToRegister(instr->result());
1811 Register input = ToRegister(instr->InputAt(0)); 1811 Register input = ToRegister(instr->InputAt(0));
1812 __ movq(result, FieldOperand(input, PixelArray::kExternalPointerOffset)); 1812 __ movq(result, FieldOperand(input,
1813 ExternalPixelArray::kExternalPointerOffset));
1813 } 1814 }
1814 1815
1815 1816
1816 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { 1817 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) {
1817 Register arguments = ToRegister(instr->arguments()); 1818 Register arguments = ToRegister(instr->arguments());
1818 Register length = ToRegister(instr->length()); 1819 Register length = ToRegister(instr->length());
1819 Register result = ToRegister(instr->result()); 1820 Register result = ToRegister(instr->result());
1820 1821
1821 if (instr->index()->IsRegister()) { 1822 if (instr->index()->IsRegister()) {
1822 __ subl(length, ToRegister(instr->index())); 1823 __ subl(length, ToRegister(instr->index()));
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
2772 RegisterEnvironmentForDeoptimization(environment); 2773 RegisterEnvironmentForDeoptimization(environment);
2773 ASSERT(osr_pc_offset_ == -1); 2774 ASSERT(osr_pc_offset_ == -1);
2774 osr_pc_offset_ = masm()->pc_offset(); 2775 osr_pc_offset_ = masm()->pc_offset();
2775 } 2776 }
2776 2777
2777 #undef __ 2778 #undef __
2778 2779
2779 } } // namespace v8::internal 2780 } } // namespace v8::internal
2780 2781
2781 #endif // V8_TARGET_ARCH_X64 2782 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/objects.cc ('K') | « src/x64/ic-x64.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698