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

Unified Diff: runtime/vm/code_generator.cc

Issue 17846009: Better single stepping in VM debugger (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/code_generator.h ('k') | runtime/vm/dart_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 24627)
+++ runtime/vm/code_generator.cc (working copy)
@@ -873,6 +873,14 @@
}
+DEFINE_RUNTIME_ENTRY(SingleStepHandler, 0) {
+ ASSERT(arguments.ArgCount() ==
+ kSingleStepHandlerRuntimeEntry.argument_count());
+ ASSERT(isolate->debugger() != NULL);
+ isolate->debugger()->SingleStepCallback();
+}
+
+
static RawFunction* InlineCacheMissHandler(
const GrowableArray<const Instance*>& args,
const ICData& ic_data,
@@ -1292,9 +1300,10 @@
static bool CanOptimizeFunction(const Function& function, Isolate* isolate) {
const intptr_t kLowInvocationCount = -100000000;
- if (isolate->debugger()->HasBreakpoint(function)) {
- // We cannot set breakpoints in optimized code, so do not optimize
- // the function.
+ if (isolate->debugger()->IsStepping() ||
+ isolate->debugger()->HasBreakpoint(function)) {
+ // We cannot set breakpoints and single step in optimized code,
+ // so do not optimize the function.
function.set_usage_counter(0);
return false;
}
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/dart_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698