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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 11780005: Allow optimized code when debugger is active (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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/flow_graph_compiler_arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
===================================================================
--- runtime/vm/flow_graph_compiler.cc (revision 16810)
+++ runtime/vm/flow_graph_compiler.cc (working copy)
@@ -184,11 +184,15 @@
bool FlowGraphCompiler::CanOptimize() {
return !FLAG_report_usage_count &&
- (FLAG_optimization_counter_threshold >= 0) &&
- !Isolate::Current()->debugger()->IsActive();
+ (FLAG_optimization_counter_threshold >= 0);
}
+bool FlowGraphCompiler::CanOptimizeFunction() const {
+ return CanOptimize() && !parsed_function().function().HasBreakpoint();
+}
+
+
void FlowGraphCompiler::VisitBlocks() {
for (intptr_t i = 0; i < block_order().length(); ++i) {
// Compile the block entry.
@@ -451,7 +455,7 @@
// Returns 'true' if code generation for this function is complete, i.e.,
// no fall-through to regular code is needed.
bool FlowGraphCompiler::TryIntrinsify() {
- if (!CanOptimize()) return false;
+ if (!CanOptimizeFunction()) return false;
// Intrinsification skips arguments checks, therefore disable if in checked
// mode.
if (FLAG_intrinsify && !FLAG_enable_type_checks) {
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/flow_graph_compiler_arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698