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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 CHECK(false); | 662 CHECK(false); |
663 } | 663 } |
664 } | 664 } |
665 | 665 |
666 | 666 |
667 void CodeGenerator::MarkLazyDeoptSite() { | 667 void CodeGenerator::MarkLazyDeoptSite() { |
668 last_lazy_deopt_pc_ = masm()->pc_offset(); | 668 last_lazy_deopt_pc_ = masm()->pc_offset(); |
669 } | 669 } |
670 | 670 |
671 | 671 |
| 672 int CodeGenerator::TailCallFrameStackSlotDelta(int stack_param_delta) { |
| 673 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
| 674 int spill_slots = frame()->GetSpillSlotCount(); |
| 675 bool has_frame = descriptor->IsJSFunctionCall() || spill_slots > 0; |
| 676 // Leave the PC and saved frame pointer on the stack. |
| 677 int sp_slot_delta = |
| 678 has_frame |
| 679 ? (frame()->GetTotalFrameSlotCount() - |
| 680 (StandardFrameConstants::kFixedFrameSizeFromFp / kPointerSize)) |
| 681 : 0; |
| 682 // Discard only slots that won't be used by new parameters. |
| 683 sp_slot_delta += stack_param_delta; |
| 684 return sp_slot_delta; |
| 685 } |
| 686 |
| 687 |
672 OutOfLineCode::OutOfLineCode(CodeGenerator* gen) | 688 OutOfLineCode::OutOfLineCode(CodeGenerator* gen) |
673 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { | 689 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { |
674 gen->ools_ = this; | 690 gen->ools_ = this; |
675 } | 691 } |
676 | 692 |
677 | 693 |
678 OutOfLineCode::~OutOfLineCode() {} | 694 OutOfLineCode::~OutOfLineCode() {} |
679 | 695 |
680 } // namespace compiler | 696 } // namespace compiler |
681 } // namespace internal | 697 } // namespace internal |
682 } // namespace v8 | 698 } // namespace v8 |
OLD | NEW |