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

Unified Diff: runtime/vm/debugger.cc

Issue 797343002: Deoptimize the world when single stepping. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review 2 Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index b180e9675865d6583d51ce182e3fa095708fb8c1..175017e286d9b31b85dc02f9db132b5b33b3c8e4 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -2088,12 +2088,20 @@ void Debugger::Pause(DebuggerEvent* event) {
void Debugger::HandleSteppingRequest(DebuggerStackTrace* stack_trace) {
stepping_fp_ = 0;
if (resume_action_ == kSingleStep) {
+ // When single stepping, we need to deoptimize because we might be
+ // stepping into optimized code. This happens in particular if
+ // the isolate has been interrupted, but can happen in other cases
+ // as well. We need to deoptimize the world in case we are about
+ // to call an optimized function.
+ DeoptimizeWorld();
isolate_->set_single_step(true);
} else if (resume_action_ == kStepOver) {
+ DeoptimizeWorld();
isolate_->set_single_step(true);
ASSERT(stack_trace->Length() > 0);
stepping_fp_ = stack_trace->FrameAt(0)->fp();
} else if (resume_action_ == kStepOut) {
+ DeoptimizeWorld();
isolate_->set_single_step(true);
// Find topmost caller that is debuggable.
for (intptr_t i = 1; i < stack_trace->Length(); i++) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698