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

Unified Diff: runtime/vm/simulator_arm.cc

Issue 13502002: Support FrameLookup vm test on ARM, requiring among other things: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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_arm.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_arm.cc
===================================================================
--- runtime/vm/simulator_arm.cc (revision 20887)
+++ runtime/vm/simulator_arm.cc (working copy)
@@ -496,6 +496,7 @@
#undef XSTR
}
+
char* SimulatorDebugger::ReadLine(const char* prompt) {
char* result = NULL;
char line_buf[256];
@@ -627,6 +628,7 @@
break_pc_ = NULL;
break_instr_ = 0;
last_setjmp_buffer_ = NULL;
+ top_exit_frame_info_ = 0;
// Setup architecture state.
// All registers are initialized to zero to start with.
@@ -1335,6 +1337,15 @@
if (FLAG_trace_sim) {
OS::Print("Call to host function at 0x%"Pd"\n", external);
}
+
+ if (redirection->call_kind() != kLeafRuntimeCall) {
+ // The top_exit_frame_info of the current isolate points to the top of
+ // the simulator stack.
+ ASSERT((StackTop() - Isolate::Current()->top_exit_frame_info()) <
+ Isolate::GetSpecifiedStackSize());
+ // Set the top_exit_frame_info of this simulator to the native stack.
+ set_top_exit_frame_info(reinterpret_cast<uword>(&buffer));
+ }
if (redirection->call_kind() == kRuntimeCall) {
NativeArguments arguments;
ASSERT(sizeof(NativeArguments) == 4*kWordSize);
@@ -1364,6 +1375,7 @@
target(arguments);
set_register(R0, icount_); // Zap result register from void function.
}
+ set_top_exit_frame_info(0);
// Zap caller-saved registers, since the actual runtime call could have
// used them.
@@ -2865,10 +2877,7 @@
}
ASSERT(buf != NULL);
- // Clean up stack memory of C++ frames.
- // TODO(regis): Revisit.
- // isolate->PrepareForUnwinding(reinterpret_cast<uword>(buf));
- // isolate->ChangeStateToGeneratedCode();
+ // The caller has already cleaned up the stack memory of C++ frames.
set_register(kExceptionObjectReg, bit_cast<int32_t>(object.raw()));
buf->Longjmp();
}
« no previous file with comments | « runtime/vm/simulator_arm.h ('k') | runtime/vm/simulator_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698