| OLD | NEW |
| 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 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 } | 1060 } |
| 1061 | 1061 |
| 1062 | 1062 |
| 1063 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { | 1063 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { |
| 1064 Register result = ToRegister(instr->result()); | 1064 Register result = ToRegister(instr->result()); |
| 1065 Register array = ToRegister(instr->InputAt(0)); | 1065 Register array = ToRegister(instr->InputAt(0)); |
| 1066 __ movq(result, FieldOperand(array, FixedArray::kLengthOffset)); | 1066 __ movq(result, FieldOperand(array, FixedArray::kLengthOffset)); |
| 1067 } | 1067 } |
| 1068 | 1068 |
| 1069 | 1069 |
| 1070 void LCodeGen::DoPixelArrayLength(LPixelArrayLength* instr) { | 1070 void LCodeGen::DoExternalArrayLength(LExternalArrayLength* instr) { |
| 1071 Register result = ToRegister(instr->result()); | 1071 Register result = ToRegister(instr->result()); |
| 1072 Register array = ToRegister(instr->InputAt(0)); | 1072 Register array = ToRegister(instr->InputAt(0)); |
| 1073 __ movq(result, FieldOperand(array, PixelArray::kLengthOffset)); | 1073 __ movq(result, FieldOperand(array, ExternalPixelArray::kLengthOffset)); |
| 1074 } | 1074 } |
| 1075 | 1075 |
| 1076 | 1076 |
| 1077 void LCodeGen::DoValueOf(LValueOf* instr) { | 1077 void LCodeGen::DoValueOf(LValueOf* instr) { |
| 1078 Register input = ToRegister(instr->InputAt(0)); | 1078 Register input = ToRegister(instr->InputAt(0)); |
| 1079 Register result = ToRegister(instr->result()); | 1079 Register result = ToRegister(instr->result()); |
| 1080 ASSERT(input.is(result)); | 1080 ASSERT(input.is(result)); |
| 1081 NearLabel done; | 1081 NearLabel done; |
| 1082 // If the object is a smi return the object. | 1082 // If the object is a smi return the object. |
| 1083 __ JumpIfSmi(input, &done); | 1083 __ JumpIfSmi(input, &done); |
| (...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2065 void LCodeGen::DoLoadElements(LLoadElements* instr) { | 2065 void LCodeGen::DoLoadElements(LLoadElements* instr) { |
| 2066 Register result = ToRegister(instr->result()); | 2066 Register result = ToRegister(instr->result()); |
| 2067 Register input = ToRegister(instr->InputAt(0)); | 2067 Register input = ToRegister(instr->InputAt(0)); |
| 2068 __ movq(result, FieldOperand(input, JSObject::kElementsOffset)); | 2068 __ movq(result, FieldOperand(input, JSObject::kElementsOffset)); |
| 2069 if (FLAG_debug_code) { | 2069 if (FLAG_debug_code) { |
| 2070 NearLabel done; | 2070 NearLabel done; |
| 2071 __ Cmp(FieldOperand(result, HeapObject::kMapOffset), | 2071 __ Cmp(FieldOperand(result, HeapObject::kMapOffset), |
| 2072 Factory::fixed_array_map()); | 2072 Factory::fixed_array_map()); |
| 2073 __ j(equal, &done); | 2073 __ j(equal, &done); |
| 2074 __ Cmp(FieldOperand(result, HeapObject::kMapOffset), | 2074 __ Cmp(FieldOperand(result, HeapObject::kMapOffset), |
| 2075 Factory::pixel_array_map()); | 2075 Factory::external_pixel_array_map()); |
| 2076 __ j(equal, &done); | 2076 __ j(equal, &done); |
| 2077 __ Cmp(FieldOperand(result, HeapObject::kMapOffset), | 2077 __ Cmp(FieldOperand(result, HeapObject::kMapOffset), |
| 2078 Factory::fixed_cow_array_map()); | 2078 Factory::fixed_cow_array_map()); |
| 2079 __ Check(equal, "Check for fast elements failed."); | 2079 __ Check(equal, "Check for fast elements failed."); |
| 2080 __ bind(&done); | 2080 __ bind(&done); |
| 2081 } | 2081 } |
| 2082 } | 2082 } |
| 2083 | 2083 |
| 2084 | 2084 |
| 2085 void LCodeGen::DoLoadPixelArrayExternalPointer( | 2085 void LCodeGen::DoLoadExternalArrayPointer( |
| 2086 LLoadPixelArrayExternalPointer* instr) { | 2086 LLoadExternalArrayPointer* instr) { |
| 2087 Register result = ToRegister(instr->result()); | 2087 Register result = ToRegister(instr->result()); |
| 2088 Register input = ToRegister(instr->InputAt(0)); | 2088 Register input = ToRegister(instr->InputAt(0)); |
| 2089 __ movq(result, FieldOperand(input, PixelArray::kExternalPointerOffset)); | 2089 __ movq(result, FieldOperand(input, |
| 2090 ExternalPixelArray::kExternalPointerOffset)); |
| 2090 } | 2091 } |
| 2091 | 2092 |
| 2092 | 2093 |
| 2093 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { | 2094 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { |
| 2094 Register arguments = ToRegister(instr->arguments()); | 2095 Register arguments = ToRegister(instr->arguments()); |
| 2095 Register length = ToRegister(instr->length()); | 2096 Register length = ToRegister(instr->length()); |
| 2096 Register result = ToRegister(instr->result()); | 2097 Register result = ToRegister(instr->result()); |
| 2097 | 2098 |
| 2098 if (instr->index()->IsRegister()) { | 2099 if (instr->index()->IsRegister()) { |
| 2099 __ subl(length, ToRegister(instr->index())); | 2100 __ subl(length, ToRegister(instr->index())); |
| (...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3664 RegisterEnvironmentForDeoptimization(environment); | 3665 RegisterEnvironmentForDeoptimization(environment); |
| 3665 ASSERT(osr_pc_offset_ == -1); | 3666 ASSERT(osr_pc_offset_ == -1); |
| 3666 osr_pc_offset_ = masm()->pc_offset(); | 3667 osr_pc_offset_ = masm()->pc_offset(); |
| 3667 } | 3668 } |
| 3668 | 3669 |
| 3669 #undef __ | 3670 #undef __ |
| 3670 | 3671 |
| 3671 } } // namespace v8::internal | 3672 } } // namespace v8::internal |
| 3672 | 3673 |
| 3673 #endif // V8_TARGET_ARCH_X64 | 3674 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |