OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2174 } else { | 2174 } else { |
2175 DCHECK( | 2175 DCHECK( |
2176 (instr->representation().IsInteger32() && | 2176 (instr->representation().IsInteger32() && |
2177 !IsDoubleOrFloatElementsKind(elements_kind)) || | 2177 !IsDoubleOrFloatElementsKind(elements_kind)) || |
2178 (instr->representation().IsDouble() && | 2178 (instr->representation().IsDouble() && |
2179 IsDoubleOrFloatElementsKind(elements_kind))); | 2179 IsDoubleOrFloatElementsKind(elements_kind))); |
2180 LOperand* backing_store = UseRegister(instr->elements()); | 2180 LOperand* backing_store = UseRegister(instr->elements()); |
2181 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); | 2181 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); |
2182 } | 2182 } |
2183 | 2183 |
2184 if ((instr->is_external() || instr->is_fixed_typed_array()) ? | 2184 bool needs_environment; |
2185 // see LCodeGen::DoLoadKeyedExternalArray | 2185 if (instr->is_external() || instr->is_fixed_typed_array()) { |
2186 ((elements_kind == EXTERNAL_UINT32_ELEMENTS || | 2186 // see LCodeGen::DoLoadKeyedExternalArray |
2187 elements_kind == UINT32_ELEMENTS) && | 2187 needs_environment = (elements_kind == EXTERNAL_UINT32_ELEMENTS || |
2188 !instr->CheckFlag(HInstruction::kUint32)) : | 2188 elements_kind == UINT32_ELEMENTS) && |
2189 // see LCodeGen::DoLoadKeyedFixedDoubleArray and | 2189 !instr->CheckFlag(HInstruction::kUint32); |
2190 // LCodeGen::DoLoadKeyedFixedArray | 2190 } else { |
2191 instr->RequiresHoleCheck()) { | 2191 // see LCodeGen::DoLoadKeyedFixedDoubleArray and |
| 2192 // LCodeGen::DoLoadKeyedFixedArray |
| 2193 needs_environment = |
| 2194 instr->RequiresHoleCheck() || |
| 2195 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub()); |
| 2196 } |
| 2197 |
| 2198 if (needs_environment) { |
2192 result = AssignEnvironment(result); | 2199 result = AssignEnvironment(result); |
2193 } | 2200 } |
2194 return result; | 2201 return result; |
2195 } | 2202 } |
2196 | 2203 |
2197 | 2204 |
2198 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2205 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
2199 LOperand* context = UseFixed(instr->context(), cp); | 2206 LOperand* context = UseFixed(instr->context(), cp); |
2200 LOperand* object = | 2207 LOperand* object = |
2201 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2208 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2598 LOperand* context = UseFixed(instr->context(), cp); | 2605 LOperand* context = UseFixed(instr->context(), cp); |
2599 LOperand* function = UseRegisterAtStart(instr->function()); | 2606 LOperand* function = UseRegisterAtStart(instr->function()); |
2600 LAllocateBlockContext* result = | 2607 LAllocateBlockContext* result = |
2601 new(zone()) LAllocateBlockContext(context, function); | 2608 new(zone()) LAllocateBlockContext(context, function); |
2602 return MarkAsCall(DefineFixed(result, cp), instr); | 2609 return MarkAsCall(DefineFixed(result, cp), instr); |
2603 } | 2610 } |
2604 | 2611 |
2605 } } // namespace v8::internal | 2612 } } // namespace v8::internal |
2606 | 2613 |
2607 #endif // V8_TARGET_ARCH_MIPS | 2614 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |