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