| Index: runtime/vm/simulator_dbc.cc
|
| diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
|
| index e40ae73b4c8bc5f85f5143f15f2534cc277077b7..dea082ab612a5abe026512ada28b4279059c5383 100644
|
| --- a/runtime/vm/simulator_dbc.cc
|
| +++ b/runtime/vm/simulator_dbc.cc
|
| @@ -61,7 +61,6 @@ class SimulatorSetjmpBuffer {
|
| simulator_ = sim;
|
| link_ = sim->last_setjmp_buffer();
|
| sim->set_last_setjmp_buffer(this);
|
| - sp_ = sim->sp_;
|
| fp_ = sim->fp_;
|
| }
|
|
|
| @@ -72,13 +71,11 @@ class SimulatorSetjmpBuffer {
|
|
|
| SimulatorSetjmpBuffer* link() const { return link_; }
|
|
|
| - uword sp() const { return reinterpret_cast<uword>(sp_); }
|
| uword fp() const { return reinterpret_cast<uword>(fp_); }
|
|
|
| jmp_buf buffer_;
|
|
|
| private:
|
| - RawObject** sp_;
|
| RawObject** fp_;
|
| Simulator* simulator_;
|
| SimulatorSetjmpBuffer* link_;
|
| @@ -510,7 +507,7 @@ void Simulator::InitOnce() {
|
| }
|
|
|
|
|
| -Simulator::Simulator() : stack_(NULL), fp_(NULL), sp_(NULL) {
|
| +Simulator::Simulator() : stack_(NULL), fp_(NULL) {
|
| // Setup simulator support first. Some of this information is needed to
|
| // setup the architecture state.
|
| // We allocate the stack here, the size is computed as the sum of
|
| @@ -581,8 +578,8 @@ void Simulator::Exit(Thread* thread,
|
| frame[1] = Code::null();
|
| frame[2] = reinterpret_cast<RawObject*>(pc);
|
| frame[3] = reinterpret_cast<RawObject*>(base);
|
| - fp_ = sp_ = frame + kDartFrameFixedSize;
|
| - thread->set_top_exit_frame_info(reinterpret_cast<uword>(sp_));
|
| + fp_ = frame + kDartFrameFixedSize;
|
| + thread->set_top_exit_frame_info(reinterpret_cast<uword>(fp_));
|
| }
|
|
|
| // TODO(vegorov): Investigate advantages of using
|
| @@ -1060,8 +1057,8 @@ static DART_NOINLINE bool InvokeNativeWrapper(Thread* thread,
|
| FP = reinterpret_cast<RawObject**>(fp_); \
|
| pc = reinterpret_cast<uint32_t*>(pc_); \
|
| if ((reinterpret_cast<uword>(pc) & 2) != 0) { /* Entry frame? */ \
|
| - fp_ = sp_ = reinterpret_cast<RawObject**>(fp_[0]); \
|
| - thread->set_top_exit_frame_info(reinterpret_cast<uword>(sp_)); \
|
| + fp_ = reinterpret_cast<RawObject**>(fp_[0]); \
|
| + thread->set_top_exit_frame_info(reinterpret_cast<uword>(fp_)); \
|
| thread->set_top_resource(top_resource); \
|
| thread->set_vm_tag(vm_tag); \
|
| return special_[kExceptionSpecialIndex]; \
|
| @@ -1112,8 +1109,8 @@ RawObject* Simulator::Call(const Code& code,
|
| uint32_t op; // Currently executing op.
|
| uint16_t rA; // A component of the currently executing op.
|
|
|
| - if (sp_ == NULL) {
|
| - fp_ = sp_ = reinterpret_cast<RawObject**>(stack_);
|
| + if (fp_ == NULL) {
|
| + fp_ = reinterpret_cast<RawObject**>(stack_);
|
| }
|
|
|
| // Save current VM tag and mark thread as executing Dart code.
|
| @@ -2575,9 +2572,8 @@ RawObject* Simulator::Call(const Code& code,
|
| // Check if it is a fake PC marking the entry frame.
|
| if ((reinterpret_cast<uword>(pc) & 2) != 0) {
|
| const intptr_t argc = reinterpret_cast<uword>(pc) >> 2;
|
| - fp_ = sp_ =
|
| - reinterpret_cast<RawObject**>(FrameArguments(FP, argc + 1)[0]);
|
| - thread->set_top_exit_frame_info(reinterpret_cast<uword>(sp_));
|
| + fp_ = reinterpret_cast<RawObject**>(FrameArguments(FP, argc + 1)[0]);
|
| + thread->set_top_exit_frame_info(reinterpret_cast<uword>(fp_));
|
| thread->set_top_resource(top_resource);
|
| thread->set_vm_tag(vm_tag);
|
| return result;
|
| @@ -3723,7 +3719,6 @@ void Simulator::JumpToFrame(uword pc, uword sp, uword fp, Thread* thread) {
|
| // Clear top exit frame.
|
| thread->set_top_exit_frame_info(0);
|
|
|
| - sp_ = reinterpret_cast<RawObject**>(sp);
|
| fp_ = reinterpret_cast<RawObject**>(fp);
|
|
|
| if (pc == StubCode::RunExceptionHandler_entry()->EntryPoint()) {
|
|
|