Chromium Code Reviews| Index: src/deoptimizer.cc |
| diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc |
| index 9a1bb9d8efb97e2193051079321f3b59d9219444..0bd5035a50fb03e7b2e308be449e6acea2dd3d0b 100644 |
| --- a/src/deoptimizer.cc |
| +++ b/src/deoptimizer.cc |
| @@ -1424,9 +1424,17 @@ 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), |
| - height_in_bytes); |
| + if (descriptor->call_stub_) { |
| + PrintF(" translating %s => CallStubFailureTrampolineStub, height=%d\n", |
|
danno
2013/10/02 08:49:11
You can use a single statement and just switch the
Toon Verwaest
2013/10/02 16:28:16
Done.
|
| + CodeStub::MajorName( |
| + static_cast<CodeStub::Major>(major_key), false), |
| + height_in_bytes); |
| + } else { |
| + PrintF(" translating %s => StubFailureTrampolineStub, height=%d\n", |
| + CodeStub::MajorName( |
| + static_cast<CodeStub::Major>(major_key), false), |
| + height_in_bytes); |
| + } |
| } |
| // The stub failure trampoline is a single frame. |
| @@ -1493,7 +1501,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->call_stub_ |
| + ? compiled_code_->arguments_count() : 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 +1576,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->call_stub_) { |
| + CallStubFailureTrampolineStub().FindCodeInCache(&trampoline, isolate_); |
|
danno
2013/10/02 08:49:11
Is this only going to every be used with CallStubs
Toon Verwaest
2013/10/02 16:28:16
Done.
|
| + } 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())); |