| Index: src/deoptimizer.cc
|
| diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
|
| index 9a1bb9d8efb97e2193051079321f3b59d9219444..ef86fa7f3a1b0e8b435d7af2424fb6130e62b502 100644
|
| --- a/src/deoptimizer.cc
|
| +++ b/src/deoptimizer.cc
|
| @@ -1424,8 +1424,10 @@ void Deoptimizer::DoComputeCompiledStubFrame(TranslationIterator* iterator,
|
| int input_frame_size = input_->GetFrameSize();
|
| int output_frame_size = height_in_bytes + fixed_frame_size;
|
| if (trace_) {
|
| - PrintF(" translating %s => StubFailureTrampolineStub, height=%d\n",
|
| - CodeStub::MajorName(static_cast<CodeStub::Major>(major_key), false),
|
| + PrintF(" translating %s => StubFailure%sTrampolineStub, height=%d\n",
|
| + CodeStub::MajorName(
|
| + static_cast<CodeStub::Major>(major_key), false),
|
| + descriptor->HasTailCallContinuation() ? "TailCall" : "",
|
| height_in_bytes);
|
| }
|
|
|
| @@ -1493,7 +1495,8 @@ void Deoptimizer::DoComputeCompiledStubFrame(TranslationIterator* iterator,
|
| top_address + output_frame_offset, output_frame_offset, value);
|
| }
|
|
|
| - intptr_t caller_arg_count = 0;
|
| + intptr_t caller_arg_count = descriptor->HasTailCallContinuation()
|
| + ? compiled_code_->arguments_count() + 1 : 0;
|
| bool arg_count_known = descriptor->stack_parameter_count_ == NULL;
|
|
|
| // Build the Arguments object for the caller's parameters and a pointer to it.
|
| @@ -1567,9 +1570,13 @@ void Deoptimizer::DoComputeCompiledStubFrame(TranslationIterator* iterator,
|
|
|
| // Compute this frame's PC, state, and continuation.
|
| Code* trampoline = NULL;
|
| - StubFunctionMode function_mode = descriptor->function_mode_;
|
| - StubFailureTrampolineStub(function_mode).FindCodeInCache(&trampoline,
|
| - isolate_);
|
| + if (descriptor->HasTailCallContinuation()) {
|
| + StubFailureTailCallTrampolineStub().FindCodeInCache(&trampoline, isolate_);
|
| + } else {
|
| + StubFunctionMode function_mode = descriptor->function_mode_;
|
| + StubFailureTrampolineStub(function_mode).FindCodeInCache(&trampoline,
|
| + isolate_);
|
| + }
|
| ASSERT(trampoline != NULL);
|
| output_frame->SetPc(reinterpret_cast<intptr_t>(
|
| trampoline->instruction_start()));
|
|
|