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_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
10 | 10 |
(...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2173 } else { | 2173 } else { |
2174 DCHECK( | 2174 DCHECK( |
2175 (instr->representation().IsInteger32() && | 2175 (instr->representation().IsInteger32() && |
2176 !IsDoubleOrFloatElementsKind(elements_kind)) || | 2176 !IsDoubleOrFloatElementsKind(elements_kind)) || |
2177 (instr->representation().IsDouble() && | 2177 (instr->representation().IsDouble() && |
2178 IsDoubleOrFloatElementsKind(elements_kind))); | 2178 IsDoubleOrFloatElementsKind(elements_kind))); |
2179 LOperand* backing_store = UseRegister(instr->elements()); | 2179 LOperand* backing_store = UseRegister(instr->elements()); |
2180 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); | 2180 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); |
2181 } | 2181 } |
2182 | 2182 |
2183 if ((instr->is_external() || instr->is_fixed_typed_array()) ? | 2183 bool needs_environment; |
2184 // see LCodeGen::DoLoadKeyedExternalArray | 2184 if (instr->is_external() || instr->is_fixed_typed_array()) { |
2185 ((elements_kind == EXTERNAL_UINT32_ELEMENTS || | 2185 // see LCodeGen::DoLoadKeyedExternalArray |
2186 elements_kind == UINT32_ELEMENTS) && | 2186 needs_environment = (elements_kind == EXTERNAL_UINT32_ELEMENTS || |
2187 !instr->CheckFlag(HInstruction::kUint32)) : | 2187 elements_kind == UINT32_ELEMENTS) && |
2188 // see LCodeGen::DoLoadKeyedFixedDoubleArray and | 2188 !instr->CheckFlag(HInstruction::kUint32); |
2189 // LCodeGen::DoLoadKeyedFixedArray | 2189 } else { |
2190 instr->RequiresHoleCheck()) { | 2190 // see LCodeGen::DoLoadKeyedFixedDoubleArray and |
| 2191 // LCodeGen::DoLoadKeyedFixedArray |
| 2192 needs_environment = |
| 2193 instr->RequiresHoleCheck() || |
| 2194 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub()); |
| 2195 } |
| 2196 |
| 2197 if (needs_environment) { |
2191 result = AssignEnvironment(result); | 2198 result = AssignEnvironment(result); |
2192 } | 2199 } |
2193 return result; | 2200 return result; |
2194 } | 2201 } |
2195 | 2202 |
2196 | 2203 |
2197 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2204 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
2198 LOperand* context = UseFixed(instr->context(), cp); | 2205 LOperand* context = UseFixed(instr->context(), cp); |
2199 LOperand* object = | 2206 LOperand* object = |
2200 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2207 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2598 LOperand* function = UseRegisterAtStart(instr->function()); | 2605 LOperand* function = UseRegisterAtStart(instr->function()); |
2599 LAllocateBlockContext* result = | 2606 LAllocateBlockContext* result = |
2600 new(zone()) LAllocateBlockContext(context, function); | 2607 new(zone()) LAllocateBlockContext(context, function); |
2601 return MarkAsCall(DefineFixed(result, cp), instr); | 2608 return MarkAsCall(DefineFixed(result, cp), instr); |
2602 } | 2609 } |
2603 | 2610 |
2604 | 2611 |
2605 } } // namespace v8::internal | 2612 } } // namespace v8::internal |
2606 | 2613 |
2607 #endif // V8_TARGET_ARCH_MIPS64 | 2614 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |