Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(789)

Unified Diff: runtime/vm/simulator_dbc.cc

Issue 2503623003: Revert "JumpToFrame refactor" (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/simulator_dbc.h ('k') | runtime/vm/simulator_mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_dbc.cc
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index ef9991db623d16f66412c6edd92dac6eb69e9f7a..0ac2ae9bb0bb7f244b25c6ea5c657fea210ea8ca 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -3691,7 +3691,12 @@ RawObject* Simulator::Call(const Code& code,
}
-void Simulator::JumpToFrame(uword pc, uword sp, uword fp, Thread* thread) {
+void Simulator::Longjmp(uword pc,
+ uword sp,
+ uword fp,
+ RawObject* raw_exception,
+ RawObject* raw_stacktrace,
+ Thread* thread) {
// Walk over all setjmp buffers (simulated --> C++ transitions)
// and try to find the setjmp associated with the simulated stack pointer.
SimulatorSetjmpBuffer* buf = last_setjmp_buffer();
@@ -3711,22 +3716,12 @@ void Simulator::JumpToFrame(uword pc, uword sp, uword fp, Thread* thread) {
// Clear top exit frame.
thread->set_top_exit_frame_info(0);
+ ASSERT(raw_exception != Object::null());
sp_ = reinterpret_cast<RawObject**>(sp);
fp_ = reinterpret_cast<RawObject**>(fp);
-
- if (pc == StubCode::RunExceptionHandler_entry()->EntryPoint()) {
- // Instead of executing the RunException stub, we implement its
- // behavior here.
- RawObject* raw_exception = thread->active_exception();
- RawObject* raw_stacktrace = thread->active_stacktrace();
- ASSERT(raw_exception != Object::null());
- special_[kExceptionSpecialIndex] = raw_exception;
- special_[kStacktraceSpecialIndex] = raw_stacktrace;
- pc_ = thread->resume_pc();
- } else {
- pc_ = pc;
- }
-
+ pc_ = pc;
+ special_[kExceptionSpecialIndex] = raw_exception;
+ special_[kStacktraceSpecialIndex] = raw_stacktrace;
buf->Longjmp();
UNREACHABLE();
}
« no previous file with comments | « runtime/vm/simulator_dbc.h ('k') | runtime/vm/simulator_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698