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

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

Issue 6546036: Combine typed and pixel arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: final version Created 9 years, 9 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/ic-ia32.cc ('k') | src/ia32/lithium-ia32.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 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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 } 1074 }
1075 1075
1076 1076
1077 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { 1077 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) {
1078 Register result = ToRegister(instr->result()); 1078 Register result = ToRegister(instr->result());
1079 Register array = ToRegister(instr->InputAt(0)); 1079 Register array = ToRegister(instr->InputAt(0));
1080 __ mov(result, FieldOperand(array, FixedArray::kLengthOffset)); 1080 __ mov(result, FieldOperand(array, FixedArray::kLengthOffset));
1081 } 1081 }
1082 1082
1083 1083
1084 void LCodeGen::DoPixelArrayLength(LPixelArrayLength* instr) { 1084 void LCodeGen::DoExternalArrayLength(LExternalArrayLength* instr) {
1085 Register result = ToRegister(instr->result()); 1085 Register result = ToRegister(instr->result());
1086 Register array = ToRegister(instr->InputAt(0)); 1086 Register array = ToRegister(instr->InputAt(0));
1087 __ mov(result, FieldOperand(array, PixelArray::kLengthOffset)); 1087 __ mov(result, FieldOperand(array, ExternalArray::kLengthOffset));
1088 } 1088 }
1089 1089
1090 1090
1091 void LCodeGen::DoValueOf(LValueOf* instr) { 1091 void LCodeGen::DoValueOf(LValueOf* instr) {
1092 Register input = ToRegister(instr->InputAt(0)); 1092 Register input = ToRegister(instr->InputAt(0));
1093 Register result = ToRegister(instr->result()); 1093 Register result = ToRegister(instr->result());
1094 Register map = ToRegister(instr->TempAt(0)); 1094 Register map = ToRegister(instr->TempAt(0));
1095 ASSERT(input.is(result)); 1095 ASSERT(input.is(result));
1096 NearLabel done; 1096 NearLabel done;
1097 // If the object is a smi return the object. 1097 // If the object is a smi return the object.
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
2118 void LCodeGen::DoLoadElements(LLoadElements* instr) { 2118 void LCodeGen::DoLoadElements(LLoadElements* instr) {
2119 Register result = ToRegister(instr->result()); 2119 Register result = ToRegister(instr->result());
2120 Register input = ToRegister(instr->InputAt(0)); 2120 Register input = ToRegister(instr->InputAt(0));
2121 __ mov(result, FieldOperand(input, JSObject::kElementsOffset)); 2121 __ mov(result, FieldOperand(input, JSObject::kElementsOffset));
2122 if (FLAG_debug_code) { 2122 if (FLAG_debug_code) {
2123 NearLabel done; 2123 NearLabel done;
2124 __ cmp(FieldOperand(result, HeapObject::kMapOffset), 2124 __ cmp(FieldOperand(result, HeapObject::kMapOffset),
2125 Immediate(Factory::fixed_array_map())); 2125 Immediate(Factory::fixed_array_map()));
2126 __ j(equal, &done); 2126 __ j(equal, &done);
2127 __ cmp(FieldOperand(result, HeapObject::kMapOffset), 2127 __ cmp(FieldOperand(result, HeapObject::kMapOffset),
2128 Immediate(Factory::pixel_array_map())); 2128 Immediate(Factory::external_pixel_array_map()));
2129 __ j(equal, &done); 2129 __ j(equal, &done);
2130 __ cmp(FieldOperand(result, HeapObject::kMapOffset), 2130 __ cmp(FieldOperand(result, HeapObject::kMapOffset),
2131 Immediate(Factory::fixed_cow_array_map())); 2131 Immediate(Factory::fixed_cow_array_map()));
2132 __ Check(equal, "Check for fast elements or pixel array failed."); 2132 __ Check(equal, "Check for fast elements or pixel array failed.");
2133 __ bind(&done); 2133 __ bind(&done);
2134 } 2134 }
2135 } 2135 }
2136 2136
2137 2137
2138 void LCodeGen::DoLoadPixelArrayExternalPointer( 2138 void LCodeGen::DoLoadExternalArrayPointer(
2139 LLoadPixelArrayExternalPointer* instr) { 2139 LLoadExternalArrayPointer* instr) {
2140 Register result = ToRegister(instr->result()); 2140 Register result = ToRegister(instr->result());
2141 Register input = ToRegister(instr->InputAt(0)); 2141 Register input = ToRegister(instr->InputAt(0));
2142 __ mov(result, FieldOperand(input, PixelArray::kExternalPointerOffset)); 2142 __ mov(result, FieldOperand(input,
2143 ExternalArray::kExternalPointerOffset));
2143 } 2144 }
2144 2145
2145 2146
2146 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { 2147 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) {
2147 Register arguments = ToRegister(instr->arguments()); 2148 Register arguments = ToRegister(instr->arguments());
2148 Register length = ToRegister(instr->length()); 2149 Register length = ToRegister(instr->length());
2149 Operand index = ToOperand(instr->index()); 2150 Operand index = ToOperand(instr->index());
2150 Register result = ToRegister(instr->result()); 2151 Register result = ToRegister(instr->result());
2151 2152
2152 __ sub(length, index); 2153 __ sub(length, index);
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after
3869 ASSERT(osr_pc_offset_ == -1); 3870 ASSERT(osr_pc_offset_ == -1);
3870 osr_pc_offset_ = masm()->pc_offset(); 3871 osr_pc_offset_ = masm()->pc_offset();
3871 } 3872 }
3872 3873
3873 3874
3874 #undef __ 3875 #undef __
3875 3876
3876 } } // namespace v8::internal 3877 } } // namespace v8::internal
3877 3878
3878 #endif // V8_TARGET_ARCH_IA32 3879 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698