| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ppc/lithium-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-ppc.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/lithium-inl.h" | 10 #include "src/crankshaft/lithium-inl.h" |
| (...skipping 2132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2143 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 2143 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
| 2144 LInstruction* result = NULL; | 2144 LInstruction* result = NULL; |
| 2145 | 2145 |
| 2146 if (!instr->is_fixed_typed_array()) { | 2146 if (!instr->is_fixed_typed_array()) { |
| 2147 LOperand* obj = NULL; | 2147 LOperand* obj = NULL; |
| 2148 if (instr->representation().IsDouble()) { | 2148 if (instr->representation().IsDouble()) { |
| 2149 obj = UseRegister(instr->elements()); | 2149 obj = UseRegister(instr->elements()); |
| 2150 } else { | 2150 } else { |
| 2151 obj = UseRegisterAtStart(instr->elements()); | 2151 obj = UseRegisterAtStart(instr->elements()); |
| 2152 } | 2152 } |
| 2153 result = DefineAsRegister(new (zone()) LLoadKeyed(obj, key)); | 2153 result = DefineAsRegister(new (zone()) LLoadKeyed(obj, key, nullptr)); |
| 2154 } else { | 2154 } else { |
| 2155 DCHECK((instr->representation().IsInteger32() && | 2155 DCHECK((instr->representation().IsInteger32() && |
| 2156 !IsDoubleOrFloatElementsKind(elements_kind)) || | 2156 !IsDoubleOrFloatElementsKind(elements_kind)) || |
| 2157 (instr->representation().IsDouble() && | 2157 (instr->representation().IsDouble() && |
| 2158 IsDoubleOrFloatElementsKind(elements_kind))); | 2158 IsDoubleOrFloatElementsKind(elements_kind))); |
| 2159 LOperand* backing_store = UseRegister(instr->elements()); | 2159 LOperand* backing_store = UseRegister(instr->elements()); |
| 2160 result = DefineAsRegister(new (zone()) LLoadKeyed(backing_store, key)); | 2160 LOperand* backing_store_owner = UseAny(instr->backing_store_owner()); |
| 2161 result = DefineAsRegister( |
| 2162 new (zone()) LLoadKeyed(backing_store, key, backing_store_owner)); |
| 2161 } | 2163 } |
| 2162 | 2164 |
| 2163 bool needs_environment; | 2165 bool needs_environment; |
| 2164 if (instr->is_fixed_typed_array()) { | 2166 if (instr->is_fixed_typed_array()) { |
| 2165 // see LCodeGen::DoLoadKeyedExternalArray | 2167 // see LCodeGen::DoLoadKeyedExternalArray |
| 2166 needs_environment = elements_kind == UINT32_ELEMENTS && | 2168 needs_environment = elements_kind == UINT32_ELEMENTS && |
| 2167 !instr->CheckFlag(HInstruction::kUint32); | 2169 !instr->CheckFlag(HInstruction::kUint32); |
| 2168 } else { | 2170 } else { |
| 2169 // see LCodeGen::DoLoadKeyedFixedDoubleArray and | 2171 // see LCodeGen::DoLoadKeyedFixedDoubleArray and |
| 2170 // LCodeGen::DoLoadKeyedFixedArray | 2172 // LCodeGen::DoLoadKeyedFixedArray |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2213 object = UseTempRegister(instr->elements()); | 2215 object = UseTempRegister(instr->elements()); |
| 2214 val = UseTempRegister(instr->value()); | 2216 val = UseTempRegister(instr->value()); |
| 2215 key = UseTempRegister(instr->key()); | 2217 key = UseTempRegister(instr->key()); |
| 2216 } else { | 2218 } else { |
| 2217 object = UseRegisterAtStart(instr->elements()); | 2219 object = UseRegisterAtStart(instr->elements()); |
| 2218 val = UseRegisterAtStart(instr->value()); | 2220 val = UseRegisterAtStart(instr->value()); |
| 2219 key = UseRegisterOrConstantAtStart(instr->key()); | 2221 key = UseRegisterOrConstantAtStart(instr->key()); |
| 2220 } | 2222 } |
| 2221 } | 2223 } |
| 2222 | 2224 |
| 2223 return new (zone()) LStoreKeyed(object, key, val); | 2225 return new (zone()) LStoreKeyed(object, key, val, nullptr); |
| 2224 } | 2226 } |
| 2225 | 2227 |
| 2226 DCHECK((instr->value()->representation().IsInteger32() && | 2228 DCHECK((instr->value()->representation().IsInteger32() && |
| 2227 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || | 2229 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || |
| 2228 (instr->value()->representation().IsDouble() && | 2230 (instr->value()->representation().IsDouble() && |
| 2229 IsDoubleOrFloatElementsKind(instr->elements_kind()))); | 2231 IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
| 2230 DCHECK(instr->elements()->representation().IsExternal()); | 2232 DCHECK(instr->elements()->representation().IsExternal()); |
| 2231 LOperand* val = UseRegister(instr->value()); | 2233 LOperand* val = UseRegister(instr->value()); |
| 2232 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 2234 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
| 2233 LOperand* backing_store = UseRegister(instr->elements()); | 2235 LOperand* backing_store = UseRegister(instr->elements()); |
| 2234 return new (zone()) LStoreKeyed(backing_store, key, val); | 2236 LOperand* backing_store_owner = UseAny(instr->backing_store_owner()); |
| 2237 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner); |
| 2235 } | 2238 } |
| 2236 | 2239 |
| 2237 | 2240 |
| 2238 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 2241 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
| 2239 LOperand* context = UseFixed(instr->context(), cp); | 2242 LOperand* context = UseFixed(instr->context(), cp); |
| 2240 LOperand* obj = | 2243 LOperand* obj = |
| 2241 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | 2244 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); |
| 2242 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); | 2245 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); |
| 2243 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | 2246 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); |
| 2244 | 2247 |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2581 LInstruction* LChunkBuilder::DoAllocateBlockContext( | 2584 LInstruction* LChunkBuilder::DoAllocateBlockContext( |
| 2582 HAllocateBlockContext* instr) { | 2585 HAllocateBlockContext* instr) { |
| 2583 LOperand* context = UseFixed(instr->context(), cp); | 2586 LOperand* context = UseFixed(instr->context(), cp); |
| 2584 LOperand* function = UseRegisterAtStart(instr->function()); | 2587 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2585 LAllocateBlockContext* result = | 2588 LAllocateBlockContext* result = |
| 2586 new (zone()) LAllocateBlockContext(context, function); | 2589 new (zone()) LAllocateBlockContext(context, function); |
| 2587 return MarkAsCall(DefineFixed(result, cp), instr); | 2590 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2588 } | 2591 } |
| 2589 } // namespace internal | 2592 } // namespace internal |
| 2590 } // namespace v8 | 2593 } // namespace v8 |
| OLD | NEW |