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

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: 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/x64/ic-x64.cc ('k') | src/x64/lithium-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 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 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 } 1049 }
1050 1050
1051 1051
1052 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { 1052 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) {
1053 Register result = ToRegister(instr->result()); 1053 Register result = ToRegister(instr->result());
1054 Register array = ToRegister(instr->InputAt(0)); 1054 Register array = ToRegister(instr->InputAt(0));
1055 __ movq(result, FieldOperand(array, FixedArray::kLengthOffset)); 1055 __ movq(result, FieldOperand(array, FixedArray::kLengthOffset));
1056 } 1056 }
1057 1057
1058 1058
1059 void LCodeGen::DoPixelArrayLength(LPixelArrayLength* instr) { 1059 void LCodeGen::DoExternalArrayLength(LExternalArrayLength* instr) {
1060 Register result = ToRegister(instr->result()); 1060 Register result = ToRegister(instr->result());
1061 Register array = ToRegister(instr->InputAt(0)); 1061 Register array = ToRegister(instr->InputAt(0));
1062 __ movq(result, FieldOperand(array, PixelArray::kLengthOffset)); 1062 __ movq(result, FieldOperand(array, ExternalPixelArray::kLengthOffset));
1063 } 1063 }
1064 1064
1065 1065
1066 void LCodeGen::DoValueOf(LValueOf* instr) { 1066 void LCodeGen::DoValueOf(LValueOf* instr) {
1067 Register input = ToRegister(instr->InputAt(0)); 1067 Register input = ToRegister(instr->InputAt(0));
1068 Register result = ToRegister(instr->result()); 1068 Register result = ToRegister(instr->result());
1069 ASSERT(input.is(result)); 1069 ASSERT(input.is(result));
1070 NearLabel done; 1070 NearLabel done;
1071 // If the object is a smi return the object. 1071 // If the object is a smi return the object.
1072 __ JumpIfSmi(input, &done); 1072 __ JumpIfSmi(input, &done);
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 void LCodeGen::DoLoadElements(LLoadElements* instr) { 2054 void LCodeGen::DoLoadElements(LLoadElements* instr) {
2055 Register result = ToRegister(instr->result()); 2055 Register result = ToRegister(instr->result());
2056 Register input = ToRegister(instr->InputAt(0)); 2056 Register input = ToRegister(instr->InputAt(0));
2057 __ movq(result, FieldOperand(input, JSObject::kElementsOffset)); 2057 __ movq(result, FieldOperand(input, JSObject::kElementsOffset));
2058 if (FLAG_debug_code) { 2058 if (FLAG_debug_code) {
2059 NearLabel done; 2059 NearLabel done;
2060 __ Cmp(FieldOperand(result, HeapObject::kMapOffset), 2060 __ Cmp(FieldOperand(result, HeapObject::kMapOffset),
2061 Factory::fixed_array_map()); 2061 Factory::fixed_array_map());
2062 __ j(equal, &done); 2062 __ j(equal, &done);
2063 __ Cmp(FieldOperand(result, HeapObject::kMapOffset), 2063 __ Cmp(FieldOperand(result, HeapObject::kMapOffset),
2064 Factory::pixel_array_map()); 2064 Factory::external_pixel_array_map());
2065 __ j(equal, &done); 2065 __ j(equal, &done);
2066 __ Cmp(FieldOperand(result, HeapObject::kMapOffset), 2066 __ Cmp(FieldOperand(result, HeapObject::kMapOffset),
2067 Factory::fixed_cow_array_map()); 2067 Factory::fixed_cow_array_map());
2068 __ Check(equal, "Check for fast elements failed."); 2068 __ Check(equal, "Check for fast elements failed.");
2069 __ bind(&done); 2069 __ bind(&done);
2070 } 2070 }
2071 } 2071 }
2072 2072
2073 2073
2074 void LCodeGen::DoLoadPixelArrayExternalPointer( 2074 void LCodeGen::DoLoadExternalArrayPointer(
2075 LLoadPixelArrayExternalPointer* instr) { 2075 LLoadExternalArrayPointer* instr) {
2076 Register result = ToRegister(instr->result()); 2076 Register result = ToRegister(instr->result());
2077 Register input = ToRegister(instr->InputAt(0)); 2077 Register input = ToRegister(instr->InputAt(0));
2078 __ movq(result, FieldOperand(input, PixelArray::kExternalPointerOffset)); 2078 __ movq(result, FieldOperand(input,
2079 ExternalPixelArray::kExternalPointerOffset));
2079 } 2080 }
2080 2081
2081 2082
2082 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { 2083 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) {
2083 Register arguments = ToRegister(instr->arguments()); 2084 Register arguments = ToRegister(instr->arguments());
2084 Register length = ToRegister(instr->length()); 2085 Register length = ToRegister(instr->length());
2085 Register result = ToRegister(instr->result()); 2086 Register result = ToRegister(instr->result());
2086 2087
2087 if (instr->index()->IsRegister()) { 2088 if (instr->index()->IsRegister()) {
2088 __ subl(length, ToRegister(instr->index())); 2089 __ subl(length, ToRegister(instr->index()));
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
3653 RegisterEnvironmentForDeoptimization(environment); 3654 RegisterEnvironmentForDeoptimization(environment);
3654 ASSERT(osr_pc_offset_ == -1); 3655 ASSERT(osr_pc_offset_ == -1);
3655 osr_pc_offset_ = masm()->pc_offset(); 3656 osr_pc_offset_ = masm()->pc_offset();
3656 } 3657 }
3657 3658
3658 #undef __ 3659 #undef __
3659 3660
3660 } } // namespace v8::internal 3661 } } // namespace v8::internal
3661 3662
3662 #endif // V8_TARGET_ARCH_X64 3663 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « 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