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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 286363006: Add flag —enable-debugger (default true) in order to disable debugger single stepping code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/flow_graph_builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_ia32.cc
===================================================================
--- runtime/vm/stub_code_ia32.cc (revision 36530)
+++ runtime/vm/stub_code_ia32.cc (working copy)
@@ -23,6 +23,7 @@
namespace dart {
+DEFINE_FLAG(bool, enable_debugger, true, "Enables debugger step checks");
DEFINE_FLAG(bool, inline_alloc, true, "Inline allocation of objects.");
DEFINE_FLAG(bool, use_slow_path, false,
"Set to true for debugging & verifying the slow paths.");
@@ -1301,19 +1302,21 @@
}
#endif // DEBUG
- // Check single stepping.
- Label not_stepping;
- __ movl(EAX, FieldAddress(CTX, Context::isolate_offset()));
- __ movzxb(EAX, Address(EAX, Isolate::single_step_offset()));
- __ cmpl(EAX, Immediate(0));
- __ j(EQUAL, &not_stepping, Assembler::kNearJump);
+ if (FLAG_enable_debugger) {
Ivan Posva 2014/05/22 21:53:43 Other architectures?
+ // Check single stepping.
+ Label not_stepping;
+ __ movl(EAX, FieldAddress(CTX, Context::isolate_offset()));
+ __ movzxb(EAX, Address(EAX, Isolate::single_step_offset()));
+ __ cmpl(EAX, Immediate(0));
+ __ j(EQUAL, &not_stepping, Assembler::kNearJump);
- __ EnterStubFrame();
- __ pushl(ECX);
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ popl(ECX);
- __ LeaveFrame();
- __ Bind(&not_stepping);
+ __ EnterStubFrame();
+ __ pushl(ECX);
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ popl(ECX);
+ __ LeaveFrame();
+ __ Bind(&not_stepping);
+ }
// ECX: IC data object (preserved).
// Load arguments descriptor into EDX.
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698