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

Unified Diff: src/compiler/code-generator.cc

Issue 2082263002: [turbofan]: Support using push instructions for setting up tail call parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index 74c97dfc5387059974e9eb521cbbfd7e6ffe702b..8fca3233c5674619842598baf0ef1a0324e78bcd 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -422,8 +422,18 @@ void CodeGenerator::AssembleSourcePosition(Instruction* instr) {
}
}
+bool CodeGenerator::GetSlotAboveSPAfterGap(Instruction* instr, int* slot) {
+ if (instr->IsTailCall()) {
+ InstructionOperandConverter g(this, instr);
+ *slot = g.InputInt32(instr->InputCount() - 1);
+ return true;
+ } else {
+ return false;
+ }
+}
void CodeGenerator::AssembleGaps(Instruction* instr) {
+ AssemblePreGaps(instr);
for (int i = Instruction::FIRST_GAP_POSITION;
i <= Instruction::LAST_GAP_POSITION; i++) {
Instruction::GapPosition inner_pos =
@@ -431,6 +441,7 @@ void CodeGenerator::AssembleGaps(Instruction* instr) {
ParallelMove* move = instr->GetParallelMove(inner_pos);
if (move != nullptr) resolver()->Resolve(move);
}
+ AssemblePostGaps(instr);
}
@@ -804,18 +815,6 @@ DeoptimizationExit* CodeGenerator::AddDeoptimizationExit(
return exit;
}
-int CodeGenerator::TailCallFrameStackSlotDelta(int stack_param_delta) {
- // Leave the PC on the stack on platforms that have that as part of their ABI
- int pc_slots = V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK ? 1 : 0;
- int sp_slot_delta = frame_access_state()->has_frame()
- ? (frame()->GetTotalFrameSlotCount() - pc_slots)
- : 0;
- // Discard only slots that won't be used by new parameters.
- sp_slot_delta += stack_param_delta;
- return sp_slot_delta;
-}
-
-
OutOfLineCode::OutOfLineCode(CodeGenerator* gen)
: frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) {
gen->ools_ = this;

Powered by Google App Engine
This is Rietveld 408576698