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 "src/crankshaft/arm64/lithium-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-arm64.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" | 9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_DOUBLE_REGISTER); | 520 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_DOUBLE_REGISTER); |
521 int vreg = allocator_->GetVirtualRegister(); | 521 int vreg = allocator_->GetVirtualRegister(); |
522 if (!allocator_->AllocationOk()) { | 522 if (!allocator_->AllocationOk()) { |
523 Abort(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister); | 523 Abort(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister); |
524 vreg = 0; | 524 vreg = 0; |
525 } | 525 } |
526 operand->set_virtual_register(vreg); | 526 operand->set_virtual_register(vreg); |
527 return operand; | 527 return operand; |
528 } | 528 } |
529 | 529 |
530 int LPlatformChunk::GetNextSpillIndex() { return current_frame_slots_++; } | 530 |
| 531 int LPlatformChunk::GetNextSpillIndex() { |
| 532 return spill_slot_count_++; |
| 533 } |
| 534 |
531 | 535 |
532 LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) { | 536 LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) { |
533 int index = GetNextSpillIndex(); | 537 int index = GetNextSpillIndex(); |
534 if (kind == DOUBLE_REGISTERS) { | 538 if (kind == DOUBLE_REGISTERS) { |
535 return LDoubleStackSlot::Create(index, zone()); | 539 return LDoubleStackSlot::Create(index, zone()); |
536 } else { | 540 } else { |
537 DCHECK(kind == GENERAL_REGISTERS); | 541 DCHECK(kind == GENERAL_REGISTERS); |
538 return LStackSlot::Create(index, zone()); | 542 return LStackSlot::Create(index, zone()); |
539 } | 543 } |
540 } | 544 } |
(...skipping 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2636 int env_index = instr->index(); | 2640 int env_index = instr->index(); |
2637 int spill_index = 0; | 2641 int spill_index = 0; |
2638 if (instr->environment()->is_parameter_index(env_index)) { | 2642 if (instr->environment()->is_parameter_index(env_index)) { |
2639 spill_index = chunk_->GetParameterStackSlot(env_index); | 2643 spill_index = chunk_->GetParameterStackSlot(env_index); |
2640 } else { | 2644 } else { |
2641 spill_index = env_index - instr->environment()->first_local_index(); | 2645 spill_index = env_index - instr->environment()->first_local_index(); |
2642 if (spill_index > LUnallocated::kMaxFixedSlotIndex) { | 2646 if (spill_index > LUnallocated::kMaxFixedSlotIndex) { |
2643 Retry(kTooManySpillSlotsNeededForOSR); | 2647 Retry(kTooManySpillSlotsNeededForOSR); |
2644 spill_index = 0; | 2648 spill_index = 0; |
2645 } | 2649 } |
2646 spill_index += StandardFrameConstants::kFixedSlotCount; | |
2647 } | 2650 } |
2648 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); | 2651 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); |
2649 } | 2652 } |
2650 | 2653 |
2651 | 2654 |
2652 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { | 2655 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { |
2653 return NULL; | 2656 return NULL; |
2654 } | 2657 } |
2655 | 2658 |
2656 | 2659 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2706 LOperand* context = UseFixed(instr->context(), cp); | 2709 LOperand* context = UseFixed(instr->context(), cp); |
2707 LOperand* function = UseRegisterAtStart(instr->function()); | 2710 LOperand* function = UseRegisterAtStart(instr->function()); |
2708 LAllocateBlockContext* result = | 2711 LAllocateBlockContext* result = |
2709 new(zone()) LAllocateBlockContext(context, function); | 2712 new(zone()) LAllocateBlockContext(context, function); |
2710 return MarkAsCall(DefineFixed(result, cp), instr); | 2713 return MarkAsCall(DefineFixed(result, cp), instr); |
2711 } | 2714 } |
2712 | 2715 |
2713 | 2716 |
2714 } // namespace internal | 2717 } // namespace internal |
2715 } // namespace v8 | 2718 } // namespace v8 |
OLD | NEW |