Chromium Code Reviews| Index: src/ia32/deoptimizer-ia32.cc |
| diff --git a/src/ia32/deoptimizer-ia32.cc b/src/ia32/deoptimizer-ia32.cc |
| index 72fdac8c6ce900dbd26d05325518a6e8b40e74b8..e35d1f9d05e5cf8d8a3a38ba6a775bc969ff9115 100644 |
| --- a/src/ia32/deoptimizer-ia32.cc |
| +++ b/src/ia32/deoptimizer-ia32.cc |
| @@ -348,6 +348,9 @@ void Deoptimizer::DoComputeOsrOutputFrame() { |
| output_ = new FrameDescription*[1]; |
| output_[0] = new(output_frame_size) FrameDescription( |
| output_frame_size, function_); |
| +#ifdef DEBUG |
| + output_[0]->SetKind(Code::OPTIMIZED_FUNCTION); |
| +#endif |
| // Clear the incoming parameters in the optimized frame to avoid |
| // confusing the garbage collector. |
| @@ -461,6 +464,9 @@ void Deoptimizer::DoComputeFrame(TranslationIterator* iterator, |
| // Allocate and store the output frame description. |
| FrameDescription* output_frame = |
| new(output_frame_size) FrameDescription(output_frame_size, function); |
| +#ifdef DEBUG |
| + output_frame->SetKind(Code::FUNCTION); |
| +#endif |
| bool is_bottommost = (0 == frame_index); |
| bool is_topmost = (output_count_ - 1 == frame_index); |
| @@ -587,7 +593,7 @@ void Deoptimizer::DoComputeFrame(TranslationIterator* iterator, |
| output_frame->SetState(Smi::FromInt(state)); |
| // Set the continuation for the topmost frame. |
| - if (is_topmost) { |
| + if (is_topmost && bailout_type_ != DEBUGGER) { |
| Builtins* builtins = isolate_->builtins(); |
| Code* continuation = (bailout_type_ == EAGER) |
| ? builtins->builtin(Builtins::kNotifyDeoptimized) |
| @@ -600,6 +606,27 @@ void Deoptimizer::DoComputeFrame(TranslationIterator* iterator, |
| } |
| +void Deoptimizer::FillInputFrame(Address tos, JavaScriptFrame* frame) { |
| + // Set the register values. The values are not important as there are no |
| + // callee saved registers in JavaScript frames, so all registers are |
| + // spilled. Registers ebp and esp are set to the correct values though. |
| + |
| + for (int i = 0; i < Register::kNumRegisters; i++) { |
| + input_->SetRegister(i, i * 4); |
|
fschneider
2011/06/29 10:47:35
Maybe use some constant as default value?
Søren Thygesen Gjesse
2011/06/29 12:42:10
Done.
|
| + } |
| + input_->SetRegister(esp.code(), reinterpret_cast<intptr_t>(frame->sp())); |
| + input_->SetRegister(ebp.code(), reinterpret_cast<intptr_t>(frame->fp())); |
| + for (int i = 0; i < DoubleRegister::kNumAllocatableRegisters; i++) { |
| + input_->SetDoubleRegister(i, -1.0 * i); |
| + } |
| + |
| + // Fill the frame content from the actual data on the frame. |
| + for (intptr_t i = 0; i < input_->GetFrameSize(); i += kPointerSize) { |
| + input_->SetFrameSlot(i, Memory::uint32_at(tos + i)); |
| + } |
| +} |
| + |
| + |
| #define __ masm()-> |
| void Deoptimizer::EntryGenerator::Generate() { |