| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
| 10 #include "src/lithium-allocator-inl.h" | 10 #include "src/lithium-allocator-inl.h" |
| (...skipping 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2265 ? UseTempRegister(instr->key()) | 2265 ? UseTempRegister(instr->key()) |
| 2266 : UseRegisterOrConstantAtStart(instr->key()); | 2266 : UseRegisterOrConstantAtStart(instr->key()); |
| 2267 } | 2267 } |
| 2268 LOperand* backing_store = UseRegister(instr->elements()); | 2268 LOperand* backing_store = UseRegister(instr->elements()); |
| 2269 return new(zone()) LStoreKeyed(backing_store, key, val); | 2269 return new(zone()) LStoreKeyed(backing_store, key, val); |
| 2270 } | 2270 } |
| 2271 | 2271 |
| 2272 | 2272 |
| 2273 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 2273 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
| 2274 LOperand* context = UseFixed(instr->context(), rsi); | 2274 LOperand* context = UseFixed(instr->context(), rsi); |
| 2275 LOperand* object = UseFixed(instr->object(), rdx); | 2275 LOperand* object = UseFixed(instr->object(), |
| 2276 LOperand* key = UseFixed(instr->key(), rcx); | 2276 KeyedStoreIC::ReceiverRegister()); |
| 2277 LOperand* value = UseFixed(instr->value(), rax); | 2277 LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister()); |
| 2278 LOperand* value = UseFixed(instr->value(), KeyedStoreIC::ValueRegister()); |
| 2278 | 2279 |
| 2279 ASSERT(instr->object()->representation().IsTagged()); | 2280 ASSERT(instr->object()->representation().IsTagged()); |
| 2280 ASSERT(instr->key()->representation().IsTagged()); | 2281 ASSERT(instr->key()->representation().IsTagged()); |
| 2281 ASSERT(instr->value()->representation().IsTagged()); | 2282 ASSERT(instr->value()->representation().IsTagged()); |
| 2282 | 2283 |
| 2283 LStoreKeyedGeneric* result = | 2284 LStoreKeyedGeneric* result = |
| 2284 new(zone()) LStoreKeyedGeneric(context, object, key, value); | 2285 new(zone()) LStoreKeyedGeneric(context, object, key, value); |
| 2285 return MarkAsCall(result, instr); | 2286 return MarkAsCall(result, instr); |
| 2286 } | 2287 } |
| 2287 | 2288 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2362 // have a store into the properties array (not in-object-property). | 2363 // have a store into the properties array (not in-object-property). |
| 2363 LOperand* temp = (!is_in_object || needs_write_barrier || | 2364 LOperand* temp = (!is_in_object || needs_write_barrier || |
| 2364 needs_write_barrier_for_map) ? TempRegister() : NULL; | 2365 needs_write_barrier_for_map) ? TempRegister() : NULL; |
| 2365 | 2366 |
| 2366 return new(zone()) LStoreNamedField(obj, val, temp); | 2367 return new(zone()) LStoreNamedField(obj, val, temp); |
| 2367 } | 2368 } |
| 2368 | 2369 |
| 2369 | 2370 |
| 2370 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2371 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
| 2371 LOperand* context = UseFixed(instr->context(), rsi); | 2372 LOperand* context = UseFixed(instr->context(), rsi); |
| 2372 LOperand* object = UseFixed(instr->object(), rdx); | 2373 LOperand* object = UseFixed(instr->object(), StoreIC::ReceiverRegister()); |
| 2373 LOperand* value = UseFixed(instr->value(), rax); | 2374 LOperand* value = UseFixed(instr->value(), StoreIC::ValueRegister()); |
| 2374 | 2375 |
| 2375 LStoreNamedGeneric* result = | 2376 LStoreNamedGeneric* result = |
| 2376 new(zone()) LStoreNamedGeneric(context, object, value); | 2377 new(zone()) LStoreNamedGeneric(context, object, value); |
| 2377 return MarkAsCall(result, instr); | 2378 return MarkAsCall(result, instr); |
| 2378 } | 2379 } |
| 2379 | 2380 |
| 2380 | 2381 |
| 2381 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2382 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
| 2382 LOperand* context = UseFixed(instr->context(), rsi); | 2383 LOperand* context = UseFixed(instr->context(), rsi); |
| 2383 LOperand* left = UseFixed(instr->left(), rdx); | 2384 LOperand* left = UseFixed(instr->left(), rdx); |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2642 LOperand* function = UseRegisterAtStart(instr->function()); | 2643 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2643 LAllocateBlockContext* result = | 2644 LAllocateBlockContext* result = |
| 2644 new(zone()) LAllocateBlockContext(context, function); | 2645 new(zone()) LAllocateBlockContext(context, function); |
| 2645 return MarkAsCall(DefineFixed(result, rsi), instr); | 2646 return MarkAsCall(DefineFixed(result, rsi), instr); |
| 2646 } | 2647 } |
| 2647 | 2648 |
| 2648 | 2649 |
| 2649 } } // namespace v8::internal | 2650 } } // namespace v8::internal |
| 2650 | 2651 |
| 2651 #endif // V8_TARGET_ARCH_X64 | 2652 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |