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 "src/crankshaft/arm/lithium-arm.h" | 5 #include "src/crankshaft/arm/lithium-arm.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/crankshaft/arm/lithium-codegen-arm.h" | 9 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2198 LInstruction* result = NULL; | 2198 LInstruction* result = NULL; |
2199 | 2199 |
2200 if (!instr->is_fixed_typed_array()) { | 2200 if (!instr->is_fixed_typed_array()) { |
2201 LOperand* obj = NULL; | 2201 LOperand* obj = NULL; |
2202 if (instr->representation().IsDouble()) { | 2202 if (instr->representation().IsDouble()) { |
2203 obj = UseRegister(instr->elements()); | 2203 obj = UseRegister(instr->elements()); |
2204 } else { | 2204 } else { |
2205 DCHECK(instr->representation().IsSmiOrTagged()); | 2205 DCHECK(instr->representation().IsSmiOrTagged()); |
2206 obj = UseRegisterAtStart(instr->elements()); | 2206 obj = UseRegisterAtStart(instr->elements()); |
2207 } | 2207 } |
2208 result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key)); | 2208 result = DefineAsRegister(new (zone()) LLoadKeyed(obj, key, nullptr)); |
2209 } else { | 2209 } else { |
2210 DCHECK( | 2210 DCHECK( |
2211 (instr->representation().IsInteger32() && | 2211 (instr->representation().IsInteger32() && |
2212 !IsDoubleOrFloatElementsKind(elements_kind)) || | 2212 !IsDoubleOrFloatElementsKind(elements_kind)) || |
2213 (instr->representation().IsDouble() && | 2213 (instr->representation().IsDouble() && |
2214 IsDoubleOrFloatElementsKind(elements_kind))); | 2214 IsDoubleOrFloatElementsKind(elements_kind))); |
2215 LOperand* backing_store = UseRegister(instr->elements()); | 2215 LOperand* backing_store = UseRegister(instr->elements()); |
2216 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); | 2216 LOperand* backing_store_owner = UseAny(instr->backing_store_owner()); |
| 2217 result = DefineAsRegister( |
| 2218 new (zone()) LLoadKeyed(backing_store, key, backing_store_owner)); |
2217 } | 2219 } |
2218 | 2220 |
2219 bool needs_environment; | 2221 bool needs_environment; |
2220 if (instr->is_fixed_typed_array()) { | 2222 if (instr->is_fixed_typed_array()) { |
2221 // see LCodeGen::DoLoadKeyedExternalArray | 2223 // see LCodeGen::DoLoadKeyedExternalArray |
2222 needs_environment = elements_kind == UINT32_ELEMENTS && | 2224 needs_environment = elements_kind == UINT32_ELEMENTS && |
2223 !instr->CheckFlag(HInstruction::kUint32); | 2225 !instr->CheckFlag(HInstruction::kUint32); |
2224 } else { | 2226 } else { |
2225 // see LCodeGen::DoLoadKeyedFixedDoubleArray and | 2227 // see LCodeGen::DoLoadKeyedFixedDoubleArray and |
2226 // LCodeGen::DoLoadKeyedFixedArray | 2228 // LCodeGen::DoLoadKeyedFixedArray |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2271 object = UseTempRegister(instr->elements()); | 2273 object = UseTempRegister(instr->elements()); |
2272 val = UseTempRegister(instr->value()); | 2274 val = UseTempRegister(instr->value()); |
2273 key = UseTempRegister(instr->key()); | 2275 key = UseTempRegister(instr->key()); |
2274 } else { | 2276 } else { |
2275 object = UseRegisterAtStart(instr->elements()); | 2277 object = UseRegisterAtStart(instr->elements()); |
2276 val = UseRegisterAtStart(instr->value()); | 2278 val = UseRegisterAtStart(instr->value()); |
2277 key = UseRegisterOrConstantAtStart(instr->key()); | 2279 key = UseRegisterOrConstantAtStart(instr->key()); |
2278 } | 2280 } |
2279 } | 2281 } |
2280 | 2282 |
2281 return new(zone()) LStoreKeyed(object, key, val); | 2283 return new (zone()) LStoreKeyed(object, key, val, nullptr); |
2282 } | 2284 } |
2283 | 2285 |
2284 DCHECK( | 2286 DCHECK( |
2285 (instr->value()->representation().IsInteger32() && | 2287 (instr->value()->representation().IsInteger32() && |
2286 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || | 2288 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || |
2287 (instr->value()->representation().IsDouble() && | 2289 (instr->value()->representation().IsDouble() && |
2288 IsDoubleOrFloatElementsKind(instr->elements_kind()))); | 2290 IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
2289 DCHECK(instr->elements()->representation().IsExternal()); | 2291 DCHECK(instr->elements()->representation().IsExternal()); |
2290 LOperand* val = UseRegister(instr->value()); | 2292 LOperand* val = UseRegister(instr->value()); |
2291 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 2293 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
2292 LOperand* backing_store = UseRegister(instr->elements()); | 2294 LOperand* backing_store = UseRegister(instr->elements()); |
2293 return new(zone()) LStoreKeyed(backing_store, key, val); | 2295 LOperand* backing_store_owner = UseAny(instr->backing_store_owner()); |
| 2296 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner); |
2294 } | 2297 } |
2295 | 2298 |
2296 | 2299 |
2297 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 2300 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
2298 LOperand* context = UseFixed(instr->context(), cp); | 2301 LOperand* context = UseFixed(instr->context(), cp); |
2299 LOperand* obj = | 2302 LOperand* obj = |
2300 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | 2303 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); |
2301 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); | 2304 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); |
2302 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | 2305 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); |
2303 | 2306 |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2658 HAllocateBlockContext* instr) { | 2661 HAllocateBlockContext* instr) { |
2659 LOperand* context = UseFixed(instr->context(), cp); | 2662 LOperand* context = UseFixed(instr->context(), cp); |
2660 LOperand* function = UseRegisterAtStart(instr->function()); | 2663 LOperand* function = UseRegisterAtStart(instr->function()); |
2661 LAllocateBlockContext* result = | 2664 LAllocateBlockContext* result = |
2662 new(zone()) LAllocateBlockContext(context, function); | 2665 new(zone()) LAllocateBlockContext(context, function); |
2663 return MarkAsCall(DefineFixed(result, cp), instr); | 2666 return MarkAsCall(DefineFixed(result, cp), instr); |
2664 } | 2667 } |
2665 | 2668 |
2666 } // namespace internal | 2669 } // namespace internal |
2667 } // namespace v8 | 2670 } // namespace v8 |
OLD | NEW |