| 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_X64 | 9 #if V8_TARGET_ARCH_X64 |
| 10 | 10 |
| (...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2210 } else { | 2210 } else { |
| 2211 DCHECK( | 2211 DCHECK( |
| 2212 (instr->representation().IsInteger32() && | 2212 (instr->representation().IsInteger32() && |
| 2213 !(IsDoubleOrFloatElementsKind(elements_kind))) || | 2213 !(IsDoubleOrFloatElementsKind(elements_kind))) || |
| 2214 (instr->representation().IsDouble() && | 2214 (instr->representation().IsDouble() && |
| 2215 (IsDoubleOrFloatElementsKind(elements_kind)))); | 2215 (IsDoubleOrFloatElementsKind(elements_kind)))); |
| 2216 LOperand* backing_store = UseRegister(instr->elements()); | 2216 LOperand* backing_store = UseRegister(instr->elements()); |
| 2217 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); | 2217 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); |
| 2218 } | 2218 } |
| 2219 | 2219 |
| 2220 if ((instr->is_external() || instr->is_fixed_typed_array()) ? | 2220 bool needs_environment; |
| 2221 // see LCodeGen::DoLoadKeyedExternalArray | 2221 if (instr->is_external() || instr->is_fixed_typed_array()) { |
| 2222 ((elements_kind == EXTERNAL_UINT32_ELEMENTS || | 2222 // see LCodeGen::DoLoadKeyedExternalArray |
| 2223 elements_kind == UINT32_ELEMENTS) && | 2223 needs_environment = (elements_kind == EXTERNAL_UINT32_ELEMENTS || |
| 2224 !instr->CheckFlag(HInstruction::kUint32)) : | 2224 elements_kind == UINT32_ELEMENTS) && |
| 2225 // see LCodeGen::DoLoadKeyedFixedDoubleArray and | 2225 !instr->CheckFlag(HInstruction::kUint32); |
| 2226 // LCodeGen::DoLoadKeyedFixedArray | 2226 } else { |
| 2227 instr->RequiresHoleCheck()) { | 2227 // see LCodeGen::DoLoadKeyedFixedDoubleArray and |
| 2228 // LCodeGen::DoLoadKeyedFixedArray |
| 2229 needs_environment = |
| 2230 instr->RequiresHoleCheck() || |
| 2231 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub()); |
| 2232 } |
| 2233 |
| 2234 if (needs_environment) { |
| 2228 result = AssignEnvironment(result); | 2235 result = AssignEnvironment(result); |
| 2229 } | 2236 } |
| 2230 return result; | 2237 return result; |
| 2231 } | 2238 } |
| 2232 | 2239 |
| 2233 | 2240 |
| 2234 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2241 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
| 2235 LOperand* context = UseFixed(instr->context(), rsi); | 2242 LOperand* context = UseFixed(instr->context(), rsi); |
| 2236 LOperand* object = | 2243 LOperand* object = |
| 2237 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2244 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2686 LOperand* function = UseRegisterAtStart(instr->function()); | 2693 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2687 LAllocateBlockContext* result = | 2694 LAllocateBlockContext* result = |
| 2688 new(zone()) LAllocateBlockContext(context, function); | 2695 new(zone()) LAllocateBlockContext(context, function); |
| 2689 return MarkAsCall(DefineFixed(result, rsi), instr); | 2696 return MarkAsCall(DefineFixed(result, rsi), instr); |
| 2690 } | 2697 } |
| 2691 | 2698 |
| 2692 | 2699 |
| 2693 } } // namespace v8::internal | 2700 } } // namespace v8::internal |
| 2694 | 2701 |
| 2695 #endif // V8_TARGET_ARCH_X64 | 2702 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |