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

Unified Diff: runtime/vm/simulator_mips.cc

Issue 1156143003: Refactor Isolate -> Thread in NativeArguments and exception handler jump. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix comment; remove unused accessor. Created 5 years, 7 months 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_mips.h ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_mips.cc
diff --git a/runtime/vm/simulator_mips.cc b/runtime/vm/simulator_mips.cc
index cd351a7d6ea2c85120d35b43d734d842229ee810..684d81daec9b84174bdf707ef793b115ef4835a4 100644
--- a/runtime/vm/simulator_mips.cc
+++ b/runtime/vm/simulator_mips.cc
@@ -1237,7 +1237,7 @@ void Simulator::DoBreak(Instr *instr) {
if (redirection->call_kind() == kRuntimeCall) {
NativeArguments arguments;
ASSERT(sizeof(NativeArguments) == 4*kWordSize);
- arguments.isolate_ = reinterpret_cast<Isolate*>(get_register(A0));
+ arguments.thread_ = reinterpret_cast<Thread*>(get_register(A0));
arguments.argc_tag_ = get_register(A1);
arguments.argv_ = reinterpret_cast<RawObject*(*)[]>(get_register(A2));
arguments.retval_ = reinterpret_cast<RawObject**>(get_register(A3));
@@ -2454,7 +2454,7 @@ void Simulator::Longjmp(uword pc,
uword fp,
RawObject* raw_exception,
RawObject* raw_stacktrace,
- Isolate* isolate) {
+ 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();
@@ -2466,12 +2466,14 @@ void Simulator::Longjmp(uword pc,
// The C++ caller has not cleaned up the stack memory of C++ frames.
// Prepare for unwinding frames by destroying all the stack resources
// in the previous C++ frames.
+ Isolate* isolate = thread->isolate();
StackResource::Unwind(isolate);
// Unwind the C++ stack and continue simulation in the target frame.
set_pc(static_cast<int32_t>(pc));
set_register(SP, static_cast<int32_t>(sp));
set_register(FP, static_cast<int32_t>(fp));
+ set_register(THR, reinterpret_cast<int32_t>(thread));
// Set the tag.
isolate->set_vm_tag(VMTag::kDartTagId);
// Clear top exit frame.
« no previous file with comments | « runtime/vm/simulator_mips.h ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698