Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1012)

Side by Side Diff: src/crankshaft/arm64/lithium-arm64.cc

Issue 1702593002: More simplification and unification of frame handling (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Platform ports Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 530 int LPlatformChunk::GetNextSpillIndex() { return current_frame_slots_++; }
531 int LPlatformChunk::GetNextSpillIndex() {
532 return spill_slot_count_++;
533 }
534
535 531
536 LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) { 532 LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) {
537 int index = GetNextSpillIndex(); 533 int index = GetNextSpillIndex();
538 if (kind == DOUBLE_REGISTERS) { 534 if (kind == DOUBLE_REGISTERS) {
539 return LDoubleStackSlot::Create(index, zone()); 535 return LDoubleStackSlot::Create(index, zone());
540 } else { 536 } else {
541 DCHECK(kind == GENERAL_REGISTERS); 537 DCHECK(kind == GENERAL_REGISTERS);
542 return LStackSlot::Create(index, zone()); 538 return LStackSlot::Create(index, zone());
543 } 539 }
544 } 540 }
(...skipping 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after
2640 int env_index = instr->index(); 2636 int env_index = instr->index();
2641 int spill_index = 0; 2637 int spill_index = 0;
2642 if (instr->environment()->is_parameter_index(env_index)) { 2638 if (instr->environment()->is_parameter_index(env_index)) {
2643 spill_index = chunk_->GetParameterStackSlot(env_index); 2639 spill_index = chunk_->GetParameterStackSlot(env_index);
2644 } else { 2640 } else {
2645 spill_index = env_index - instr->environment()->first_local_index(); 2641 spill_index = env_index - instr->environment()->first_local_index();
2646 if (spill_index > LUnallocated::kMaxFixedSlotIndex) { 2642 if (spill_index > LUnallocated::kMaxFixedSlotIndex) {
2647 Retry(kTooManySpillSlotsNeededForOSR); 2643 Retry(kTooManySpillSlotsNeededForOSR);
2648 spill_index = 0; 2644 spill_index = 0;
2649 } 2645 }
2646 spill_index += StandardFrameConstants::kFixedSlotCount;
2650 } 2647 }
2651 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); 2648 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index);
2652 } 2649 }
2653 2650
2654 2651
2655 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { 2652 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) {
2656 return NULL; 2653 return NULL;
2657 } 2654 }
2658 2655
2659 2656
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
2709 LOperand* context = UseFixed(instr->context(), cp); 2706 LOperand* context = UseFixed(instr->context(), cp);
2710 LOperand* function = UseRegisterAtStart(instr->function()); 2707 LOperand* function = UseRegisterAtStart(instr->function());
2711 LAllocateBlockContext* result = 2708 LAllocateBlockContext* result =
2712 new(zone()) LAllocateBlockContext(context, function); 2709 new(zone()) LAllocateBlockContext(context, function);
2713 return MarkAsCall(DefineFixed(result, cp), instr); 2710 return MarkAsCall(DefineFixed(result, cp), instr);
2714 } 2711 }
2715 2712
2716 2713
2717 } // namespace internal 2714 } // namespace internal
2718 } // namespace v8 2715 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698