Index: runtime/vm/compiler.cc |
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc |
index bc465b30bf484e1163d644dc051f57c2286723f2..5e842601e5ca82716a2884d67e3aa5df16d74d19 100644 |
--- a/runtime/vm/compiler.cc |
+++ b/runtime/vm/compiler.cc |
@@ -232,6 +232,7 @@ DEFINE_RUNTIME_ENTRY(CompileFunction, 1) { |
} |
bool Compiler::CanOptimizeFunction(Thread* thread, const Function& function) { |
+#if !defined(PRODUCT) |
if (FLAG_support_debugger) { |
Isolate* isolate = thread->isolate(); |
if (isolate->debugger()->IsStepping() || |
@@ -242,6 +243,7 @@ bool Compiler::CanOptimizeFunction(Thread* thread, const Function& function) { |
return false; |
} |
} |
+#endif |
if (function.deoptimization_counter() >= |
FLAG_max_deoptimization_counter_threshold) { |
if (FLAG_trace_failed_optimization_attempts || |
@@ -1350,9 +1352,11 @@ static RawObject* CompileFunctionHelper(CompilationPipeline* pipeline, |
per_compile_timer.TotalElapsedTime()); |
} |
+#if !defined(PRODUCT) |
if (FLAG_support_debugger) { |
isolate->debugger()->NotifyCompilation(function); |
} |
+#endif |
if (FLAG_disassemble && FlowGraphPrinter::ShouldPrint(function)) { |
Disassembler::DisassembleCode(function, result, optimized); |