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

Unified Diff: runtime/vm/flow_graph_builder.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/debugger.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 36530)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -39,9 +39,12 @@
"Trace type check elimination at compile time.");
DEFINE_FLAG(bool, warn_on_javascript_compatibility, false,
"Warn on incompatibilities between vm and dart2js.");
+
+DECLARE_FLAG(bool, enable_debugger);
DECLARE_FLAG(bool, enable_type_checks);
+DECLARE_FLAG(int, optimization_counter_threshold);
+DECLARE_FLAG(bool, silent_warnings);
DECLARE_FLAG(bool, warning_as_error);
-DECLARE_FLAG(bool, silent_warnings);
// TODO(srdjan): Allow compiler to add constants as they are encountered in
@@ -999,7 +1002,7 @@
// statements for which there is no associated source position.
const Function& function = owner()->parsed_function()->function();
if ((node->token_pos() != Scanner::kNoSourcePos) &&
- !function.is_native()) {
+ !function.is_native() && FLAG_enable_debugger) {
AddInstruction(new DebugStepCheckInstr(node->token_pos(),
PcDescriptors::kReturn));
}
@@ -3108,8 +3111,10 @@
// call.
if (node->value()->IsLiteralNode() ||
node->value()->IsLoadLocalNode()) {
- AddInstruction(new DebugStepCheckInstr(node->token_pos(),
- PcDescriptors::kRuntimeCall));
+ if (FLAG_enable_debugger) {
+ AddInstruction(new DebugStepCheckInstr(node->token_pos(),
+ PcDescriptors::kRuntimeCall));
+ }
}
ValueGraphVisitor for_value(owner());
@@ -3519,12 +3524,15 @@
!function.is_native()) {
// Always allocate CheckOverflowInstr so that deopt-ids match regardless
// if we inline or not.
- CheckStackOverflowInstr* check =
- new CheckStackOverflowInstr(function.token_pos(), 0);
- // If we are inlining don't actually attach the stack check. We must still
- // create the stack check in order to allocate a deopt id.
- if (!owner()->IsInlining()) {
- AddInstruction(check);
+ if (!function.IsImplicitGetterFunction() &&
+ !function.IsImplicitSetterFunction()) {
+ CheckStackOverflowInstr* check =
+ new CheckStackOverflowInstr(function.token_pos(), 0);
+ // If we are inlining don't actually attach the stack check. We must still
+ // create the stack check in order to allocate a deopt id.
+ if (!owner()->IsInlining()) {
+ AddInstruction(check);
+ }
}
}
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698