| 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/address-map.h" | 7 #include "src/address-map.h" |
| 8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
| 9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
| 10 #include "src/compiler/pipeline.h" | 10 #include "src/compiler/pipeline.h" |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 | 668 |
| 669 void CodeGenerator::MarkLazyDeoptSite() { | 669 void CodeGenerator::MarkLazyDeoptSite() { |
| 670 last_lazy_deopt_pc_ = masm()->pc_offset(); | 670 last_lazy_deopt_pc_ = masm()->pc_offset(); |
| 671 } | 671 } |
| 672 | 672 |
| 673 | 673 |
| 674 int CodeGenerator::TailCallFrameStackSlotDelta(int stack_param_delta) { | 674 int CodeGenerator::TailCallFrameStackSlotDelta(int stack_param_delta) { |
| 675 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 675 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
| 676 int spill_slots = frame()->GetSpillSlotCount(); | 676 int spill_slots = frame()->GetSpillSlotCount(); |
| 677 bool has_frame = descriptor->IsJSFunctionCall() || spill_slots > 0; | 677 bool has_frame = descriptor->IsJSFunctionCall() || spill_slots > 0; |
| 678 // Leave the PC and saved frame pointer on the stack. | 678 // Leave the PC on the stack on platforms that have that as part of their ABI |
| 679 int pc_slots = V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK ? 1 : 0; |
| 679 int sp_slot_delta = | 680 int sp_slot_delta = |
| 680 has_frame | 681 has_frame ? (frame()->GetTotalFrameSlotCount() - pc_slots) : 0; |
| 681 ? (frame()->GetTotalFrameSlotCount() - | |
| 682 (StandardFrameConstants::kFixedFrameSizeFromFp / kPointerSize)) | |
| 683 : 0; | |
| 684 // Discard only slots that won't be used by new parameters. | 682 // Discard only slots that won't be used by new parameters. |
| 685 sp_slot_delta += stack_param_delta; | 683 sp_slot_delta += stack_param_delta; |
| 686 return sp_slot_delta; | 684 return sp_slot_delta; |
| 687 } | 685 } |
| 688 | 686 |
| 689 | 687 |
| 690 OutOfLineCode::OutOfLineCode(CodeGenerator* gen) | 688 OutOfLineCode::OutOfLineCode(CodeGenerator* gen) |
| 691 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { | 689 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { |
| 692 gen->ools_ = this; | 690 gen->ools_ = this; |
| 693 } | 691 } |
| 694 | 692 |
| 695 | 693 |
| 696 OutOfLineCode::~OutOfLineCode() {} | 694 OutOfLineCode::~OutOfLineCode() {} |
| 697 | 695 |
| 698 } // namespace compiler | 696 } // namespace compiler |
| 699 } // namespace internal | 697 } // namespace internal |
| 700 } // namespace v8 | 698 } // namespace v8 |
| OLD | NEW |