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

Side by Side Diff: src/compiler/code-generator.cc

Issue 1455833004: [turbofan]: Implement tail calls with more callee than caller parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Improve comment Created 5 years, 1 month 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
« no previous file with comments | « src/compiler/code-generator.h ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
OLDNEW
« no previous file with comments | « src/compiler/code-generator.h ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698