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/mips/lithium-mips.h" | 5 #include "src/crankshaft/mips/lithium-mips.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2132 LInstruction* result = NULL; | 2132 LInstruction* result = NULL; |
2133 | 2133 |
2134 if (!instr->is_fixed_typed_array()) { | 2134 if (!instr->is_fixed_typed_array()) { |
2135 LOperand* obj = NULL; | 2135 LOperand* obj = NULL; |
2136 if (instr->representation().IsDouble()) { | 2136 if (instr->representation().IsDouble()) { |
2137 obj = UseRegister(instr->elements()); | 2137 obj = UseRegister(instr->elements()); |
2138 } else { | 2138 } else { |
2139 DCHECK(instr->representation().IsSmiOrTagged()); | 2139 DCHECK(instr->representation().IsSmiOrTagged()); |
2140 obj = UseRegisterAtStart(instr->elements()); | 2140 obj = UseRegisterAtStart(instr->elements()); |
2141 } | 2141 } |
2142 result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key)); | 2142 result = DefineAsRegister(new (zone()) LLoadKeyed(obj, key, nullptr)); |
2143 } else { | 2143 } else { |
2144 DCHECK( | 2144 DCHECK( |
2145 (instr->representation().IsInteger32() && | 2145 (instr->representation().IsInteger32() && |
2146 !IsDoubleOrFloatElementsKind(elements_kind)) || | 2146 !IsDoubleOrFloatElementsKind(elements_kind)) || |
2147 (instr->representation().IsDouble() && | 2147 (instr->representation().IsDouble() && |
2148 IsDoubleOrFloatElementsKind(elements_kind))); | 2148 IsDoubleOrFloatElementsKind(elements_kind))); |
2149 LOperand* backing_store = UseRegister(instr->elements()); | 2149 LOperand* backing_store = UseRegister(instr->elements()); |
2150 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); | 2150 LOperand* backing_store_owner = UseAny(instr->backing_store_owner()); |
| 2151 result = DefineAsRegister( |
| 2152 new (zone()) LLoadKeyed(backing_store, key, backing_store_owner)); |
2151 } | 2153 } |
2152 | 2154 |
2153 bool needs_environment; | 2155 bool needs_environment; |
2154 if (instr->is_fixed_typed_array()) { | 2156 if (instr->is_fixed_typed_array()) { |
2155 // see LCodeGen::DoLoadKeyedExternalArray | 2157 // see LCodeGen::DoLoadKeyedExternalArray |
2156 needs_environment = elements_kind == UINT32_ELEMENTS && | 2158 needs_environment = elements_kind == UINT32_ELEMENTS && |
2157 !instr->CheckFlag(HInstruction::kUint32); | 2159 !instr->CheckFlag(HInstruction::kUint32); |
2158 } else { | 2160 } else { |
2159 // see LCodeGen::DoLoadKeyedFixedDoubleArray and | 2161 // see LCodeGen::DoLoadKeyedFixedDoubleArray and |
2160 // LCodeGen::DoLoadKeyedFixedArray | 2162 // LCodeGen::DoLoadKeyedFixedArray |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2205 object = UseTempRegister(instr->elements()); | 2207 object = UseTempRegister(instr->elements()); |
2206 val = UseTempRegister(instr->value()); | 2208 val = UseTempRegister(instr->value()); |
2207 key = UseTempRegister(instr->key()); | 2209 key = UseTempRegister(instr->key()); |
2208 } else { | 2210 } else { |
2209 object = UseRegisterAtStart(instr->elements()); | 2211 object = UseRegisterAtStart(instr->elements()); |
2210 val = UseRegisterAtStart(instr->value()); | 2212 val = UseRegisterAtStart(instr->value()); |
2211 key = UseRegisterOrConstantAtStart(instr->key()); | 2213 key = UseRegisterOrConstantAtStart(instr->key()); |
2212 } | 2214 } |
2213 } | 2215 } |
2214 | 2216 |
2215 return new(zone()) LStoreKeyed(object, key, val); | 2217 return new (zone()) LStoreKeyed(object, key, val, nullptr); |
2216 } | 2218 } |
2217 | 2219 |
2218 DCHECK( | 2220 DCHECK( |
2219 (instr->value()->representation().IsInteger32() && | 2221 (instr->value()->representation().IsInteger32() && |
2220 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || | 2222 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || |
2221 (instr->value()->representation().IsDouble() && | 2223 (instr->value()->representation().IsDouble() && |
2222 IsDoubleOrFloatElementsKind(instr->elements_kind()))); | 2224 IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
2223 DCHECK(instr->elements()->representation().IsExternal()); | 2225 DCHECK(instr->elements()->representation().IsExternal()); |
2224 LOperand* val = UseRegister(instr->value()); | 2226 LOperand* val = UseRegister(instr->value()); |
2225 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 2227 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
2226 LOperand* backing_store = UseRegister(instr->elements()); | 2228 LOperand* backing_store = UseRegister(instr->elements()); |
2227 return new(zone()) LStoreKeyed(backing_store, key, val); | 2229 LOperand* backing_store_owner = UseAny(instr->backing_store_owner()); |
| 2230 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner); |
2228 } | 2231 } |
2229 | 2232 |
2230 | 2233 |
2231 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 2234 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
2232 LOperand* context = UseFixed(instr->context(), cp); | 2235 LOperand* context = UseFixed(instr->context(), cp); |
2233 LOperand* obj = | 2236 LOperand* obj = |
2234 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | 2237 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); |
2235 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); | 2238 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); |
2236 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | 2239 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); |
2237 | 2240 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2582 LOperand* function = UseRegisterAtStart(instr->function()); | 2585 LOperand* function = UseRegisterAtStart(instr->function()); |
2583 LAllocateBlockContext* result = | 2586 LAllocateBlockContext* result = |
2584 new(zone()) LAllocateBlockContext(context, function); | 2587 new(zone()) LAllocateBlockContext(context, function); |
2585 return MarkAsCall(DefineFixed(result, cp), instr); | 2588 return MarkAsCall(DefineFixed(result, cp), instr); |
2586 } | 2589 } |
2587 | 2590 |
2588 } // namespace internal | 2591 } // namespace internal |
2589 } // namespace v8 | 2592 } // namespace v8 |
2590 | 2593 |
2591 #endif // V8_TARGET_ARCH_MIPS | 2594 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |