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 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 } | 1079 } |
1080 | 1080 |
1081 | 1081 |
1082 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { | 1082 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { |
1083 Register result = ToRegister(instr->result()); | 1083 Register result = ToRegister(instr->result()); |
1084 Register array = ToRegister(instr->InputAt(0)); | 1084 Register array = ToRegister(instr->InputAt(0)); |
1085 __ mov(result, FieldOperand(array, FixedArray::kLengthOffset)); | 1085 __ mov(result, FieldOperand(array, FixedArray::kLengthOffset)); |
1086 } | 1086 } |
1087 | 1087 |
1088 | 1088 |
1089 void LCodeGen::DoPixelArrayLength(LPixelArrayLength* instr) { | 1089 void LCodeGen::DoExternalArrayLength(LExternalArrayLength* instr) { |
1090 Register result = ToRegister(instr->result()); | 1090 Register result = ToRegister(instr->result()); |
1091 Register array = ToRegister(instr->InputAt(0)); | 1091 Register array = ToRegister(instr->InputAt(0)); |
1092 __ mov(result, FieldOperand(array, PixelArray::kLengthOffset)); | 1092 __ mov(result, FieldOperand(array, ExternalArray::kLengthOffset)); |
1093 } | 1093 } |
1094 | 1094 |
1095 | 1095 |
1096 void LCodeGen::DoValueOf(LValueOf* instr) { | 1096 void LCodeGen::DoValueOf(LValueOf* instr) { |
1097 Register input = ToRegister(instr->InputAt(0)); | 1097 Register input = ToRegister(instr->InputAt(0)); |
1098 Register result = ToRegister(instr->result()); | 1098 Register result = ToRegister(instr->result()); |
1099 Register map = ToRegister(instr->TempAt(0)); | 1099 Register map = ToRegister(instr->TempAt(0)); |
1100 ASSERT(input.is(result)); | 1100 ASSERT(input.is(result)); |
1101 NearLabel done; | 1101 NearLabel done; |
1102 // If the object is a smi return the object. | 1102 // If the object is a smi return the object. |
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2123 void LCodeGen::DoLoadElements(LLoadElements* instr) { | 2123 void LCodeGen::DoLoadElements(LLoadElements* instr) { |
2124 Register result = ToRegister(instr->result()); | 2124 Register result = ToRegister(instr->result()); |
2125 Register input = ToRegister(instr->InputAt(0)); | 2125 Register input = ToRegister(instr->InputAt(0)); |
2126 __ mov(result, FieldOperand(input, JSObject::kElementsOffset)); | 2126 __ mov(result, FieldOperand(input, JSObject::kElementsOffset)); |
2127 if (FLAG_debug_code) { | 2127 if (FLAG_debug_code) { |
2128 NearLabel done; | 2128 NearLabel done; |
2129 __ cmp(FieldOperand(result, HeapObject::kMapOffset), | 2129 __ cmp(FieldOperand(result, HeapObject::kMapOffset), |
2130 Immediate(Factory::fixed_array_map())); | 2130 Immediate(Factory::fixed_array_map())); |
2131 __ j(equal, &done); | 2131 __ j(equal, &done); |
2132 __ cmp(FieldOperand(result, HeapObject::kMapOffset), | 2132 __ cmp(FieldOperand(result, HeapObject::kMapOffset), |
2133 Immediate(Factory::pixel_array_map())); | 2133 Immediate(Factory::external_pixel_array_map())); |
2134 __ j(equal, &done); | 2134 __ j(equal, &done); |
2135 __ cmp(FieldOperand(result, HeapObject::kMapOffset), | 2135 __ cmp(FieldOperand(result, HeapObject::kMapOffset), |
2136 Immediate(Factory::fixed_cow_array_map())); | 2136 Immediate(Factory::fixed_cow_array_map())); |
2137 __ Check(equal, "Check for fast elements or pixel array failed."); | 2137 __ Check(equal, "Check for fast elements or pixel array failed."); |
2138 __ bind(&done); | 2138 __ bind(&done); |
2139 } | 2139 } |
2140 } | 2140 } |
2141 | 2141 |
2142 | 2142 |
2143 void LCodeGen::DoLoadPixelArrayExternalPointer( | 2143 void LCodeGen::DoLoadExternalArrayPointer( |
2144 LLoadPixelArrayExternalPointer* instr) { | 2144 LLoadExternalArrayPointer* instr) { |
2145 Register result = ToRegister(instr->result()); | 2145 Register result = ToRegister(instr->result()); |
2146 Register input = ToRegister(instr->InputAt(0)); | 2146 Register input = ToRegister(instr->InputAt(0)); |
2147 __ mov(result, FieldOperand(input, PixelArray::kExternalPointerOffset)); | 2147 __ mov(result, FieldOperand(input, |
| 2148 ExternalArray::kExternalPointerOffset)); |
2148 } | 2149 } |
2149 | 2150 |
2150 | 2151 |
2151 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { | 2152 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { |
2152 Register arguments = ToRegister(instr->arguments()); | 2153 Register arguments = ToRegister(instr->arguments()); |
2153 Register length = ToRegister(instr->length()); | 2154 Register length = ToRegister(instr->length()); |
2154 Operand index = ToOperand(instr->index()); | 2155 Operand index = ToOperand(instr->index()); |
2155 Register result = ToRegister(instr->result()); | 2156 Register result = ToRegister(instr->result()); |
2156 | 2157 |
2157 __ sub(length, index); | 2158 __ sub(length, index); |
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3874 ASSERT(osr_pc_offset_ == -1); | 3875 ASSERT(osr_pc_offset_ == -1); |
3875 osr_pc_offset_ = masm()->pc_offset(); | 3876 osr_pc_offset_ = masm()->pc_offset(); |
3876 } | 3877 } |
3877 | 3878 |
3878 | 3879 |
3879 #undef __ | 3880 #undef __ |
3880 | 3881 |
3881 } } // namespace v8::internal | 3882 } } // namespace v8::internal |
3882 | 3883 |
3883 #endif // V8_TARGET_ARCH_IA32 | 3884 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |