OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/arm64/lithium-codegen-arm64.h" | 9 #include "src/arm64/lithium-codegen-arm64.h" |
10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
(...skipping 2370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2381 LOperand* context = UseFixed(instr->context(), cp); | 2381 LOperand* context = UseFixed(instr->context(), cp); |
2382 LOperand* object = | 2382 LOperand* object = |
2383 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | 2383 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); |
2384 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); | 2384 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); |
2385 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | 2385 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); |
2386 | 2386 |
2387 DCHECK(instr->object()->representation().IsTagged()); | 2387 DCHECK(instr->object()->representation().IsTagged()); |
2388 DCHECK(instr->key()->representation().IsTagged()); | 2388 DCHECK(instr->key()->representation().IsTagged()); |
2389 DCHECK(instr->value()->representation().IsTagged()); | 2389 DCHECK(instr->value()->representation().IsTagged()); |
2390 | 2390 |
2391 return MarkAsCall( | 2391 LOperand* slot = NULL; |
2392 new(zone()) LStoreKeyedGeneric(context, object, key, value), instr); | 2392 LOperand* vector = NULL; |
| 2393 if (instr->HasVectorAndSlot()) { |
| 2394 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); |
| 2395 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); |
| 2396 } |
| 2397 |
| 2398 LStoreKeyedGeneric* result = new (zone()) |
| 2399 LStoreKeyedGeneric(context, object, key, value, slot, vector); |
| 2400 return MarkAsCall(result, instr); |
2393 } | 2401 } |
2394 | 2402 |
2395 | 2403 |
2396 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { | 2404 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
2397 // TODO(jbramley): It might be beneficial to allow value to be a constant in | 2405 // TODO(jbramley): It might be beneficial to allow value to be a constant in |
2398 // some cases. x64 makes use of this with FLAG_track_fields, for example. | 2406 // some cases. x64 makes use of this with FLAG_track_fields, for example. |
2399 | 2407 |
2400 LOperand* object = UseRegister(instr->object()); | 2408 LOperand* object = UseRegister(instr->object()); |
2401 LOperand* value; | 2409 LOperand* value; |
2402 LOperand* temp0 = NULL; | 2410 LOperand* temp0 = NULL; |
(...skipping 18 matching lines...) Expand all Loading... |
2421 return new(zone()) LStoreNamedField(object, value, temp0, temp1); | 2429 return new(zone()) LStoreNamedField(object, value, temp0, temp1); |
2422 } | 2430 } |
2423 | 2431 |
2424 | 2432 |
2425 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2433 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
2426 LOperand* context = UseFixed(instr->context(), cp); | 2434 LOperand* context = UseFixed(instr->context(), cp); |
2427 LOperand* object = | 2435 LOperand* object = |
2428 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | 2436 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); |
2429 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | 2437 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); |
2430 | 2438 |
2431 LInstruction* result = new(zone()) LStoreNamedGeneric(context, object, value); | 2439 LOperand* slot = NULL; |
| 2440 LOperand* vector = NULL; |
| 2441 if (instr->HasVectorAndSlot()) { |
| 2442 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); |
| 2443 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); |
| 2444 } |
| 2445 |
| 2446 LStoreNamedGeneric* result = |
| 2447 new (zone()) LStoreNamedGeneric(context, object, value, slot, vector); |
2432 return MarkAsCall(result, instr); | 2448 return MarkAsCall(result, instr); |
2433 } | 2449 } |
2434 | 2450 |
2435 | 2451 |
2436 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2452 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
2437 LOperand* context = UseFixed(instr->context(), cp); | 2453 LOperand* context = UseFixed(instr->context(), cp); |
2438 LOperand* left = UseFixed(instr->left(), x1); | 2454 LOperand* left = UseFixed(instr->left(), x1); |
2439 LOperand* right = UseFixed(instr->right(), x0); | 2455 LOperand* right = UseFixed(instr->right(), x0); |
2440 | 2456 |
2441 LStringAdd* result = new(zone()) LStringAdd(context, left, right); | 2457 LStringAdd* result = new(zone()) LStringAdd(context, left, right); |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2759 LOperand* context = UseFixed(instr->context(), cp); | 2775 LOperand* context = UseFixed(instr->context(), cp); |
2760 LOperand* function = UseRegisterAtStart(instr->function()); | 2776 LOperand* function = UseRegisterAtStart(instr->function()); |
2761 LAllocateBlockContext* result = | 2777 LAllocateBlockContext* result = |
2762 new(zone()) LAllocateBlockContext(context, function); | 2778 new(zone()) LAllocateBlockContext(context, function); |
2763 return MarkAsCall(DefineFixed(result, cp), instr); | 2779 return MarkAsCall(DefineFixed(result, cp), instr); |
2764 } | 2780 } |
2765 | 2781 |
2766 | 2782 |
2767 } // namespace internal | 2783 } // namespace internal |
2768 } // namespace v8 | 2784 } // namespace v8 |
OLD | NEW |