Chromium Code Reviews| Index: runtime/vm/deopt_instructions.cc |
| diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc |
| index 1839f7fae8a14eb760f594f2148744adb99bc4f8..7594a16f947944928dbd57a6c8c1e20c5d01d0fa 100644 |
| --- a/runtime/vm/deopt_instructions.cc |
| +++ b/runtime/vm/deopt_instructions.cc |
| @@ -67,13 +67,19 @@ DeoptContext::DeoptContext(const StackFrame* frame, |
| // return-address. This section is copied as well, so that its contained |
| // values can be updated before returning to the deoptimized function. |
| // Note: on DBC stack grows upwards unlike on all other architectures. |
| + const intptr_t frame_size = |
| +#if defined(TARGET_ARCH_DBC) |
| + (static_cast<intptr_t>(frame->sp()) - |
|
Vyacheslav Egorov (Google)
2016/06/09 15:09:06
I don't think these casts are needed really, they
zra
2016/06/09 16:42:23
Done.
|
| + static_cast<intptr_t>(frame->fp())) / kWordSize; |
| +#else |
| + (static_cast<intptr_t>(frame->fp()) - |
| + static_cast<intptr_t>(frame->sp())) / kWordSize; |
| +#endif |
| + ASSERT(frame_size >= 0); |
| + |
| source_frame_size_ = |
| + kDartFrameFixedSize // For saved values below sp. |
| -#if !defined(TARGET_ARCH_DBC) |
| - + ((frame->fp() - frame->sp()) / kWordSize) // For frame size incl. sp. |
| -#else |
| - + ((frame->sp() - frame->fp()) / kWordSize) // For frame size incl. sp. |
| -#endif // !defined(TARGET_ARCH_DBC) |
| + + frame_size // For frame size incl. sp. |
| + 1 // For fp. |
| + kParamEndSlotFromFp // For saved values above fp. |
| + num_args_; // For arguments. |