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